From c944496fb41046596bb6ea599f019c60a559eff2 Mon Sep 17 00:00:00 2001 From: Zhengguo Yang Date: Fri, 2 Sep 2022 20:46:39 +0800 Subject: [PATCH] [chore](log) add cluster and tag message to exception (#12287) --- .../src/main/java/org/apache/doris/clone/BeLoadRebalancer.java | 3 ++- .../src/main/java/org/apache/doris/clone/DiskRebalancer.java | 3 ++- .../src/main/java/org/apache/doris/clone/TabletScheduler.java | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/BeLoadRebalancer.java b/fe/fe-core/src/main/java/org/apache/doris/clone/BeLoadRebalancer.java index 8af6b2c794..28ecbea7a7 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/clone/BeLoadRebalancer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/clone/BeLoadRebalancer.java @@ -205,7 +205,8 @@ public class BeLoadRebalancer extends Rebalancer { Map backendsWorkingSlots) throws SchedException { ClusterLoadStatistic clusterStat = statisticMap.get(tabletCtx.getCluster(), tabletCtx.getTag()); if (clusterStat == null) { - throw new SchedException(Status.UNRECOVERABLE, "cluster does not exist"); + throw new SchedException(Status.UNRECOVERABLE, + String.format("cluster %s for tag %s does not exist", tabletCtx.getCluster(), tabletCtx.getTag())); } // get classification of backends diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java b/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java index 493e465b40..82913bc796 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java +++ b/fe/fe-core/src/main/java/org/apache/doris/clone/DiskRebalancer.java @@ -250,7 +250,8 @@ public class DiskRebalancer extends Rebalancer { Map backendsWorkingSlots) throws SchedException { ClusterLoadStatistic clusterStat = statisticMap.get(tabletCtx.getCluster(), tabletCtx.getTag()); if (clusterStat == null) { - throw new SchedException(Status.UNRECOVERABLE, "cluster does not exist"); + throw new SchedException(Status.UNRECOVERABLE, + String.format("cluster %s for tag %s does not exist", tabletCtx.getCluster(), tabletCtx.getTag())); } if (tabletCtx.getTempSrcBackendId() == -1 || tabletCtx.getTempSrcPathHash() == -1) { throw new SchedException(Status.UNRECOVERABLE, diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java index d585996600..adba316736 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java +++ b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletScheduler.java @@ -1283,7 +1283,8 @@ public class TabletScheduler extends MasterDaemon { Preconditions.checkState(!forColocate); ClusterLoadStatistic statistic = statisticMap.get(tabletCtx.getCluster(), tag); if (statistic == null) { - throw new SchedException(Status.UNRECOVERABLE, "cluster does not exist"); + throw new SchedException(Status.UNRECOVERABLE, + String.format("cluster %s for tag %s does not exist.", tabletCtx.getCluster(), tag)); } beStatistics = statistic.getSortedBeLoadStats(null /* sorted ignore medium */); } else {