@InterfaceAudience.Private public class RegionState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RegionState.State |
Constructor and Description |
---|
RegionState(RegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName) |
RegionState(RegionInfo region,
RegionState.State state,
long stamp,
ServerName serverName,
long ritDuration) |
RegionState(RegionInfo region,
RegionState.State state,
ServerName serverName) |
Modifier and Type | Method and Description |
---|---|
ClusterStatusProtos.RegionState |
convert()
Convert a RegionState to an HBaseProtos.RegionState
|
static RegionState |
convert(ClusterStatusProtos.RegionState proto)
Convert a protobuf HBaseProtos.RegionState to a RegionState
|
static RegionState |
createForTesting(RegionInfo region,
RegionState.State state) |
boolean |
equals(Object obj)
Check if two states are the same, except timestamp
|
RegionInfo |
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 |
isClosingOrClosedOnServer(ServerName sn) |
boolean |
isFailedClose() |
boolean |
isFailedOpen() |
boolean |
isMerged() |
boolean |
isMerging() |
boolean |
isMergingNew() |
boolean |
isMergingNewOnServer(ServerName sn) |
boolean |
isMergingNewOrOfflineOnServer(ServerName sn) |
boolean |
isMergingNewOrOpenedOnServer(ServerName sn) |
boolean |
isMergingOnServer(ServerName sn) |
boolean |
isOffline() |
boolean |
isOnServer(ServerName sn) |
boolean |
isOpened() |
boolean |
isOpenedOnServer(ServerName sn) |
boolean |
isOpening() |
boolean |
isOpeningOrFailedOpenOnServer(ServerName sn) |
boolean |
isOpeningOrOpenedOnServer(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 |
isSplittingNewOnServer(ServerName sn) |
boolean |
isSplittingOnServer(ServerName sn) |
boolean |
isSplittingOrOpenedOnServer(ServerName sn) |
boolean |
isSplittingOrSplitOnServer(ServerName sn) |
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)
|
String |
toDescriptiveString()
A slower (but more easy-to-read) stringification
|
String |
toString() |
public RegionState(RegionInfo region, RegionState.State state, ServerName serverName)
public RegionState(RegionInfo region, RegionState.State state, long stamp, ServerName serverName)
public RegionState(RegionInfo region, RegionState.State state, long stamp, ServerName serverName, long ritDuration)
public static RegionState createForTesting(RegionInfo region, RegionState.State state)
public RegionState.State getState()
public long getStamp()
public RegionInfo getRegion()
public ServerName getServerName()
public long getRitDuration()
public boolean isClosing()
public boolean isClosed()
public boolean isOpening()
public boolean isOpened()
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 isOnServer(ServerName sn)
public boolean isMergingOnServer(ServerName sn)
public boolean isMergingNewOnServer(ServerName sn)
public boolean isMergingNewOrOpenedOnServer(ServerName sn)
public boolean isMergingNewOrOfflineOnServer(ServerName sn)
public boolean isSplittingOnServer(ServerName sn)
public boolean isSplittingNewOnServer(ServerName sn)
public boolean isSplittingOrOpenedOnServer(ServerName sn)
public boolean isSplittingOrSplitOnServer(ServerName sn)
public boolean isClosingOrClosedOnServer(ServerName sn)
public boolean isOpeningOrFailedOpenOnServer(ServerName sn)
public boolean isOpeningOrOpenedOnServer(ServerName sn)
public boolean isOpenedOnServer(ServerName sn)
public boolean isReadyToOffline()
public boolean isReadyToOnline()
public boolean isUnassignable()
public static boolean isUnassignable(RegionState.State state)
public String toDescriptiveString()
public ClusterStatusProtos.RegionState convert()
public static RegionState convert(ClusterStatusProtos.RegionState proto)
public boolean equals(Object obj)
Copyright © 2007–2019 Cloudera. All rights reserved.