ayushtkn commented on a change in pull request #2833:
URL: https://github.com/apache/hadoop/pull/2833#discussion_r606714508



##########
File path: hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
##########
@@ -873,6 +873,22 @@
   </description>
 </property>
 
+<property>
+  <name>dfs.datanode.reconcile.blocks.batch.size</name>
+  <value>1000</value>
+  <description>Run reconcile to checkAndUpdate with batch,

Review comment:
       can you add some recheck the descriptions for both the configs, the 
first line in. both is same, and doesn't make sense to me, recheck once.

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DirectoryScanner.java
##########
@@ -316,6 +317,18 @@ public DirectoryScanner(FsDatasetSpi<?> dataset, 
Configuration conf) {
 
     masterThread =
         new ScheduledThreadPoolExecutor(1, new Daemon.DaemonFactory());
+
+    reconcileBlocksBatchSize =
+        conf.getInt(DFSConfigKeys.
+                DFS_DATANODE_RECONCILE_BLOCKS_BATCH_SIZE,
+            DFSConfigKeys.
+                DFS_DATANODE_RECONCILE_BLOCKS_BATCH_SIZE_DEFAULT);
+
+    reconcileBlocksBatchInterval =
+        conf.getInt(DFSConfigKeys.
+                DFS_DATANODE_RECONCILE_BLOCKS_BATCH_INTERVAL,
+            DFSConfigKeys.
+                DFS_DATANODE_RECONCILE_BLOCKS_BATCH_INTERVAL_DEFAULT);

Review comment:
       Add a validation for these configs, if ``reconcileBlocksBatchSize`` and 
``reconcileBlocksBatchInterval`` is less than one use default. and add a warn 
log message if these values are incorrect something like:
   Invalid value configured for < config name>, should be greater than 0, Using 
default.
   
   In the end add an Info log for the values being used.
   

##########
File path: 
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSConfigKeys.java
##########
@@ -836,6 +836,10 @@
   public static final int     DFS_DATANODE_DIRECTORYSCAN_INTERVAL_DEFAULT = 
21600;
   public static final String  DFS_DATANODE_DIRECTORYSCAN_THREADS_KEY = 
"dfs.datanode.directoryscan.threads";
   public static final int     DFS_DATANODE_DIRECTORYSCAN_THREADS_DEFAULT = 1;
+  public static final String  DFS_DATANODE_RECONCILE_BLOCKS_BATCH_SIZE = 
"dfs.datanode.reconcile.blocks.batch.size";
+  public static final int     DFS_DATANODE_RECONCILE_BLOCKS_BATCH_SIZE_DEFAULT 
= 1000;
+  public static final String  DFS_DATANODE_RECONCILE_BLOCKS_BATCH_INTERVAL = 
"dfs.datanode.reconcile.blocks.batch.interval";
+  public static final int     
DFS_DATANODE_RECONCILE_BLOCKS_BATCH_INTERVAL_DEFAULT = 2000;

Review comment:
       Can we add support for time units?




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



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