K
- ID typeVV
- vertex value typeEV
- edge value typepublic class EdgeDegreePair<K,VV,EV> extends GraphAlgorithmWrappingDataSet<K,VV,EV,Edge<K,org.apache.flink.api.java.tuple.Tuple3<EV,org.apache.flink.types.LongValue,org.apache.flink.types.LongValue>>>
Constructor and Description |
---|
EdgeDegreePair() |
Modifier and Type | Method and Description |
---|---|
protected String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
protected boolean |
mergeConfiguration(GraphAlgorithmWrappingDataSet other)
An algorithm must first test whether the configurations can be merged
before merging individual fields.
|
org.apache.flink.api.java.DataSet<Edge<K,org.apache.flink.api.java.tuple.Tuple3<EV,org.apache.flink.types.LongValue,org.apache.flink.types.LongValue>>> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
EdgeDegreePair<K,VV,EV> |
setParallelism(int parallelism)
Override the operator parallelism.
|
EdgeDegreePair<K,VV,EV> |
setReduceOnTargetId(boolean reduceOnTargetId)
The degree can be counted from either the edge source or target IDs.
|
equals, hashCode, run
public EdgeDegreePair<K,VV,EV> setReduceOnTargetId(boolean reduceOnTargetId)
reduceOnTargetId
- set to true
if the input edge list
is sorted by target IDpublic EdgeDegreePair<K,VV,EV> setParallelism(int parallelism)
parallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmWrappingDataSet
getAlgorithmName
in class GraphAlgorithmWrappingDataSet<K,VV,EV,Edge<K,org.apache.flink.api.java.tuple.Tuple3<EV,org.apache.flink.types.LongValue,org.apache.flink.types.LongValue>>>
protected boolean mergeConfiguration(GraphAlgorithmWrappingDataSet other)
GraphAlgorithmWrappingDataSet
mergeConfiguration
in class GraphAlgorithmWrappingDataSet<K,VV,EV,Edge<K,org.apache.flink.api.java.tuple.Tuple3<EV,org.apache.flink.types.LongValue,org.apache.flink.types.LongValue>>>
other
- the algorithm with which to compare and mergepublic org.apache.flink.api.java.DataSet<Edge<K,org.apache.flink.api.java.tuple.Tuple3<EV,org.apache.flink.types.LongValue,org.apache.flink.types.LongValue>>> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmWrappingDataSet
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingDataSet<K,VV,EV,Edge<K,org.apache.flink.api.java.tuple.Tuple3<EV,org.apache.flink.types.LongValue,org.apache.flink.types.LongValue>>>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.