K
- ID typeVV
- vertex value typeEV
- edge value typepublic class MaximumDegree<K,VV,EV> extends GraphAlgorithmWrappingGraph<K,VV,EV,K,VV,EV>
parallelism
Constructor and Description |
---|
MaximumDegree(long maximumDegree)
Filter out vertices with degree greater than the given maximum.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
canMergeConfigurationWith(GraphAlgorithmWrappingBase other)
First test whether the algorithm configurations can be merged before the
call to
GraphAlgorithmWrappingBase.mergeConfiguration(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase) . |
protected void |
mergeConfiguration(GraphAlgorithmWrappingBase other)
Merge the other configuration into this algorithm's after the call to
GraphAlgorithmWrappingBase.canMergeConfigurationWith(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase) has checked that the configurations
can be merged. |
Graph<K,VV,EV> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
MaximumDegree<K,VV,EV> |
setBroadcastHighDegreeVertices(boolean broadcastHighDegreeVertices)
After filtering high-degree vertices this algorithm must perform joins
on the original graph's vertex set and on both the source and target IDs
of the edge set.
|
MaximumDegree<K,VV,EV> |
setReduceOnTargetId(boolean reduceOnTargetId)
The degree can be counted from either the edge source or target IDs.
|
equals, hashCode, run
getAlgorithmName, setParallelism
public MaximumDegree(long maximumDegree)
maximumDegree
- maximum degreepublic MaximumDegree<K,VV,EV> setReduceOnTargetId(boolean reduceOnTargetId)
reduceOnTargetId
- set to true
if the input edge list
is sorted by target IDpublic MaximumDegree<K,VV,EV> setBroadcastHighDegreeVertices(boolean broadcastHighDegreeVertices)
broadcastHighDegreeVertices
- set to true
if the high-degree
vertices should be broadcast when joiningprotected boolean canMergeConfigurationWith(GraphAlgorithmWrappingBase other)
GraphAlgorithmWrappingBase
GraphAlgorithmWrappingBase.mergeConfiguration(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase)
.canMergeConfigurationWith
in class GraphAlgorithmWrappingBase<K,VV,EV,Graph<K,VV,EV>>
other
- the algorithm with which to compare configurationGraphAlgorithmWrappingBase.mergeConfiguration(GraphAlgorithmWrappingBase)
protected void mergeConfiguration(GraphAlgorithmWrappingBase other)
GraphAlgorithmWrappingBase
GraphAlgorithmWrappingBase.canMergeConfigurationWith(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase)
has checked that the configurations
can be merged.mergeConfiguration
in class GraphAlgorithmWrappingBase<K,VV,EV,Graph<K,VV,EV>>
other
- the algorithm from which to merge configurationGraphAlgorithmWrappingBase.canMergeConfigurationWith(GraphAlgorithmWrappingBase)
public Graph<K,VV,EV> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmWrappingGraph
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingGraph<K,VV,EV,K,VV,EV>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.