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,7 +126,7 @@ public class RegionServerTracker extends ZKListener {
|
|||
// deadServersFromPE is made from a list of outstanding ServerCrashProcedures.
|
||||
// splittingServersFromWALDir are being actively split -- the directory in the FS ends in
|
||||
// '-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));
|
||||
watcher.registerListener(this);
|
||||
synchronized (this) {
|
||||
|
|
|
@ -431,21 +431,16 @@ public class StochasticLoadBalancer extends BaseLoadBalancer {
|
|||
updateStochasticCosts(tableName, curOverallCost, curFunctionCosts);
|
||||
if (initCost > currentCost) {
|
||||
plans = createRegionPlans(cluster);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Finished computing new load balance plan. Computation took "
|
||||
+ (endTime - startTime) + "ms to try " + step
|
||||
+ " different iterations. Found a solution that moves "
|
||||
+ plans.size() + " regions; Going from a computed cost of "
|
||||
+ initCost + " to a new cost of " + currentCost);
|
||||
}
|
||||
|
||||
LOG.info("Finished computing new load balance plan. Computation took {}" +
|
||||
" to try {} different iterations. Found a solution that moves " +
|
||||
"{} regions; Going from a computed cost of {}" +
|
||||
" to a new cost of {}", java.time.Duration.ofMillis(endTime - startTime),
|
||||
step, plans.size(), initCost, currentCost);
|
||||
return plans;
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("Could not find a better load balance plan. Tried "
|
||||
+ step + " different configurations in " + (endTime - startTime)
|
||||
+ "ms, and did not find anything with a computed cost less than " + initCost);
|
||||
}
|
||||
LOG.info("Could not find a better load balance plan. Tried {} different configurations in " +
|
||||
"{}, and did not find anything with a computed cost less than {}", step,
|
||||
java.time.Duration.ofMillis(endTime - startTime), initCost);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -687,7 +687,6 @@ public class MasterProcedureScheduler extends AbstractProcedureScheduler {
|
|||
boolean hasLock = true;
|
||||
final LockAndQueue[] regionLocks = new LockAndQueue[regionInfo.length];
|
||||
for (int i = 0; i < regionInfo.length; ++i) {
|
||||
LOG.info("{} checking lock on {}", procedure, regionInfo[i].getEncodedName());
|
||||
assert regionInfo[i] != null;
|
||||
assert regionInfo[i].getTable() != null;
|
||||
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());
|
||||
if (!regionLocks[i].tryExclusiveLock(procedure)) {
|
||||
LOG.info("Waiting on xlock for {} held by pid={}", procedure,
|
||||
regionLocks[i].getExclusiveLockProcIdOwner());
|
||||
waitProcedure(regionLocks[i], procedure);
|
||||
hasLock = false;
|
||||
while (i-- > 0) {
|
||||
regionLocks[i].releaseExclusiveLock(procedure);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
LOG.info("Took xlock for {}", procedure);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue