[ 
https://issues.apache.org/jira/browse/BEAM-10994?focusedWorklogId=500205&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-500205
 ]

ASF GitHub Bot logged work on BEAM-10994:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Oct/20 17:49
            Start Date: 13/Oct/20 17:49
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #12986:
URL: https://github.com/apache/beam/pull/12986#discussion_r504144683



##########
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:
       See my earlier comment on #12984  about assuming that `key == null` is 
the same thing as not present.




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 500205)
    Time Spent: 2h 50m  (was: 2h 40m)

> Add Hot Key Logging in Dataflow Runner
> --------------------------------------
>
>                 Key: BEAM-10994
>                 URL: https://issues.apache.org/jira/browse/BEAM-10994
>             Project: Beam
>          Issue Type: New Feature
>          Components: runner-dataflow
>            Reporter: Sam Rohde
>            Assignee: Sam Rohde
>            Priority: P2
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
> This adds the ability for users to enable the logging of hot key content.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to