NealSun96 commented on a change in pull request #973:
URL: https://github.com/apache/helix/pull/973#discussion_r420248398



##########
File path: 
helix-core/src/main/java/org/apache/helix/task/TaskStateModelFactory.java
##########
@@ -41,23 +47,15 @@
 
   private final HelixManager _manager;
   private final Map<String, TaskFactory> _taskFactoryRegistry;
-  private final ScheduledExecutorService _taskExecutor;
+  private ScheduledExecutorService _taskExecutor;
   private final ScheduledExecutorService _timerTaskExecutor;
   private ThreadPoolExecutorMonitor _monitor;
-  public final static int TASK_THREADPOOL_SIZE = 40;
 
   public TaskStateModelFactory(HelixManager manager, Map<String, TaskFactory> 
taskFactoryRegistry) {
-    this(manager, taskFactoryRegistry,
-        Executors.newScheduledThreadPool(TASK_THREADPOOL_SIZE, new 
ThreadFactory() {
-          private AtomicInteger threadId = new AtomicInteger(0);
-
-          @Override
-          public Thread newThread(Runnable r) {
-            return new Thread(r, "TaskStateModelFactory-task_thread-" + 
threadId.getAndIncrement());
-          }
-        }));
+    this(manager, taskFactoryRegistry, null);
   }
 
+  // This constructor is only for internal usage. Do not use!

Review comment:
       We talked about this in an early meeting, how we want to not let users 
to use this constructor, therefore I added this comment. 
   However, I realized that with this constructor, we actually cannot set 
`CURRENT_TASK_THREAD_POOL_SIZE`, because we can't get the pool size. I'm now 
more inclined to disable this constructor altogether. @jiajunwang @narendly 




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to