arunpandianp commented on code in PR #36283:
URL: https://github.com/apache/beam/pull/36283#discussion_r2378355808


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/state/WindmillStateTagUtil.java:
##########
@@ -65,6 +70,42 @@ static ByteString encodeKey(StateNamespace namespace, 
StateTag<?> address) {
     }
   }
 
+  /**
+   * Produce a state tag that is guaranteed to be unique for the given timer, 
to add a watermark
+   * hold that is only freed after the timer fires.
+   */
+  public ByteString timerHoldTag(WindmillNamespacePrefix prefix, TimerData 
timerData) {
+    String tagString;
+    if ("".equals(timerData.getTimerFamilyId())) {

Review Comment:
   Moved code happy to change it separately.
   IIUC this is to avoid NullpointerException if getTimerFamilyId is null. 
   
   :update: looks like getTimerFamilyId should be non null here, so empty() is 
better



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to