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

ASF GitHub Bot logged work on HDDS-1207:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 02/Apr/19 21:26
            Start Date: 02/Apr/19 21:26
    Worklog Time Spent: 10m 
      Work Description: arp7 commented on pull request #662: HDDS-1207. 
Refactor Container Report Processing logic and plugin new Replication Manager.
URL: https://github.com/apache/hadoop/pull/662#discussion_r271487930
 
 

 ##########
 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(() -> {
+        try {
+          LOG.info("Replication Monitor Thread will be started" +
+              " in {} milliseconds.", delay);
+          Thread.sleep(delay);
+        } catch (InterruptedException ignored) {
+          // InterruptedException is ignored.
 
 Review comment:
   Set interrupted flag here.
 
----------------------------------------------------------------
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: 222009)
    Time Spent: 50m  (was: 40m)

> Refactor Container Report Processing logic and plugin new Replication Manager
> -----------------------------------------------------------------------------
>
>                 Key: HDDS-1207
>                 URL: https://issues.apache.org/jira/browse/HDDS-1207
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: SCM
>            Reporter: Nanda kumar
>            Assignee: Nanda kumar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> HDDS-1205 brings in new ReplicationManager, this Jira is to refactor 
> ContainerReportProcessing logic in SCM so that it complements 
> ReplicationManager and plugin the new ReplicationManager code. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to