hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] elek commented on a change in pull request #773: HDDS-1469. Generate default configuration fragments based on annotations
Date Fri, 26 Apr 2019 09:52:28 GMT
elek commented on a change in pull request #773: HDDS-1469. Generate default configuration
fragments based on annotations
URL: https://github.com/apache/hadoop/pull/773#discussion_r278882360
 
 

 ##########
 File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/ReplicationManager.java
 ##########
 @@ -754,4 +747,64 @@ private InflightAction(final DatanodeDetails datanode,
       this.time = time;
     }
   }
+
+  /**
+   * Configuration used by the Replication Manager.
+   */
+  @ConfigGroup(prefix = "hdds.scm.replication")
+  public static class ReplicationManagerConfiguration {
+    /**
+     * The frequency in which ReplicationMonitor thread should run.
+     */
+    private long interval = 5 * 60 * 1000;
+
+    /**
+     * Timeout for container replication & deletion command issued by
+     * ReplicationManager.
+     */
+    private long eventTimeout = 10 * 60 * 1000;
+
+    @Config(key = "thread.interval",
+        type = ConfigType.TIME,
+        defaultValue = "3s",
+        tags = {SCM, OZONE},
+        description = "When a heartbeat from the data node arrives on SCM, "
+            + "It is queued for processing with the time stamp of when the "
 
 Review comment:
   We use it (conf.getInterval())
   
   ```
    /**
      * ReplicationMonitor thread runnable. This wakes up at configured
      * interval and processes all the containers in the system.
      */
     private synchronized void run() {
       try {
         while (running) {
           final long start = Time.monotonicNow();
           final Set<ContainerID> containerIds =
               containerManager.getContainerIDs();
           containerIds.forEach(this::processContainer);
   
           LOG.info("Replication Monitor Thread took {} milliseconds for" +
                   " processing {} containers.", Time.monotonicNow() - start,
               containerIds.size());
   
           wait(conf.getInterval());
         }
       } catch (Throwable t) {
         // When we get runtime exception, we should terminate SCM.
         LOG.error("Exception in Replication Monitor Thread.", t);
         ExitUtil.terminate(1, t);
       }
     }
   ```

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


With regards,
Apache Git Services

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


Mime
View raw message