ndimiduk commented on a change in pull request #2196:
URL: https://github.com/apache/hbase/pull/2196#discussion_r465984755



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java
##########
@@ -200,70 +201,7 @@ public static ThreadPoolExecutor 
getBoundedCachedThreadPool(
   public static ThreadPoolExecutor getBoundedCachedThreadPool(int 
maxCachedThread, long timeout,

Review comment:
       I wonder if these `getBoundedCachedThreadPool` methods could be replace 
to calls to methods directly on `java.util.concurrent.Executors`. I think we'd 
need to evaluate on a case-by-case basis how the resulting pools are being used 
and if they're constructed to correctly match the use-case.

##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/procedure/SimpleRSProcedureManager.java
##########
@@ -125,9 +125,8 @@ public Subprocedure buildSubprocedure(String name, byte[] 
data) {
 
     public SimpleSubprocedurePool(String name, Configuration conf) {
       this.name = name;
-      executor = new ThreadPoolExecutor(1, 1, 500,
-          TimeUnit.SECONDS, new LinkedBlockingQueue<>(),
-          Threads.newDaemonThreadFactory("rs(" + name + ")-procedure"));
+      executor = new ThreadPoolExecutor(1, 1, 500, TimeUnit.SECONDS, new 
LinkedBlockingQueue<>(),

Review comment:
       This is a bizarre instantiation, don't you think? keep-alive of 500 
seconds? in a test? Maybe this can be just 
`Executors.newSingleThreadExecutor()`.




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


Reply via email to