adoroszlai commented on code in PR #4713:
URL: https://github.com/apache/ozone/pull/4713#discussion_r1196785960


##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/commandhandler/CreatePipelineCommandHandler.java:
##########
@@ -67,6 +75,10 @@ public CreatePipelineCommandHandler(ConfigurationSource 
conf) {
   CreatePipelineCommandHandler(
       BiFunction<RaftPeer, GrpcTlsConfig, RaftClient> newRaftClient) {
     this.newRaftClient = newRaftClient;
+    this.executor = Executors.newFixedThreadPool(
+        1, new ThreadFactoryBuilder()
+            .setNameFormat("CreatePipelineCommandHandlerThread-%d").build());
+    this.workQueue = ((ThreadPoolExecutor) this.executor).getQueue();

Review Comment:
   Should we share the same single-threaded executor between 
`CreatePipelineCommandHandler` and `ClosePipelineCommandHandler`?
   
   Also, would be nice to use `MoreExecutors.directExecutor()` for unit tests 
(`TestCreatePipelineCommandHandler`).  Otherwise the test needs to be updated 
to wait for the expected results, since event is now handled in another thread.



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

To unsubscribe, e-mail: [email protected]

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