sodonnel commented on a change in pull request #1028: HDFS-14617 - Improve 
fsimage load time by writing sub-sections to the fsimage index

 File path: 
 @@ -294,6 +368,19 @@ public int compare(FileSummary.Section s1, 
FileSummary.Section s2) {
        * a particular step to be started for once.
       Step currentStep = null;
+      boolean loadInParallel =
+          conf.getBoolean(DFSConfigKeys.DFS_IMAGE_PARALLEL_LOAD_KEY,
+      // TODO - check for compression and if enabled disable parallel
+      ExecutorService executorService = null;
+      ArrayList<FileSummary.Section> subSections =
+          getAndRemoveSubSections(sections);
+      if (loadInParallel) {
+        executorService = Executors.newFixedThreadPool(
+            conf.getInt(DFSConfigKeys.DFS_IMAGE_PARALLEL_THREADS_KEY,
 Review comment:
   I added a log message here, and validated the thread count setting is not 
less than 1, otherwise I reset it to the default (4). I also pulled the code to 
do this check and to create the executor into a private method to reduce the 
noise in the already too long loadInternal method.

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:

With regards,
Apache Git Services

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to