ArafatKhan2198 commented on PR #5447: URL: https://github.com/apache/ozone/pull/5447#issuecomment-1770945716
Can we use a thread factory here right? https://github.com/apache/ozone/blob/db19fd5b2a34895e39d42f7a63db3ac4af20d176/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/upgrade/FinalizationManagerImpl.java#L151 ``` public void onLeaderReady() { // Create a custom thread factory to set the thread name. ThreadFactory threadFactory = new ThreadFactory() { @Override public Thread newThread(Runnable r) { Thread thread = Executors.defaultThreadFactory().newThread(r); thread.setName("UpgradeFinalizationThread"+threadPrefix); // Set the thread name here return thread; } }; Executors.newSingleThreadExecutor(threadFactory).submit(() -> { // Rest of the code }); } ``` -- 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]
