Class StreamGraphUserHashHasher
java.lang.Object
org.apache.flink.streaming.api.graph.StreamGraphUserHashHasher
- All Implemented Interfaces:
StreamGraphHasher
StreamGraphHasher that works with user provided hashes. This is useful in case we want to set
(alternative) hashes explicitly, e.g. to provide a way of manual backwards compatibility between
versions when the mechanism of generating hashes has changed in an incompatible way.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangenerateHashesByStreamNodeId(int streamNodeId, StreamGraph streamGraph, Map<Integer, byte[]> hashes) Generates a hash forStreamNodewith the specified stream node id in theStreamGraph.traverseStreamGraphAndGenerateHashes(StreamGraph streamGraph) Returns a map with a hash for eachStreamNodeof theStreamGraph.
-
Constructor Details
-
StreamGraphUserHashHasher
public StreamGraphUserHashHasher()
-
-
Method Details
-
traverseStreamGraphAndGenerateHashes
Description copied from interface:StreamGraphHasherReturns a map with a hash for eachStreamNodeof theStreamGraph. The hash is used as theJobVertexIDin order to identify nodes across job submissions if they didn't change.- Specified by:
traverseStreamGraphAndGenerateHashesin interfaceStreamGraphHasher
-
generateHashesByStreamNodeId
public boolean generateHashesByStreamNodeId(int streamNodeId, StreamGraph streamGraph, Map<Integer, byte[]> hashes) Description copied from interface:StreamGraphHasherGenerates a hash forStreamNodewith the specified stream node id in theStreamGraph. This hash is stored in the provided map and can be used to uniquely identify theStreamNodeacross job submissions, assuming its configuration remains unchanged.- Specified by:
generateHashesByStreamNodeIdin interfaceStreamGraphHasher
-