lokeshj1703 commented on a change in pull request #714: HDDS-1406. Avoid usage 
of commonPool in RatisPipelineUtils.
URL: https://github.com/apache/hadoop/pull/714#discussion_r274560102
 
 

 ##########
 File path: 
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/RatisPipelineUtils.java
 ##########
 @@ -51,6 +52,15 @@
   private static final Logger LOG =
       LoggerFactory.getLogger(RatisPipelineUtils.class);
 
+  // Set parallelism at 3, as now in Ratis we create 1 and 3 node pipelines.
+  private static int parallelismForPool =
+      (Runtime.getRuntime().availableProcessors() > 3) ? 3 :
+          Runtime.getRuntime().availableProcessors();
+
+  private static ForkJoinPool pool = new ForkJoinPool(parallelismForPool);
 
 Review comment:
   We can use three threads as these threads would ultimately be blocked on 
network IO and will not be CPU intensive. Also we need to shutdown the fork 
join pool.

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

Reply via email to