This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 778b5440b [CELEBORN-556][BUG] ReserveSlot should not use default RPC
time out since register shuffle max timeout is network timeout (#1461)
778b5440b is described below
commit 778b5440bc788278c68e40c6d4a6db6e4119ee52
Author: Angerszhuuuu <[email protected]>
AuthorDate: Wed May 10 12:29:06 2023 +0800
[CELEBORN-556][BUG] ReserveSlot should not use default RPC time out since
register shuffle max timeout is network timeout (#1461)
---
.../apache/celeborn/client/LifecycleManager.scala | 2 +-
.../org/apache/celeborn/common/CelebornConf.scala | 47 +++++++++++++++-------
docs/configuration/client.md | 1 +
3 files changed, 34 insertions(+), 16 deletions(-)
diff --git
a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
index 832521979..3c14c2070 100644
--- a/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
+++ b/client/src/main/scala/org/apache/celeborn/client/LifecycleManager.scala
@@ -1046,7 +1046,7 @@ class LifecycleManager(appId: String, val conf:
CelebornConf) extends RpcEndpoin
message: ReserveSlots): ReserveSlotsResponse = {
val shuffleKey = Utils.makeShuffleKey(message.applicationId,
message.shuffleId)
try {
- endpoint.askSync[ReserveSlotsResponse](message)
+ endpoint.askSync[ReserveSlotsResponse](message,
conf.reserveSlotsRpcTimeout)
} catch {
case e: Exception =>
val msg = s"Exception when askSync ReserveSlots for $shuffleKey " +
diff --git
a/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
b/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
index b6bc03ec5..299dcaadb 100644
--- a/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
+++ b/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
@@ -654,6 +654,30 @@ class CelebornConf(loadDefaults: Boolean) extends
Cloneable with Logging with Se
def quotaUserSpecificTenant: String = get(QUOTA_USER_SPECIFIC_TENANT)
def quotaUserSpecificUserName: String = get(QUOTA_USER_SPECIFIC_USERNAME)
+ // //////////////////////////////////////////////////////
+ // Shuffle Client RPC //
+ // //////////////////////////////////////////////////////
+ def reserveSlotsRpcTimeout: RpcTimeout =
+ new RpcTimeout(get(RESERVE_SLOTS_RPC_TIMEOUT).milli,
RESERVE_SLOTS_RPC_TIMEOUT.key)
+
+ def registerShuffleRpcAskTimeout: RpcTimeout =
+ new RpcTimeout(
+ get(REGISTER_SHUFFLE_RPC_ASK_TIMEOUT).map(_.milli)
+ .getOrElse(reserveSlotsRpcTimeout.duration * (reserveSlotsMaxRetries +
2)),
+ REGISTER_SHUFFLE_RPC_ASK_TIMEOUT.key)
+
+ def requestPartitionLocationRpcAskTimeout: RpcTimeout =
+ new RpcTimeout(
+ get(REQUEST_PARTITION_LOCATION_RPC_ASK_TIMEOUT).map(_.milli)
+ .getOrElse(rpcAskTimeout.duration * (reserveSlotsMaxRetries + 1)),
+ REQUEST_PARTITION_LOCATION_RPC_ASK_TIMEOUT.key)
+
+ def getReducerFileGroupRpcAskTimeout: RpcTimeout =
+ new RpcTimeout(
+ get(GET_REDUCER_FILE_GROUP_RPC_ASK_TIMEOUT).map(_.milli)
+ .getOrElse(rpcAskTimeout.duration * (requestCommitFilesMaxRetries +
2)),
+ GET_REDUCER_FILE_GROUP_RPC_ASK_TIMEOUT.key)
+
// //////////////////////////////////////////////////////
// Shuffle Client Fetch //
// //////////////////////////////////////////////////////
@@ -706,21 +730,6 @@ class CelebornConf(loadDefaults: Boolean) extends
Cloneable with Logging with Se
def pushDataTimeoutMs: Long = get(PUSH_DATA_TIMEOUT)
def pushDataTimeoutCheckerThreads: Int = get(PUSH_TIMEOUT_CHECK_THREADS)
def pushTimeoutCheckInterval: Long = get(PUSH_TIMEOUT_CHECK_INTERVAL)
- def registerShuffleRpcAskTimeout: RpcTimeout =
- new RpcTimeout(
- get(REGISTER_SHUFFLE_RPC_ASK_TIMEOUT).map(_.milli)
- .getOrElse(rpcAskTimeout.duration * (reserveSlotsMaxRetries + 2)),
- REGISTER_SHUFFLE_RPC_ASK_TIMEOUT.key)
- def requestPartitionLocationRpcAskTimeout: RpcTimeout =
- new RpcTimeout(
- get(REQUEST_PARTITION_LOCATION_RPC_ASK_TIMEOUT).map(_.milli)
- .getOrElse(rpcAskTimeout.duration * (reserveSlotsMaxRetries + 1)),
- REQUEST_PARTITION_LOCATION_RPC_ASK_TIMEOUT.key)
- def getReducerFileGroupRpcAskTimeout: RpcTimeout =
- new RpcTimeout(
- get(GET_REDUCER_FILE_GROUP_RPC_ASK_TIMEOUT).map(_.milli)
- .getOrElse(rpcAskTimeout.duration * (requestCommitFilesMaxRetries +
2)),
- GET_REDUCER_FILE_GROUP_RPC_ASK_TIMEOUT.key)
// //////////////////////////////////////////////////////
// Graceful Shutdown & Recover //
@@ -2494,6 +2503,14 @@ object CelebornConf extends Logging {
.timeConf(TimeUnit.MILLISECONDS)
.createWithDefaultString("5s")
+ val RESERVE_SLOTS_RPC_TIMEOUT: ConfigEntry[Long] =
+ buildConf("celeborn.rpc.reserveSlots.askTimeout")
+ .categories("client")
+ .version("0.3.0")
+ .doc("Timeout for LifecycleManager request reserve slots.")
+ .timeConf(TimeUnit.MILLISECONDS)
+ .createWithDefaultString("30s")
+
val REGISTER_SHUFFLE_RPC_ASK_TIMEOUT: OptionalConfigEntry[Long] =
buildConf("celeborn.rpc.registerShuffle.askTimeout")
.categories("client")
diff --git a/docs/configuration/client.md b/docs/configuration/client.md
index babfc1b02..24671d666 100644
--- a/docs/configuration/client.md
+++ b/docs/configuration/client.md
@@ -55,6 +55,7 @@ license: |
| celeborn.rpc.registerShuffle.askTimeout | <undefined> | Timeout for
ask operations during register shuffle. Default value should be
`celeborn.rpc.askTimeout * (celeborn.slots.reserve.maxRetries + 1 + 1)`. |
0.2.0 |
| celeborn.rpc.requestCommitFiles.maxRetries | 2 | Max retry times for
requestCommitFiles RPC. | 1.0.0 |
| celeborn.rpc.requestPartition.askTimeout | <undefined> | Timeout for
ask operations during request change partition location, such as revive or
split partition. Default value should be `celeborn.rpc.askTimeout *
(celeborn.slots.reserve.maxRetries + 1)`. | 0.2.0 |
+| celeborn.rpc.reserveSlots.askTimeout | 30s | Timeout for LifecycleManager
request reserve slots. | 0.3.0 |
| celeborn.shuffle.batchHandleChangePartition.enabled | false | When true,
LifecycleManager will handle change partition request in batch. Otherwise,
LifecycleManager will process the requests one by one | 0.2.0 |
| celeborn.shuffle.batchHandleChangePartition.interval | 100ms | Interval for
LifecycleManager to schedule handling change partition requests in batch. |
0.2.0 |
| celeborn.shuffle.batchHandleChangePartition.threads | 8 | Threads number for
LifecycleManager to handle change partition request in batch. | 0.2.0 |