This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new d6b43f0e [#973] improvement: Make shuffle manager client RPC timeout
configurable (#1017)
d6b43f0e is described below
commit d6b43f0ec36197169fd4637d55eeec5911bd90aa
Author: Neo Chien <[email protected]>
AuthorDate: Thu Jul 20 11:26:06 2023 +0800
[#973] improvement: Make shuffle manager client RPC timeout configurable
(#1017)
### What changes were proposed in this pull request?
Make shuffle manager client RPC timeout configurable
### Why are the changes needed?
Fix: #973
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
current UT and Integration testing
---
.../main/java/org/apache/uniffle/common/config/RssBaseConf.java | 8 ++++++++
.../apache/uniffle/client/impl/grpc/ShuffleManagerGrpcClient.java | 5 +++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git
a/common/src/main/java/org/apache/uniffle/common/config/RssBaseConf.java
b/common/src/main/java/org/apache/uniffle/common/config/RssBaseConf.java
index ad60f1ef..8f97328e 100644
--- a/common/src/main/java/org/apache/uniffle/common/config/RssBaseConf.java
+++ b/common/src/main/java/org/apache/uniffle/common/config/RssBaseConf.java
@@ -129,6 +129,14 @@ public class RssBaseConf extends RssConf {
.defaultValue(ClientType.GRPC)
.withDescription("client type for rss");
+ public static final ConfigOption<Long> RSS_CLIENT_TYPE_GRPC_TIMEOUT_MS =
+ ConfigOptions.key("rss.rpc.client.type.grpc.timeout")
+ .longType()
+ .checkValue(
+ ConfigUtils.POSITIVE_LONG_VALIDATOR, "The grpc timeout must be
positive integer")
+ .defaultValue(60 * 1000L)
+ .withDescription("Remote shuffle service client type grpc timeout
(ms)");
+
public static final ConfigOption<String> RSS_STORAGE_TYPE =
ConfigOptions.key("rss.storage.type")
.stringType()
diff --git
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleManagerGrpcClient.java
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleManagerGrpcClient.java
index a90f396d..6b03e283 100644
---
a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleManagerGrpcClient.java
+++
b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleManagerGrpcClient.java
@@ -25,6 +25,7 @@ import org.slf4j.LoggerFactory;
import org.apache.uniffle.client.api.ShuffleManagerClient;
import org.apache.uniffle.client.request.RssReportShuffleFetchFailureRequest;
import org.apache.uniffle.client.response.RssReportShuffleFetchFailureResponse;
+import org.apache.uniffle.common.config.RssBaseConf;
import org.apache.uniffle.common.exception.RssException;
import org.apache.uniffle.proto.RssProtos.ReportShuffleFetchFailureRequest;
import org.apache.uniffle.proto.RssProtos.ReportShuffleFetchFailureResponse;
@@ -33,8 +34,8 @@ import org.apache.uniffle.proto.ShuffleManagerGrpc;
public class ShuffleManagerGrpcClient extends GrpcClient implements
ShuffleManagerClient {
private static final Logger LOG =
LoggerFactory.getLogger(ShuffleManagerGrpcClient.class);
- private static final long RPC_TIMEOUT_DEFAULT_MS = 60000;
- private long rpcTimeout = RPC_TIMEOUT_DEFAULT_MS;
+ private static RssBaseConf rssConf = new RssBaseConf();
+ private long rpcTimeout =
rssConf.getLong(RssBaseConf.RSS_CLIENT_TYPE_GRPC_TIMEOUT_MS);
private ShuffleManagerGrpc.ShuffleManagerBlockingStub blockingStub;
public ShuffleManagerGrpcClient(String host, int port) {