arp7 commented on a change in pull request #662: HDDS-1207. Refactor Container 
Report Processing logic and plugin new Replication Manager.
URL: https://github.com/apache/hadoop/pull/662#discussion_r271487673
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
 ##########
 @@ -160,15 +161,43 @@ public ReplicationManager(final Configuration conf,
    * Starts Replication Monitor thread.
    */
   public synchronized void start() {
+    start(0);
+  }
+
+  /**
+   * Starts Replication Monitor thread after the given initial delay.
+   *
+   * @param delay initial delay in milliseconds
+   */
+  public void start(final long delay) {
     if (!running) {
-      LOG.info("Starting Replication Monitor Thread.");
       running = true;
-      replicationMonitor.start();
+      CompletableFuture.runAsync(() -> {
 
 Review comment:
   Don't use the forkJoin commonPool. It has very few threads and can be easily 
exhausted. We saw this to be a frequent issue in unit tests.
   
   Instead use the overload that accepts an Executor.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to