@InterfaceAudience.Private public class RegionState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RegionState.State |
Constructor and Description |
---|
RegionState() |
RegionState(HRegionInfo region,
RegionState.State state) |
RegionState(HRegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName) |
RegionState(HRegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName,
long ritDuration) |
RegionState(HRegionInfo region,
RegionState.State state,
ServerName serverName) |
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionState |
convert()
Convert a RegionState to an HBaseProtos.RegionState
|
static RegionState |
convert(org.apache.hadoop.hbase.protobuf.generated.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() |
long |
getRitDuration() |
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() |
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)
public RegionState(HRegionInfo region, RegionState.State state, long stamp, ServerName serverName, long ritDuration)
public void updateTimestampToNow()
public RegionState.State getState()
public long getStamp()
public HRegionInfo getRegion()
public ServerName getServerName()
public long getRitDuration()
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 toDescriptiveString()
public org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionState convert()
public static RegionState convert(org.apache.hadoop.hbase.protobuf.generated.ClusterStatusProtos.RegionState proto)
protected void setTimestamp(long timestamp)
public boolean equals(Object obj)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.