@InterfaceAudience.Private public class RegionStateStore extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
RegionStateStore.RegionStateVisitor |
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private MasterServices |
master |
protected static char |
META_REPLICA_ID_DELIMITER
The delimiter for meta columns for replicaIds > 0
|
Constructor and Description |
---|
RegionStateStore(MasterServices master) |
Modifier and Type | Method and Description |
---|---|
void |
deleteRegion(RegionInfo regionInfo) |
void |
deleteRegions(List<RegionInfo> regions) |
private int |
getRegionReplication(TableDescriptor htd) |
(package private) static ServerName |
getRegionServer(Result r,
int replicaId)
Returns the
ServerName from catalog table Result
where the region is transitioning. |
static RegionState.State |
getRegionState(Result r,
int replicaId)
Pull the region state from a catalog table
Result . |
private static byte[] |
getServerNameColumn(int replicaId) |
private static byte[] |
getStateColumn(int replicaId) |
private TableDescriptor |
getTableDescriptor(TableName tableName) |
void |
mergeRegions(RegionInfo child,
RegionInfo[] parents,
ServerName serverName) |
void |
splitRegion(RegionInfo parent,
RegionInfo hriA,
RegionInfo hriB,
ServerName serverName) |
private void |
updateMetaLocation(RegionInfo regionInfo,
ServerName serverName,
RegionState.State state) |
private void |
updateRegionLocation(RegionInfo regionInfo,
RegionState.State state,
Put put) |
void |
updateRegionLocation(RegionStates.RegionStateNode regionStateNode) |
private void |
updateUserRegionLocation(RegionInfo regionInfo,
RegionState.State state,
ServerName regionLocation,
long openSeqNum,
long pid) |
void |
visitMeta(RegionStateStore.RegionStateVisitor visitor) |
private void |
visitMetaEntry(RegionStateStore.RegionStateVisitor visitor,
Result result) |
private static final org.slf4j.Logger LOG
protected static final char META_REPLICA_ID_DELIMITER
private final MasterServices master
public RegionStateStore(MasterServices master)
public void visitMeta(RegionStateStore.RegionStateVisitor visitor) throws IOException
IOException
private void visitMetaEntry(RegionStateStore.RegionStateVisitor visitor, Result result) throws IOException
IOException
public void updateRegionLocation(RegionStates.RegionStateNode regionStateNode) throws IOException
IOException
private void updateMetaLocation(RegionInfo regionInfo, ServerName serverName, RegionState.State state) throws IOException
IOException
private void updateUserRegionLocation(RegionInfo regionInfo, RegionState.State state, ServerName regionLocation, long openSeqNum, long pid) throws IOException
IOException
private void updateRegionLocation(RegionInfo regionInfo, RegionState.State state, Put put) throws IOException
IOException
public void splitRegion(RegionInfo parent, RegionInfo hriA, RegionInfo hriB, ServerName serverName) throws IOException
IOException
public void mergeRegions(RegionInfo child, RegionInfo[] parents, ServerName serverName) throws IOException
IOException
public void deleteRegion(RegionInfo regionInfo) throws IOException
IOException
public void deleteRegions(List<RegionInfo> regions) throws IOException
IOException
private int getRegionReplication(TableDescriptor htd)
private TableDescriptor getTableDescriptor(TableName tableName) throws IOException
IOException
static ServerName getRegionServer(Result r, int replicaId)
ServerName
from catalog table Result
where the region is transitioning. It should be the same as
MetaTableAccessor.getServerName(Result,int)
if the server is at OPEN state.r
- Result to pull the transitioning server name fromMetaTableAccessor.getServerName(Result,int)
if necessary fields not found or empty.private static byte[] getServerNameColumn(int replicaId)
public static RegionState.State getRegionState(Result r, int replicaId)
Result
.r
- Result to pull the region state fromprivate static byte[] getStateColumn(int replicaId)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.