K - ID typeVV - vertex value typeEV - edge value typeR - result typepublic abstract class GraphAlgorithmWrappingBase<K,VV,EV,R> extends Object implements GraphAlgorithm<K,VV,EV,R>
GraphAlgorithm transforms an input Graph into an output of
type T. Subclasses of GraphAlgorithmWrappingBase wrap the
output with a NoOpOperator. The input to the wrapped operators can
be replaced when the same algorithm is run on the same input with a
mergeable configuration. This allows algorithms to be composed of implicitly
reusable algorithms without publicly sharing intermediate DataSets.| Modifier and Type | Field and Description |
|---|---|
protected int |
parallelism |
| Constructor and Description |
|---|
GraphAlgorithmWrappingBase() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canMergeConfigurationWith(GraphAlgorithmWrappingBase other)
First test whether the algorithm configurations can be merged before the
call to
mergeConfiguration(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase). |
String |
getAlgorithmName()
Algorithms are identified by name rather than by class to allow subclassing.
|
protected void |
mergeConfiguration(GraphAlgorithmWrappingBase other)
Merge the other configuration into this algorithm's after the call to
canMergeConfigurationWith(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase) has checked that the configurations
can be merged. |
GraphAlgorithmWrappingBase<K,VV,EV,R> |
setParallelism(int parallelism)
Set the parallelism for this algorithm's operators.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunpublic GraphAlgorithmWrappingBase<K,VV,EV,R> setParallelism(int parallelism)
Operator parallelism should be set to this given value unless processing asymptotically more data, in which case the default job parallelism should be inherited.
parallelism - operator parallelismpublic String getAlgorithmName()
protected boolean canMergeConfigurationWith(GraphAlgorithmWrappingBase other)
mergeConfiguration(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase).other - the algorithm with which to compare configurationmergeConfiguration(GraphAlgorithmWrappingBase)protected void mergeConfiguration(GraphAlgorithmWrappingBase other)
canMergeConfigurationWith(org.apache.flink.graph.utils.proxy.GraphAlgorithmWrappingBase) has checked that the configurations
can be merged.other - the algorithm from which to merge configurationcanMergeConfigurationWith(GraphAlgorithmWrappingBase)Copyright © 2014–2019 The Apache Software Foundation. All rights reserved.