This is an automated email from the ASF dual-hosted git repository.
diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new b4020a13ef [Improve](Routineload)Set the maximum timeout for obtaining
partition to 60s (#24173)
b4020a13ef is described below
commit b4020a13ef43db4a792e902c8353980e3aa61cb1
Author: Calvin Kirs <[email protected]>
AuthorDate: Mon Sep 11 14:15:06 2023 +0800
[Improve](Routineload)Set the maximum timeout for obtaining partition to
60s (#24173)
---
fe/fe-core/src/main/java/org/apache/doris/common/util/KafkaUtil.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/common/util/KafkaUtil.java
b/fe/fe-core/src/main/java/org/apache/doris/common/util/KafkaUtil.java
index 581a1ca48e..40041502ca 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/util/KafkaUtil.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/util/KafkaUtil.java
@@ -41,6 +41,7 @@ import java.util.stream.Collectors;
public class KafkaUtil {
private static final Logger LOG = LogManager.getLogger(KafkaUtil.class);
+ private static final int MAX_KAFKA_PARTITION_TIMEOUT_SECOND = 60;
public static List<Integer> getAllKafkaPartitions(String brokerList,
String topic,
Map<String, String> convertedCustomProperties) throws
UserException {
@@ -70,7 +71,7 @@ public class KafkaUtil {
// get info
Future<InternalService.PProxyResult> future =
BackendServiceProxy.getInstance().getInfo(address, request);
- InternalService.PProxyResult result = future.get(5,
TimeUnit.SECONDS);
+ InternalService.PProxyResult result =
future.get(MAX_KAFKA_PARTITION_TIMEOUT_SECOND, TimeUnit.SECONDS);
TStatusCode code =
TStatusCode.findByValue(result.getStatus().getStatusCode());
if (code != TStatusCode.OK) {
throw new UserException("failed to get kafka partition info: "
+ result.getStatus().getErrorMsgsList());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]