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



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/StreamingDataflowWorker.java
##########
@@ -1384,6 +1374,17 @@ private void process(
       Object executionKey =
           keyCoder == null ? null : keyCoder.decode(key.newInput(), 
Coder.Context.OUTER);
 
+      if (workItem.hasHotKeyInfo()) {
+        Windmill.HotKeyInfo hotKeyInfo = workItem.getHotKeyInfo();
+        Duration hotKeyAge = Duration.millis(hotKeyInfo.getHotKeyAgeUsec() / 
1000);
+
+        // The MapTask instruction is ordered by dependencies, such that the 
first element is
+        // always going to be the shuffle task.
+        String stepName = 
computationState.getMapTask().getInstructions().get(0).getName();
+        Object hotkey = options.isHotKeyLoggingEnabled() ? executionKey : null;
+        hotKeyLogger.logHotKeyDetection(stepName, hotKeyAge, hotkey);

Review comment:
       Done




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to