You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@celeborn.apache.org by GitBox <gi...@apache.org> on 2022/12/01 02:35:53 UTC

[GitHub] [incubator-celeborn] AngersZhuuuu commented on a diff in pull request #1031: [CELEBORN-86][REFATCOR] Register shuffle should have separated timeout configuration

AngersZhuuuu commented on code in PR #1031:
URL: https://github.com/apache/incubator-celeborn/pull/1031#discussion_r1036635382


##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -376,10 +376,16 @@ class CelebornConf(loadDefaults: Boolean) extends Cloneable with Logging with Se
   def rpcConnectThreads: Int = get(RPC_CONNECT_THREADS)
   def rpcLookupTimeout: RpcTimeout =
     new RpcTimeout(get(RPC_LOOKUP_TIMEOUT).milli, RPC_LOOKUP_TIMEOUT.key)
-  def rpcAskTimeout: RpcTimeout =
-    new RpcTimeout(get(RPC_ASK_TIMEOUT).milli, RPC_ASK_TIMEOUT.key)
-  def clientRpcAskTimeout: RpcTimeout =
-    new RpcTimeout(get(CLIENT_RPC_ASK_TIMEOUT).milli, CLIENT_RPC_ASK_TIMEOUT.key)
+  def rpcAskTimeout(func: String = "default"): RpcTimeout = {
+    if (func == "client") {
+      HARpcAskTimeout
+    } else {
+      val key = RPC_ASK_TIMEOUT.key.replace("<func>", func)
+      new RpcTimeout(getTimeAsMs(key, NETWORK_TIMEOUT.defaultValueString).milli, key)
+    }
+  }

Review Comment:
   We can implement
   ```
   def registerShuffleTimeout: RpcTimeOut
   def rpcAskTimeout...
   ```



##########
common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala:
##########
@@ -1002,17 +1008,17 @@ object CelebornConf extends Logging {
       .createWithDefaultString("30s")
 
   val RPC_ASK_TIMEOUT: ConfigEntry[Long] =
-    buildConf("celeborn.rpc.askTimeout")
+    buildConf("celeborn.<func>.rpc.askTimeout")
       .withAlternative("rss.rpc.askTimeout")
       .categories("network")
       .version("0.2.0")
       .doc("Timeout for RPC ask operations.")
       .fallbackConf(NETWORK_TIMEOUT)
 
-  val CLIENT_RPC_ASK_TIMEOUT: ConfigEntry[Long] =
-    buildConf("celeborn.client.rpc.askTimeout")
+  val HA_RPC_ASK_TIMEOUT: ConfigEntry[Long] =
+    buildConf("celeborn.ha.rpc.askTimeout")

Review Comment:
   Do this refactor in a separated PR



-- 
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: dev-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org