jojochuang commented on a change in pull request #1028: HDFS-14617 - Improve
fsimage load time by writing sub-sections to the fsimage index
URL: https://github.com/apache/hadoop/pull/1028#discussion_r311837303
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSImageFormatProtobuf.java
##########
@@ -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,
+ DFSConfigKeys.DFS_IMAGE_PARALLEL_LOAD_DEFAULT);
+ // 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,
+ DFSConfigKeys.DFS_IMAGE_PARALLEL_THREADS_DEFAULT));
Review comment:
nice to have: log an info message stating that parallel image loading is
enabled and the number of threads used.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]