You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/10/12 21:26:44 UTC

[GitHub] [beam] rohdesamuel commented on a change in pull request #12984: [BEAM-10994] Add ability for HotKeyLogger to log a key

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



##########
File path: runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/HotKeyLogger.java
##########
@@ -67,11 +72,19 @@ protected boolean isThrottled() {
     return false;
   }
 
-  protected String getHotKeyMessage(String userStepName, String hotKeyAge) {
+  protected String getHotKeyMessage(String userStepName, String hotKeyAge, Object hotkey) {
+    if (hotkey == null) {
+      return MessageFormat.format(

Review comment:
       Done

##########
File path: runners/google-cloud-dataflow-java/worker/src/test/java/org/apache/beam/runners/dataflow/worker/HotKeyLoggerTest.java
##########
@@ -50,11 +50,11 @@ 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");
+    String m = hotKeyLogger.getHotKeyMessage("TEST_STEP_ID", "1s", null);

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