K
- graph label typeVV
- vertex value typeEV
- edge value typepublic class VertexDegrees<K,VV,EV> extends GraphAlgorithmWrappingDataSet<K,VV,EV,Vertex<K,VertexDegrees.Degrees>>
Modifier and Type | Class and Description |
---|---|
static class |
VertexDegrees.Degrees
Wraps the vertex degree, out-degree, and in-degree.
|
Constructor and Description |
---|
VertexDegrees() |
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<Vertex<K,VertexDegrees.Degrees>> |
runInternal(Graph<K,VV,EV> input)
The implementation of the algorithm, renamed from
GraphAlgorithm.run(Graph) . |
VertexDegrees<K,VV,EV> |
setIncludeZeroDegreeVertices(boolean includeZeroDegreeVertices)
By default only the edge set is processed for the computation of degree.
|
VertexDegrees<K,VV,EV> |
setParallelism(int parallelism)
Override the operator parallelism.
|
equals, hashCode, run
public VertexDegrees<K,VV,EV> setIncludeZeroDegreeVertices(boolean includeZeroDegreeVertices)
includeZeroDegreeVertices
- whether to output vertices with an
in-degree of zeropublic VertexDegrees<K,VV,EV> setParallelism(int parallelism)
parallelism
- operator parallelismprotected String getAlgorithmName()
GraphAlgorithmWrappingDataSet
getAlgorithmName
in class GraphAlgorithmWrappingDataSet<K,VV,EV,Vertex<K,VertexDegrees.Degrees>>
protected boolean mergeConfiguration(GraphAlgorithmWrappingDataSet other)
GraphAlgorithmWrappingDataSet
mergeConfiguration
in class GraphAlgorithmWrappingDataSet<K,VV,EV,Vertex<K,VertexDegrees.Degrees>>
other
- the algorithm with which to compare and mergepublic org.apache.flink.api.java.DataSet<Vertex<K,VertexDegrees.Degrees>> runInternal(Graph<K,VV,EV> input) throws Exception
GraphAlgorithmWrappingDataSet
GraphAlgorithm.run(Graph)
.runInternal
in class GraphAlgorithmWrappingDataSet<K,VV,EV,Vertex<K,VertexDegrees.Degrees>>
input
- the input graphException
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.