You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@uniffle.apache.org by GitBox <gi...@apache.org> on 2022/08/03 12:48:46 UTC
[GitHub] [incubator-uniffle] jerqi commented on a diff in pull request #121: [Improvement] Set heartBeatExecutorService as daemon thread
jerqi commented on code in PR #121:
URL: https://github.com/apache/incubator-uniffle/pull/121#discussion_r936620909
##########
server/src/main/java/org/apache/uniffle/server/storage/LocalStorageManager.java:
##########
@@ -81,7 +82,8 @@ public class LocalStorageManager extends SingleStorageManager {
// We must make sure the order of `storageBasePaths` and `localStorages` is same, or some unit test may be fail
CountDownLatch countDownLatch = new CountDownLatch(storageBasePaths.length);
AtomicInteger successCount = new AtomicInteger();
- ExecutorService executorService = Executors.newCachedThreadPool();
+ ExecutorService executorService = Executors.newCachedThreadPool(
Review Comment:
This is a temporary thread pool. I think it's unnecessary to be a daemon thread pool.WDYT?
##########
client-mr/src/main/java/org/apache/hadoop/mapred/SortWriteBufferManager.java:
##########
@@ -321,7 +321,7 @@ ShuffleBlockInfo createShuffleBlock(SortWriteBuffer wb) {
}
protected void sendCommit() {
- ExecutorService executor = Executors.newSingleThreadExecutor();
+ ExecutorService executor = Executors.newSingleThreadExecutor(ThreadUtils.getThreadFactory("bufferManagerSend-%d"));
Review Comment:
This is a temporary thread pool. I think it's unnecessary to be a daemon thread pool.WDYT?
##########
server/src/test/java/org/apache/uniffle/server/ShuffleServerMetricsTest.java:
##########
@@ -150,7 +151,8 @@ public void testGrpcMetrics() throws Exception {
@Test
public void testServerMetricsConcurrently() throws Exception {
- ExecutorService executorService = Executors.newFixedThreadPool(3);
+ ExecutorService executorService = Executors.newCachedThreadPool(
Review Comment:
This is a temporary thread pool. I think it's unnecessary to be a daemon thread pool.WDYT?
##########
client-spark/spark3/src/main/java/org/apache/spark/shuffle/writer/RssShuffleWriter.java:
##########
@@ -244,7 +245,7 @@ protected void checkBlockSendResult(Set<Long> blockIds) throws RuntimeException
@VisibleForTesting
protected void sendCommit() {
- ExecutorService executor = Executors.newSingleThreadExecutor();
+ ExecutorService executor = Executors.newSingleThreadExecutor(ThreadUtils.getThreadFactory("sendCommit-%d"));
Review Comment:
This is a temporary thread pool. I think it's unnecessary to be a daemon thread pool.WDYT?
--
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: issues-unsubscribe@uniffle.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@uniffle.apache.org
For additional commands, e-mail: issues-help@uniffle.apache.org