rohdesamuel commented on a change in pull request #12985:
URL: https://github.com/apache/beam/pull/12985#discussion_r504183219



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/DataflowWorkProgressUpdater.java
##########
@@ -103,9 +112,17 @@ protected void reportProgressHelper() throws Exception {
       if (result.getHotKeyDetection() != null
           && result.getHotKeyDetection().getUserStepName() != null) {
         HotKeyDetection hotKeyDetection = result.getHotKeyDetection();
+
+        // The key set the in BatchModeExecutionContext is only set in the 
GroupingShuffleReader
+        // which is the correct key. The key is also translated into a Java 
object in the reader.
+        Object hotkey =
+            options.isHotKeyLoggingEnabled()
+                ? workItemStatusClient.getExecutionContext().getKey()
+                : null;

Review comment:
       In the BatchModeExecutionContext the getKey method's comment states "If 
there is not a currently defined key, returns null." Is this an error? Do you 
want me to update the comment?




----------------------------------------------------------------
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.

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


Reply via email to