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

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

                Author: ASF GitHub Bot
            Created on: 13/Oct/20 18:12
            Start Date: 13/Oct/20 18:12
    Worklog Time Spent: 10m 
      Work Description: rohdesamuel commented on a change in pull request 
#12984:
URL: https://github.com/apache/beam/pull/12984#discussion_r504158869



##########
File path: 
runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/HotKeyLoggerTest.java
##########
@@ -50,18 +45,29 @@ public void SetUp() {
   }
 
   @Test
-  public void correctHotKeyMessage() {
+  public void correctHotKeyMessageWithoutKey() {
     HotKeyLogger hotKeyLogger = new HotKeyLogger(clock);
 
-    assertFalse(hotKeyLogger.isThrottled());
-    String m = hotKeyLogger.getHotKeyMessage("TEST_STEP_ID", "1s");
+    hotKeyLogger.logHotKeyDetection("TEST_STEP_ID", 
Duration.standardSeconds(1));
     assertTrue(hotKeyLogger.isThrottled());
 
-    assertEquals(
+    expectedLogs.verifyWarn(
         "A hot key was detected in step 'TEST_STEP_ID' with age of '1s'. This 
is a "
             + "symptom of key distribution being skewed. To fix, please 
inspect your data and "
-            + "pipeline to ensure that elements are evenly distributed across 
your key space.",
-        m);
+            + "pipeline to ensure that elements are evenly distributed across 
your key space.");
+  }
+
+  @Test
+  public void correctHotKeyMessageWithKey() {

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:
[email protected]


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

    Worklog Id:     (was: 500218)
    Time Spent: 3.5h  (was: 3h 20m)

> 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: 3.5h
>  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