pyflink.datastream.data_stream.DataStream.set_uid_hash#
- DataStream.set_uid_hash(uid_hash: str) pyflink.datastream.data_stream.DataStream [source]#
Sets an user provided hash for this operator. This will be used AS IS the create the JobVertexID. The user provided hash is an alternative to the generated hashed, that is considered when identifying an operator through the default hash mechanics fails (e.g. because of changes between Flink versions).
Important: this should be used as a workaround or for trouble shooting. The provided hash needs to be unique per transformation and job. Otherwise, job submission will fail. Furthermore, you cannot assign user-specified hash to intermediate nodes in an operator chain and trying so will let your job fail.
A use case for this is in migration between Flink versions or changing the jobs in a way that changes the automatically generated hashes. In this case, providing the previous hashes directly through this method (e.g. obtained from old logs) can help to reestablish a lost mapping from states to their target operator.
- Parameters
uid_hash – The user provided hash for this operator. This will become the jobVertexID, which is shown in the logs and web ui.
- Returns
The operator with the user provided hash.