HBASE-12216 Lower closed region logging level
This commit is contained in:
parent
f75785af51
commit
72c8c62aa1
|
@ -304,8 +304,8 @@ public class RegionState {
|
||||||
return isOnServer(sn) && (isSplitting() || isSplit());
|
return isOnServer(sn) && (isSplitting() || isSplit());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isClosingOnServer(final ServerName sn) {
|
public boolean isClosingOrClosedOnServer(final ServerName sn) {
|
||||||
return isOnServer(sn) && isClosing();
|
return isOnServer(sn) && (isClosing() || isClosed());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpeningOrFailedOpenOnServer(final ServerName sn) {
|
public boolean isOpeningOrFailedOpenOnServer(final ServerName sn) {
|
||||||
|
|
|
@ -2139,16 +2139,20 @@ public class AssignmentManager {
|
||||||
|
|
||||||
private String onRegionClosed(final RegionState current,
|
private String onRegionClosed(final RegionState current,
|
||||||
final HRegionInfo hri, final ServerName serverName) {
|
final HRegionInfo hri, final ServerName serverName) {
|
||||||
// We didn't check if the region is already closed/offline on the server
|
// Region will be usually assigned right after closed. When a RPC retry comes
|
||||||
// as we did for other transitions to handle reportRegionTransition RPC retry.
|
// in, the region may already have moved away from closed state. However, on the
|
||||||
// There are two reasons. 1. Closed/offline states are transient. Region will be
|
// region server side, we don't care much about the response for this transition.
|
||||||
// usually assigned right after closed. When a RPC retry comes in, the region may
|
// We only make sure master has got and processed this report, either
|
||||||
// already have moved away from closed state. 2. On the region server side, we
|
// successfully or not. So this is fine, not a problem at all.
|
||||||
// don't care much about the response for this transition. We only make sure
|
if (current == null || !current.isClosingOrClosedOnServer(serverName)) {
|
||||||
// master has got and processed this report, either successfully or not.
|
|
||||||
if (current == null || !current.isClosingOnServer(serverName)) {
|
|
||||||
return hri.getShortNameToLog() + " is not closing on " + 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,
|
if (getTableStateManager().isTableState(hri.getTable(), TableState.State.DISABLED,
|
||||||
TableState.State.DISABLING) || replicasToClose.contains(hri)) {
|
TableState.State.DISABLING) || replicasToClose.contains(hri)) {
|
||||||
offlineDisabledRegion(hri);
|
offlineDisabledRegion(hri);
|
||||||
|
@ -2734,7 +2738,7 @@ public class AssignmentManager {
|
||||||
errorMsg = "Unexpected transition code " + code;
|
errorMsg = "Unexpected transition code " + code;
|
||||||
}
|
}
|
||||||
if (errorMsg != null) {
|
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);
|
+ code + " by " + serverName + ": " + errorMsg);
|
||||||
}
|
}
|
||||||
return errorMsg;
|
return errorMsg;
|
||||||
|
|
|
@ -2591,7 +2591,7 @@ public class HRegionServer extends HasThread implements
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actualRegion == null) {
|
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());
|
this.regionsInTransitionInRS.remove(encodedName.getBytes());
|
||||||
// The master deletes the znode when it receives this exception.
|
// The master deletes the znode when it receives this exception.
|
||||||
throw new NotServingRegionException("The region " + encodedName +
|
throw new NotServingRegionException("The region " + encodedName +
|
||||||
|
|
Loading…
Reference in New Issue