public static class RegionStates.RegionStateNode extends Object implements Comparable<RegionStates.RegionStateNode>
Constructor and Description |
---|
RegionStateNode(RegionInfo regionInfo) |
public RegionStateNode(RegionInfo regionInfo)
public boolean setState(RegionState.State update, RegionState.State... expected)
update
- new region state this node should be assigned.expected
- current state should be in this given list of expected statespublic ServerName offline()
public void transitionState(RegionState.State update, RegionState.State... expected) throws UnexpectedStateException
RegionState.State
but only if currently in expected
State
(if not, throw UnexpectedStateException
.UnexpectedStateException
public boolean isInState(RegionState.State... expected)
public boolean isStuck()
public boolean isInTransition()
public long getLastUpdate()
public void setLastHost(ServerName serverName)
public void setOpenSeqNum(long seqId)
public ServerName setRegionLocation(ServerName serverName)
public boolean setProcedure(RegionTransitionProcedure proc)
public boolean unsetProcedure(RegionTransitionProcedure proc)
public RegionTransitionProcedure getProcedure()
public ProcedureEvent<?> getProcedureEvent()
public RegionInfo getRegionInfo()
public TableName getTable()
public boolean isSystemTable()
public ServerName getLastHost()
public ServerName getRegionLocation()
public RegionState.State getState()
public long getOpenSeqNum()
public int getFormatVersion()
public RegionState toRegionState()
public int compareTo(RegionStates.RegionStateNode other)
compareTo
in interface Comparable<RegionStates.RegionStateNode>
public String toShortString()
public String toDescriptiveString()
Copyright © 2007–2019 Cloudera. All rights reserved.