title: Apache Flink Set Operator Uid vs UidHash
body: <p>I'm using Apache Flink 1.2.0. According to Production Readiness Checklist (<a href="https://ci.apache.org/projects/flink/flink-docs-release-1.2/ops/production_ready.html" rel="nofollow noreferrer">https://ci.apache.org/projects/flink/flink-docs-release-1.2/ops/production_ready.html</a>) it is recommended to set Uids for operators to ensure compatibility for savepoints.<br>
  I couldn't find the setUid() method for a flatMap but I found uid() and  setUidHash() which according to doc. says  </p>
  
  <p>uid</p>
  
  <pre><code>"Sets an ID for this operator.
  
  The specified ID is used to assign the same operator ID across job submissions (for example when starting a job from a savepoint)."
  </code></pre>
  
  <p>uidHash</p>
  
  <pre><code>"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 hashes, that is considered when identifying an operator through the default hash mechanics fails (e.g. because of changes between Flink versions)."
  </code></pre>
  
  <p>Which one actually should be set on a flatMap for example uid() or setUidHash()? Or both?</p>