ArvinZheng commented on a change in pull request #10280:
URL: https://github.com/apache/druid/pull/10280#discussion_r486761307



##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       updated

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -483,6 +487,24 @@ public void moveSegment(
     }
   }
 
+  /**
+   * This method should be used for only testing.
+   */
+  @VisibleForTesting
+  public int getCachedBalancerThreadNumber()
+  {
+    return cachedBalancerThreadNumber;
+  }
+
+  /**
+   * This method should be used for only testing.

Review comment:
       addressed

##########
File path: 
server/src/main/java/org/apache/druid/server/coordinator/DruidCoordinator.java
##########
@@ -647,22 +678,53 @@ private void stopBeingLeader()
     return ImmutableList.of(compactSegments);
   }
 
-  private class DutiesRunnable implements Runnable
+  protected class DutiesRunnable implements Runnable

Review comment:
       added, and thanks for your time.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to