diff --git a/samza-core/src/main/java/org/apache/samza/task/DefaultTaskExecutorFactory.java b/samza-core/src/main/java/org/apache/samza/task/DefaultTaskExecutorFactory.java index 5ed5165c1d..5ea0fb3170 100644 --- a/samza-core/src/main/java/org/apache/samza/task/DefaultTaskExecutorFactory.java +++ b/samza-core/src/main/java/org/apache/samza/task/DefaultTaskExecutorFactory.java @@ -68,7 +68,9 @@ public ExecutorService getOperatorExecutor(TaskName taskName, Config config) { } else { LOG.info("Using single threaded thread pool as operator thread pool for task {}", key.getTaskName()); operatorExecutor = Executors.newSingleThreadExecutor( - new ThreadFactoryBuilder().setNameFormat("Samza " + key.getTaskName() + " Thread-%d").build()); + new ThreadFactoryBuilder().setNameFormat("Samza " + key.getTaskName() + " Thread-%d") + .setDaemon(true) + .build()); } return operatorExecutor;