This is an automated email from the ASF dual-hosted git repository. yiguolei 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 35c19daec7 [opt](routine load) log BE id when get partitions failed. (#20749) 35c19daec7 is described below commit 35c19daec7c50441e3612af77196fc0cfedae730 Author: qiye <jianliang5...@gmail.com> AuthorDate: Tue Jun 13 19:15:05 2023 +0800 [opt](routine load) log BE id when get partitions failed. (#20749) Add BackendId when get partitions failed to make debug error easier. --- .../src/main/java/org/apache/doris/common/util/KafkaUtil.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 2339027a96..581a1ca48e 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 @@ -45,13 +45,14 @@ public class KafkaUtil { public static List<Integer> getAllKafkaPartitions(String brokerList, String topic, Map<String, String> convertedCustomProperties) throws UserException { TNetworkAddress address = null; + Backend be = null; try { List<Long> backendIds = Env.getCurrentSystemInfo().getAllBackendIds(true); if (backendIds.isEmpty()) { throw new LoadException("Failed to get all partitions. No alive backends"); } Collections.shuffle(backendIds); - Backend be = Env.getCurrentSystemInfo().getBackend(backendIds.get(0)); + be = Env.getCurrentSystemInfo().getBackend(backendIds.get(0)); address = new TNetworkAddress(be.getHost(), be.getBrpcPort()); // create request @@ -77,9 +78,10 @@ public class KafkaUtil { return result.getKafkaMetaResult().getPartitionIdsList(); } } catch (Exception e) { - LOG.warn("failed to get partitions.", e); + LOG.warn("failed to get partitions from backend[{}].", be.getId(), e); throw new LoadException( - "Failed to get all partitions of kafka topic: " + topic + ". error: " + e.getMessage()); + "Failed to get all partitions of kafka topic: " + topic + " from backend[" + be.getId() + + "]. error: " + e.getMessage()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org