HBASE-21327 Fix minor logging issue where we don't report servername if no associated SCP
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
c67f7f14e2
commit
f32d3e1e2c
|
@ -126,8 +126,8 @@ public class RegionServerTracker extends ZKListener {
|
||||||
// deadServersFromPE is made from a list of outstanding ServerCrashProcedures.
|
// deadServersFromPE is made from a list of outstanding ServerCrashProcedures.
|
||||||
// splittingServersFromWALDir are being actively split -- the directory in the FS ends in
|
// splittingServersFromWALDir are being actively split -- the directory in the FS ends in
|
||||||
// '-SPLITTING'. Each splitting server should have a corresponding SCP. Log if not.
|
// '-SPLITTING'. Each splitting server should have a corresponding SCP. Log if not.
|
||||||
splittingServersFromWALDir.stream().map(s -> !deadServersFromPE.contains(s)).
|
splittingServersFromWALDir.stream().filter(s -> !deadServersFromPE.contains(s)).
|
||||||
forEach(s -> LOG.error("{} has no matching ServerCrashProcedure", s));
|
forEach(s -> LOG.error("{} has no matching ServerCrashProcedure", s));
|
||||||
watcher.registerListener(this);
|
watcher.registerListener(this);
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
List<String> servers =
|
List<String> servers =
|
||||||
|
|
|
@ -431,21 +431,16 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
|
||||||
updateStochasticCosts(tableName, curOverallCost, curFunctionCosts);
|
updateStochasticCosts(tableName, curOverallCost, curFunctionCosts);
|
||||||
if (initCost > currentCost) {
|
if (initCost > currentCost) {
|
||||||
plans = createRegionPlans(cluster);
|
plans = createRegionPlans(cluster);
|
||||||
if (LOG.isDebugEnabled()) {
|
LOG.info("Finished computing new load balance plan. Computation took {}" +
|
||||||
LOG.debug("Finished computing new load balance plan. Computation took "
|
" to try {} different iterations. Found a solution that moves " +
|
||||||
+ (endTime - startTime) + "ms to try " + step
|
"{} regions; Going from a computed cost of {}" +
|
||||||
+ " different iterations. Found a solution that moves "
|
" to a new cost of {}", java.time.Duration.ofMillis(endTime - startTime),
|
||||||
+ plans.size() + " regions; Going from a computed cost of "
|
step, plans.size(), initCost, currentCost);
|
||||||
+ initCost + " to a new cost of " + currentCost);
|
|
||||||
}
|
|
||||||
|
|
||||||
return plans;
|
return plans;
|
||||||
}
|
}
|
||||||
if (LOG.isDebugEnabled()) {
|
LOG.info("Could not find a better load balance plan. Tried {} different configurations in " +
|
||||||
LOG.debug("Could not find a better load balance plan. Tried "
|
"{}, and did not find anything with a computed cost less than {}", step,
|
||||||
+ step + " different configurations in " + (endTime - startTime)
|
java.time.Duration.ofMillis(endTime - startTime), initCost);
|
||||||
+ "ms, and did not find anything with a computed cost less than " + initCost);
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -687,7 +687,6 @@ public class MasterProcedureScheduler extends AbstractProcedureScheduler {
|
||||||
boolean hasLock = true;
|
boolean hasLock = true;
|
||||||
final LockAndQueue[] regionLocks = new LockAndQueue[regionInfo.length];
|
final LockAndQueue[] regionLocks = new LockAndQueue[regionInfo.length];
|
||||||
for (int i = 0; i < regionInfo.length; ++i) {
|
for (int i = 0; i < regionInfo.length; ++i) {
|
||||||
LOG.info("{} checking lock on {}", procedure, regionInfo[i].getEncodedName());
|
|
||||||
assert regionInfo[i] != null;
|
assert regionInfo[i] != null;
|
||||||
assert regionInfo[i].getTable() != null;
|
assert regionInfo[i].getTable() != null;
|
||||||
assert regionInfo[i].getTable().equals(table): regionInfo[i] + " " + procedure;
|
assert regionInfo[i].getTable().equals(table): regionInfo[i] + " " + procedure;
|
||||||
|
@ -695,12 +694,16 @@ public class MasterProcedureScheduler extends AbstractProcedureScheduler {
|
||||||
|
|
||||||
regionLocks[i] = locking.getRegionLock(regionInfo[i].getEncodedName());
|
regionLocks[i] = locking.getRegionLock(regionInfo[i].getEncodedName());
|
||||||
if (!regionLocks[i].tryExclusiveLock(procedure)) {
|
if (!regionLocks[i].tryExclusiveLock(procedure)) {
|
||||||
|
LOG.info("Waiting on xlock for {} held by pid={}", procedure,
|
||||||
|
regionLocks[i].getExclusiveLockProcIdOwner());
|
||||||
waitProcedure(regionLocks[i], procedure);
|
waitProcedure(regionLocks[i], procedure);
|
||||||
hasLock = false;
|
hasLock = false;
|
||||||
while (i-- > 0) {
|
while (i-- > 0) {
|
||||||
regionLocks[i].releaseExclusiveLock(procedure);
|
regionLocks[i].releaseExclusiveLock(procedure);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
LOG.info("Took xlock for {}", procedure);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue