[chore](log) add cluster and tag message to exception (#12287)

This commit is contained in:
Zhengguo Yang
2022-09-02 20:46:39 +08:00
committed by GitHub
parent 0d33c713d1
commit c944496fb4
3 changed files with 6 additions and 3 deletions

View File

@ -205,7 +205,8 @@ public class BeLoadRebalancer extends Rebalancer {
Map<Long, PathSlot> 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

View File

@ -250,7 +250,8 @@ public class DiskRebalancer extends Rebalancer {
Map<Long, PathSlot> 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,

View File

@ -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 {