aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala')
-rw-r--r--core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala b/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
index df6ba7d669..1e2f469214 100644
--- a/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala
@@ -68,12 +68,10 @@ private[spark] class AppClient(
// A thread pool for registering with masters. Because registering with a master is a blocking
// action, this thread pool must be able to create "masterRpcAddresses.size" threads at the same
// time so that we can register with all masters.
- private val registerMasterThreadPool = new ThreadPoolExecutor(
- 0,
- masterRpcAddresses.length, // Make sure we can register with all masters at the same time
- 60L, TimeUnit.SECONDS,
- new SynchronousQueue[Runnable](),
- ThreadUtils.namedThreadFactory("appclient-register-master-threadpool"))
+ private val registerMasterThreadPool = ThreadUtils.newDaemonCachedThreadPool(
+ "appclient-register-master-threadpool",
+ masterRpcAddresses.length // Make sure we can register with all masters at the same time
+ )
// A scheduled executor for scheduling the registration actions
private val registrationRetryThread =