Revert previous commit of HBASE-4276
Realized after committing that the conditions should check isMetaTable || isRootRegion, not just isMetaTable. Will recommit a fixed version. git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1163408 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9f5580eba2
commit
261fcbdd87
|
@ -518,8 +518,6 @@ Release 0.90.5 - Unreleased
|
||||||
HBASE-4222 Make HLog more resilient to write pipeline failures
|
HBASE-4222 Make HLog more resilient to write pipeline failures
|
||||||
HBASE-4293 More verbose logging in ServerShutdownHandler for meta/root
|
HBASE-4293 More verbose logging in ServerShutdownHandler for meta/root
|
||||||
cases (todd)
|
cases (todd)
|
||||||
HBASE-4276 AssignmentManager debug logs should be at INFO level for
|
|
||||||
META/ROOT regions (todd)
|
|
||||||
|
|
||||||
Release 0.90.4 - August 10, 2011
|
Release 0.90.4 - August 10, 2011
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,6 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
boolean intransistion =
|
boolean intransistion =
|
||||||
processRegionInTransition(hri.getEncodedName(), hri, null);
|
processRegionInTransition(hri.getEncodedName(), hri, null);
|
||||||
if (!intransistion) return intransistion;
|
if (!intransistion) return intransistion;
|
||||||
debugLog(hri, "Waiting on " + HRegionInfo.prettyPrint(hri.getEncodedName()));
|
|
||||||
synchronized(this.regionsInTransition) {
|
synchronized(this.regionsInTransition) {
|
||||||
while (!this.master.isStopped() &&
|
while (!this.master.isStopped() &&
|
||||||
this.regionsInTransition.containsKey(hri.getEncodedName())) {
|
this.regionsInTransition.containsKey(hri.getEncodedName())) {
|
||||||
|
@ -445,7 +444,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
throws KeeperException {
|
throws KeeperException {
|
||||||
// If was on dead server, its closed now. Force to OFFLINE and then
|
// If was on dead server, its closed now. Force to OFFLINE and then
|
||||||
// handle it like a close; this will get it reassigned if appropriate
|
// handle it like a close; this will get it reassigned if appropriate
|
||||||
debugLog(hri, "RIT " + hri.getEncodedName() + " in state=" +
|
LOG.debug("RIT " + hri.getEncodedName() + " in state=" +
|
||||||
oldData.getEventType() + " was on deadserver; forcing offline");
|
oldData.getEventType() + " was on deadserver; forcing offline");
|
||||||
ZKAssign.createOrForceNodeOffline(this.watcher, hri,
|
ZKAssign.createOrForceNodeOffline(this.watcher, hri,
|
||||||
this.master.getServerName());
|
this.master.getServerName());
|
||||||
|
@ -1238,8 +1237,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
RegionPlan plan = getRegionPlan(state, forceNewPlan);
|
RegionPlan plan = getRegionPlan(state, forceNewPlan);
|
||||||
if (plan == null) return; // Should get reassigned later when RIT times out.
|
if (plan == null) return; // Should get reassigned later when RIT times out.
|
||||||
try {
|
try {
|
||||||
debugLog(state.getRegion(),
|
LOG.debug("Assigning region " + state.getRegion().getRegionNameAsString() +
|
||||||
"Assigning region " + state.getRegion().getRegionNameAsString() +
|
|
||||||
" to " + plan.getDestination().toString());
|
" to " + plan.getDestination().toString());
|
||||||
// Transition RegionState to PENDING_OPEN
|
// Transition RegionState to PENDING_OPEN
|
||||||
state.update(RegionState.State.PENDING_OPEN, System.currentTimeMillis(),
|
state.update(RegionState.State.PENDING_OPEN, System.currentTimeMillis(),
|
||||||
|
@ -1292,14 +1290,6 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void debugLog(HRegionInfo region, String string) {
|
|
||||||
if (region.isMetaRegion()) {
|
|
||||||
LOG.info(string);
|
|
||||||
} else {
|
|
||||||
LOG.debug(string);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set region as OFFLINED up in zookeeper
|
* Set region as OFFLINED up in zookeeper
|
||||||
* @param state
|
* @param state
|
||||||
|
@ -1394,7 +1384,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newPlan) {
|
if (newPlan) {
|
||||||
debugLog(state.getRegion(), "No previous transition plan was found (or we are ignoring " +
|
LOG.debug("No previous transition plan was found (or we are ignoring " +
|
||||||
"an existing plan) for " + state.getRegion().getRegionNameAsString() +
|
"an existing plan) for " + state.getRegion().getRegionNameAsString() +
|
||||||
" so generated a random one; " + randomPlan + "; " +
|
" so generated a random one; " + randomPlan + "; " +
|
||||||
serverManager.countOfRegionServers() +
|
serverManager.countOfRegionServers() +
|
||||||
|
@ -1402,7 +1392,7 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
", exclude=" + serverToExclude + ") available servers");
|
", exclude=" + serverToExclude + ") available servers");
|
||||||
return randomPlan;
|
return randomPlan;
|
||||||
}
|
}
|
||||||
debugLog(state.getRegion(), "Using pre-existing plan for region " +
|
LOG.debug("Using pre-existing plan for region " +
|
||||||
state.getRegion().getRegionNameAsString() + "; plan=" + existingPlan);
|
state.getRegion().getRegionNameAsString() + "; plan=" + existingPlan);
|
||||||
return existingPlan;
|
return existingPlan;
|
||||||
}
|
}
|
||||||
|
@ -1431,12 +1421,12 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
* @param force if region should be closed even if already closing
|
* @param force if region should be closed even if already closing
|
||||||
*/
|
*/
|
||||||
public void unassign(HRegionInfo region, boolean force) {
|
public void unassign(HRegionInfo region, boolean force) {
|
||||||
debugLog(region, "Starting unassignment of region " +
|
LOG.debug("Starting unassignment of region " +
|
||||||
region.getRegionNameAsString() + " (offlining)");
|
region.getRegionNameAsString() + " (offlining)");
|
||||||
synchronized (this.regions) {
|
synchronized (this.regions) {
|
||||||
// Check if this region is currently assigned
|
// Check if this region is currently assigned
|
||||||
if (!regions.containsKey(region)) {
|
if (!regions.containsKey(region)) {
|
||||||
debugLog(region, "Attempted to unassign region " +
|
LOG.debug("Attempted to unassign region " +
|
||||||
region.getRegionNameAsString() + " but it is not " +
|
region.getRegionNameAsString() + " but it is not " +
|
||||||
"currently assigned anywhere");
|
"currently assigned anywhere");
|
||||||
return;
|
return;
|
||||||
|
@ -1462,12 +1452,12 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
} else if (force && state.isPendingClose()) {
|
} else if (force && state.isPendingClose()) {
|
||||||
// JD 05/25/11
|
// JD 05/25/11
|
||||||
// in my experience this is useless, when this happens it just spins
|
// in my experience this is useless, when this happens it just spins
|
||||||
debugLog(region, "Attempting to unassign region " +
|
LOG.debug("Attempting to unassign region " +
|
||||||
region.getRegionNameAsString() + " which is already pending close "
|
region.getRegionNameAsString() + " which is already pending close "
|
||||||
+ "but forcing an additional close");
|
+ "but forcing an additional close");
|
||||||
state.update(RegionState.State.PENDING_CLOSE);
|
state.update(RegionState.State.PENDING_CLOSE);
|
||||||
} else {
|
} else {
|
||||||
debugLog(region, "Attempting to unassign region " +
|
LOG.debug("Attempting to unassign region " +
|
||||||
region.getRegionNameAsString() + " but it is " +
|
region.getRegionNameAsString() + " but it is " +
|
||||||
"already in transition (" + state.getState() + ")");
|
"already in transition (" + state.getState() + ")");
|
||||||
return;
|
return;
|
||||||
|
@ -1482,12 +1472,12 @@ public class AssignmentManager extends ZooKeeperListener {
|
||||||
// TODO: We should consider making this look more like it does for the
|
// TODO: We should consider making this look more like it does for the
|
||||||
// region open where we catch all throwables and never abort
|
// region open where we catch all throwables and never abort
|
||||||
if (serverManager.sendRegionClose(server, state.getRegion())) {
|
if (serverManager.sendRegionClose(server, state.getRegion())) {
|
||||||
debugLog(region, "Sent CLOSE to " + server + " for region " +
|
LOG.debug("Sent CLOSE to " + server + " for region " +
|
||||||
region.getRegionNameAsString());
|
region.getRegionNameAsString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// This never happens. Currently regionserver close always return true.
|
// This never happens. Currently regionserver close always return true.
|
||||||
LOG.warn("Server " + server + " region CLOSE RPC returned false for " +
|
LOG.debug("Server " + server + " region CLOSE RPC returned false for " +
|
||||||
region.getEncodedName());
|
region.getEncodedName());
|
||||||
} catch (NotServingRegionException nsre) {
|
} catch (NotServingRegionException nsre) {
|
||||||
LOG.info("Server " + server + " returned " + nsre + " for " +
|
LOG.info("Server " + server + " returned " + nsre + " for " +
|
||||||
|
|
|
@ -114,13 +114,8 @@ public class OpenedRegionHandler extends EventHandler implements TotesHRegionInf
|
||||||
+ "this table is disabled, triggering close of region");
|
+ "this table is disabled, triggering close of region");
|
||||||
assignmentManager.unassign(regionInfo);
|
assignmentManager.unassign(regionInfo);
|
||||||
} else {
|
} else {
|
||||||
String msg = "Opened region " + regionInfo.getRegionNameAsString() +
|
LOG.debug("Opened region " + regionInfo.getRegionNameAsString() +
|
||||||
" on " + this.sn.toString();
|
" on " + this.sn.toString());
|
||||||
if (regionInfo.isMetaRegion()) {
|
|
||||||
LOG.info(msg);
|
|
||||||
} else {
|
|
||||||
LOG.debug(msg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue