Skip to content

Commit f3e40ba

Browse files
author
“shenghui361”
committed
Fix create worker process timeout #13771
1 parent cf79c78 commit f3e40ba

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

core/common/src/main/java/alluxio/conf/PropertyKey.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,6 +3508,13 @@ public String toString() {
35083508
.setConsistencyCheckLevel(ConsistencyCheckLevel.WARN)
35093509
.setScope(Scope.WORKER)
35103510
.build();
3511+
public static final PropertyKey WORKER_REGISTRY_GET_TIMEOUT_MS =
3512+
new Builder(Name.WORKER_REGISTRY_GET_TIMEOUT_MS)
3513+
.setDefaultValue("600000")
3514+
.setDescription("The timeout of getting a worker from the registry.")
3515+
.setConsistencyCheckLevel(ConsistencyCheckLevel.IGNORE)
3516+
.setScope(Scope.WORKER)
3517+
.build();
35113518

35123519
//
35133520
// Proxy related properties
@@ -5935,6 +5942,8 @@ public static final class Name {
59355942
"alluxio.worker.ufs.instream.cache.enabled";
59365943
public static final String WORKER_UFS_INSTREAM_CACHE_MAX_SIZE =
59375944
"alluxio.worker.ufs.instream.cache.max.size";
5945+
public static final String WORKER_REGISTRY_GET_TIMEOUT_MS =
5946+
"alluxio.worker.registry.get.timeout";
59385947

59395948
//
59405949
// Proxy related properties

core/server/worker/src/main/java/alluxio/worker/AlluxioWorkerProcess.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public final class AlluxioWorkerProcess implements WorkerProcess {
116116
// registered at worker registry, so the maximum timeout here is set to the multiply of
117117
// the number of factories by the default timeout of getting a worker from the registry.
118118
CommonUtils.invokeAll(callables,
119-
(long) callables.size() * 10 * Constants.DEFAULT_REGISTRY_GET_TIMEOUT_MS);
119+
(long) callables.size() * ServerConfiguration.getLong(PropertyKey.WORKER_REGISTRY_GET_TIMEOUT_MS));
120120

121121
// Setup web server
122122
mWebServer =

0 commit comments

Comments
 (0)