HBASE-12216 Lower closed region logging level

This commit is contained in:
Jimmy Xiang 2014-10-09 09:21:32 -07:00
parent f75785af51
commit 72c8c62aa1
3 changed files with 16 additions and 12 deletions

View File

@ -304,8 +304,8 @@ public class RegionState {
return isOnServer(sn) && (isSplitting() || isSplit());
}
public boolean isClosingOnServer(final ServerName sn) {
return isOnServer(sn) && isClosing();
public boolean isClosingOrClosedOnServer(final ServerName sn) {
return isOnServer(sn) && (isClosing() || isClosed());
}
public boolean isOpeningOrFailedOpenOnServer(final ServerName sn) {

View File

@ -2139,16 +2139,20 @@ public class AssignmentManager {
private String onRegionClosed(final RegionState current,
final HRegionInfo hri, final ServerName serverName) {
// We didn't check if the region is already closed/offline on the server
// as we did for other transitions to handle reportRegionTransition RPC retry.
// There are two reasons. 1. Closed/offline states are transient. Region will be
// usually assigned right after closed. When a RPC retry comes in, the region may
// already have moved away from closed state. 2. On the region server side, we
// don't care much about the response for this transition. We only make sure
// master has got and processed this report, either successfully or not.
if (current == null || !current.isClosingOnServer(serverName)) {
// Region will be usually assigned right after closed. When a RPC retry comes
// in, the region may already have moved away from closed state. However, on the
// region server side, we don't care much about the response for this transition.
// We only make sure master has got and processed this report, either
// successfully or not. So this is fine, not a problem at all.
if (current == null || !current.isClosingOrClosedOnServer(serverName)) {
return hri.getShortNameToLog() + " is not closing on " + serverName;
}
// Just return in case of retrying
if (current.isClosed()) {
return null;
}
if (getTableStateManager().isTableState(hri.getTable(), TableState.State.DISABLED,
TableState.State.DISABLING) || replicasToClose.contains(hri)) {
offlineDisabledRegion(hri);
@ -2734,7 +2738,7 @@ public class AssignmentManager {
errorMsg = "Unexpected transition code " + code;
}
if (errorMsg != null) {
LOG.error("Failed to transition region from " + current + " on "
LOG.info("Could not transition region from " + current + " on "
+ code + " by " + serverName + ": " + errorMsg);
}
return errorMsg;

View File

@ -2591,7 +2591,7 @@ public class HRegionServer extends HasThread implements
}
if (actualRegion == null) {
LOG.error("Received CLOSE for a region which is not online, and we're not opening.");
LOG.debug("Received CLOSE for a region which is not online, and we're not opening.");
this.regionsInTransitionInRS.remove(encodedName.getBytes());
// The master deletes the znode when it receives this exception.
throw new NotServingRegionException("The region " + encodedName +