You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by li...@apache.org on 2013/04/30 20:18:18 UTC
svn commit: r1477748 -
/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ProcessRegionStatusChange.java
Author: liyin
Date: Tue Apr 30 18:18:18 2013
New Revision: 1477748
URL: http://svn.apache.org/r1477748
Log:
[0.89-fb] [master] handle rootRegion close correctly
Author: aaiyer
Summary:
Ensure that if a root region closes, the master is
able to handle it cleanely.
there have been situations where the root region
remains unassigned; because the master does not
complete the shutdown because meta regions are
not online.
This is due to a bug in the way ProcessRegionClose
looks to check if the parent table is up. For root,
there is no parent region, so the availability
should always return true.
Test Plan: unit tests
Reviewers: rshroff, liyintang, adela
Reviewed By: adela
CC: hbase-eng@
Differential Revision: https://phabricator.fb.com/D777909
Modified:
hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ProcessRegionStatusChange.java
Modified: hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ProcessRegionStatusChange.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ProcessRegionStatusChange.java?rev=1477748&r1=1477747&r2=1477748&view=diff
==============================================================================
--- hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ProcessRegionStatusChange.java (original)
+++ hbase/branches/0.89-fb/src/main/java/org/apache/hadoop/hbase/master/ProcessRegionStatusChange.java Tue Apr 30 18:18:18 2013
@@ -27,6 +27,7 @@ import org.apache.hadoop.hbase.HRegionIn
*/
abstract class ProcessRegionStatusChange extends RegionServerOperation {
protected final boolean isMetaTable;
+ protected final boolean isRootTable;
protected final HRegionInfo regionInfo;
@SuppressWarnings({"FieldCanBeLocal"})
private volatile MetaRegion metaRegion = null;
@@ -41,11 +42,14 @@ abstract class ProcessRegionStatusChange
super(master, serverName);
this.regionInfo = regionInfo;
this.isMetaTable = regionInfo.isMetaTable();
+ this.isRootTable = regionInfo.isRootRegion();
}
protected boolean metaRegionAvailable() {
boolean available = true;
- if (isMetaTable) {
+ if (isRootTable) {
+ return true;
+ } else if (isMetaTable) {
// This operation is for the meta table
if (!rootAvailable()) {
// But we can't proceed unless the root region is available
@@ -84,4 +88,4 @@ abstract class ProcessRegionStatusChange
public HRegionInfo getRegionInfo() {
return regionInfo;
}
-}
\ No newline at end of file
+}