|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.master.RegionState
@InterfaceAudience.Private public class RegionState
State of a Region while undergoing transitions. Region state cannot be modified except the stamp field. So it is almost immutable.
Nested Class Summary | |
---|---|
static class |
RegionState.State
|
Constructor Summary | |
---|---|
RegionState()
|
|
RegionState(HRegionInfo region,
RegionState.State state)
|
|
RegionState(HRegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName)
|
|
RegionState(HRegionInfo region,
RegionState.State state,
ServerName serverName)
|
Method Summary | |
---|---|
ClusterStatusProtos.RegionState |
convert()
Convert a RegionState to an HBaseProtos.RegionState |
static RegionState |
convert(ClusterStatusProtos.RegionState proto)
Convert a protobuf HBaseProtos.RegionState to a RegionState |
boolean |
equals(Object obj)
Check if two states are the same, except timestamp |
HRegionInfo |
getRegion()
|
ServerName |
getServerName()
|
long |
getStamp()
|
RegionState.State |
getState()
|
int |
hashCode()
Don't count timestamp in hash code calculation |
boolean |
isClosed()
|
boolean |
isClosing()
|
boolean |
isFailedClose()
|
boolean |
isFailedOpen()
|
boolean |
isMerged()
|
boolean |
isMerging()
|
boolean |
isMergingNew()
|
boolean |
isOffline()
|
boolean |
isOnServer(ServerName sn)
|
boolean |
isOpened()
|
boolean |
isOpening()
|
boolean |
isOpenOrMergingNewOnServer(ServerName sn)
|
boolean |
isOpenOrMergingOnServer(ServerName sn)
|
boolean |
isOpenOrSplittingNewOnServer(ServerName sn)
|
boolean |
isOpenOrSplittingOnServer(ServerName sn)
|
boolean |
isPendingClose()
|
boolean |
isPendingCloseOrClosing()
|
boolean |
isPendingCloseOrClosingOnServer(ServerName sn)
|
boolean |
isPendingOpen()
|
boolean |
isPendingOpenOrOpening()
|
boolean |
isPendingOpenOrOpeningOnServer(ServerName sn)
|
boolean |
isReadyToOffline()
Check if a region state can transition to offline |
boolean |
isReadyToOnline()
Check if a region state can transition to online |
boolean |
isSplit()
|
boolean |
isSplitting()
|
boolean |
isSplittingNew()
|
boolean |
isUnassignable()
Check if a region state is one of offline states that can't transition to pending_close/closing (unassign/offline) |
static boolean |
isUnassignable(RegionState.State state)
Check if a region state is one of offline states that can't transition to pending_close/closing (unassign/offline) |
protected void |
setTimestamp(long timestamp)
|
String |
toDescriptiveString()
A slower (but more easy-to-read) stringification |
String |
toString()
|
void |
updateTimestampToNow()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RegionState()
public RegionState(HRegionInfo region, RegionState.State state)
public RegionState(HRegionInfo region, RegionState.State state, ServerName serverName)
public RegionState(HRegionInfo region, RegionState.State state, long stamp, ServerName serverName)
Method Detail |
---|
public void updateTimestampToNow()
public RegionState.State getState()
public long getStamp()
public HRegionInfo getRegion()
public ServerName getServerName()
public boolean isClosing()
public boolean isClosed()
public boolean isPendingClose()
public boolean isOpening()
public boolean isOpened()
public boolean isPendingOpen()
public boolean isOffline()
public boolean isSplitting()
public boolean isSplit()
public boolean isSplittingNew()
public boolean isFailedOpen()
public boolean isFailedClose()
public boolean isMerging()
public boolean isMerged()
public boolean isMergingNew()
public boolean isOpenOrMergingOnServer(ServerName sn)
public boolean isOpenOrMergingNewOnServer(ServerName sn)
public boolean isOpenOrSplittingOnServer(ServerName sn)
public boolean isOpenOrSplittingNewOnServer(ServerName sn)
public boolean isPendingOpenOrOpeningOnServer(ServerName sn)
public boolean isPendingOpenOrOpening()
public boolean isPendingCloseOrClosingOnServer(ServerName sn)
public boolean isPendingCloseOrClosing()
public boolean isOnServer(ServerName sn)
public boolean isReadyToOffline()
public boolean isReadyToOnline()
public boolean isUnassignable()
public static boolean isUnassignable(RegionState.State state)
public String toString()
toString
in class Object
public String toDescriptiveString()
public ClusterStatusProtos.RegionState convert()
public static RegionState convert(ClusterStatusProtos.RegionState proto)
protected void setTimestamp(long timestamp)
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |