HBASE-2781 fixup
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@963951 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
643ae0c985
commit
e9eebe3a1f
|
@ -179,7 +179,8 @@ public class RegionManager {
|
|||
} catch (IOException e) {
|
||||
LOG.error("Error creating event data for " + HBaseEventType.M2ZK_REGION_OFFLINE, e);
|
||||
}
|
||||
zkWrapper.createUnassignedRegion(HRegionInfo.ROOT_REGIONINFO.getEncodedName(), data);
|
||||
zkWrapper.createOrUpdateUnassignedRegion(
|
||||
HRegionInfo.ROOT_REGIONINFO.getEncodedName(), data);
|
||||
LOG.debug("Created UNASSIGNED zNode " + regionName + " in state " + HBaseEventType.M2ZK_REGION_OFFLINE);
|
||||
RegionState s = new RegionState(HRegionInfo.ROOT_REGIONINFO, RegionState.State.UNASSIGNED);
|
||||
regionsInTransition.put(regionName, s);
|
||||
|
@ -343,7 +344,8 @@ public class RegionManager {
|
|||
} catch (IOException e) {
|
||||
LOG.error("Error creating event data for " + HBaseEventType.M2ZK_REGION_OFFLINE, e);
|
||||
}
|
||||
zkWrapper.createUnassignedRegion(rs.getRegionInfo().getEncodedName(), data);
|
||||
zkWrapper.createOrUpdateUnassignedRegion(
|
||||
rs.getRegionInfo().getEncodedName(), data);
|
||||
LOG.debug("Created UNASSIGNED zNode " + regionName + " in state " + HBaseEventType.M2ZK_REGION_OFFLINE);
|
||||
this.regionsInTransition.put(regionName, rs);
|
||||
}
|
||||
|
|
|
@ -1081,7 +1081,7 @@ public class ZooKeeperWrapper implements Watcher {
|
|||
* @param regionName - encoded name of the region
|
||||
* @param data - new serialized data to update the region znode
|
||||
*/
|
||||
public void createUnassignedRegion(String regionName, byte[] data) {
|
||||
private void createUnassignedRegion(String regionName, byte[] data) {
|
||||
String znode = getZNode(getRegionInTransitionZNode(), regionName);
|
||||
if(LOG.isDebugEnabled()) {
|
||||
// check if this node already exists -
|
||||
|
|
|
@ -71,8 +71,10 @@ public class TestRestartCluster {
|
|||
} catch (IOException e) {
|
||||
LOG.error("Error creating event data for " + hbEventType, e);
|
||||
}
|
||||
zkWrapper.createUnassignedRegion(HRegionInfo.ROOT_REGIONINFO.getEncodedName(), data);
|
||||
zkWrapper.createUnassignedRegion(HRegionInfo.FIRST_META_REGIONINFO.getEncodedName(), data);
|
||||
zkWrapper.createOrUpdateUnassignedRegion(
|
||||
HRegionInfo.ROOT_REGIONINFO.getEncodedName(), data);
|
||||
zkWrapper.createOrUpdateUnassignedRegion(
|
||||
HRegionInfo.FIRST_META_REGIONINFO.getEncodedName(), data);
|
||||
LOG.debug("Created UNASSIGNED zNode for ROOT and META regions in state " + HBaseEventType.M2ZK_REGION_OFFLINE);
|
||||
|
||||
// start the HB cluster
|
||||
|
|
Loading…
Reference in New Issue