HBASE-1098 IllegalStateException: Cannot set a region to be closed it it was not already marked as closing

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@730018 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-12-29 23:57:29 +00:00
parent c4aa758efe
commit 4ff96c0e8c
2 changed files with 16 additions and 9 deletions

View File

@ -118,6 +118,8 @@ Release 0.19.0 - Unreleased
HBASE-543, HBASE-1046, HBase-1051 A region's state is kept in several places
in the master opening the possibility for race conditions
HBASE-1072 Change Thread.join on exit to a timed Thread.join
HBASE-1098 IllegalStateException: Cannot set a region to be closed it it
was not already marked as closing
IMPROVEMENTS
HBASE-901 Add a limit to key length, check key and value length on client side

View File

@ -801,8 +801,8 @@ class RegionManager implements HConstants {
return;
}
s = new RegionState(regionInfo);
regionsInTransition.put(regionInfo.getRegionName(), s);
s.setClosing(serverName, setOffline);
regionsInTransition.put(regionInfo.getRegionName(), s);
}
}
@ -1004,18 +1004,23 @@ class RegionManager implements HConstants {
}
}
/*
* State of a Region.
* Used while regions are making transitions from unassigned to assigned to
* opened, etc.
*/
private static class RegionState implements Comparable<RegionState> {
private final byte[] regionName;
private final byte [] regionName;
private HRegionInfo regionInfo = null;
private boolean unassigned = false;
private boolean assigned = false;
private boolean pending = false;
private boolean closing = false;
private boolean closed = false;
private boolean offlined = false;
private volatile boolean unassigned = false;
private volatile boolean assigned = false;
private volatile boolean pending = false;
private volatile boolean closing = false;
private volatile boolean closed = false;
private volatile boolean offlined = false;
private String serverName = null;
RegionState(byte[] regionName) {
RegionState(byte [] regionName) {
this.regionName = regionName;
}