@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_DELIMITERThe delimiter for meta columns for replicaIds > 0 | 
| private static org.slf4j.Logger | METALOG | 
| Constructor and Description | 
|---|
| RegionStateStore(MasterServices master) | 
| Modifier and Type | Method and Description | 
|---|---|
| private static void | debugLogMutation(Mutation p) | 
| private static void | debugLogMutations(List<? extends Mutation> mutations) | 
| void | deleteRegion(RegionInfo regionInfo) | 
| void | deleteRegions(List<RegionInfo> regions) | 
| private Table | getMetaTable() | 
| private long | getOpenSeqNumForParentRegion(RegionInfo region) | 
| private int | getRegionReplication(TableDescriptor htd) | 
| static RegionState.State | getRegionState(Result r,
              RegionInfo regionInfo)Pull the region state from a catalog table  Result. | 
| private Scan | getScanForUpdateRegionReplicas(TableName tableName) | 
| private static byte[] | getStateColumn(int replicaId) | 
| private TableDescriptor | getTableDescriptor(TableName tableName) | 
| private boolean | hasGlobalReplicationScope(TableDescriptor htd) | 
| private boolean | hasGlobalReplicationScope(TableName tableName) | 
| void | mergeRegions(RegionInfo child,
            RegionInfo[] parents,
            ServerName serverName) | 
| void | removeRegionReplicas(TableName tableName,
                    int oldReplicaCount,
                    int newReplicaCount) | 
| 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) | 
| (package private) void | updateRegionLocation(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) | 
| void | visitMetaForRegion(String regionEncodedName,
                  RegionStateStore.RegionStateVisitor visitor)Queries META table for the passed region encoded name, delegating action upon results to the
  RegionStateVisitorpassed as second parameter. | 
private static final org.slf4j.Logger LOG
private static final org.slf4j.Logger METALOG
protected static final char META_REPLICA_ID_DELIMITER
private final MasterServices master
public RegionStateStore(MasterServices master)
public void visitMeta(RegionStateStore.RegionStateVisitor visitor) throws IOException
IOExceptionpublic void visitMetaForRegion(String regionEncodedName, RegionStateStore.RegionStateVisitor visitor) throws IOException
RegionStateVisitor passed as second parameter.regionEncodedName - encoded name for the Region we want to query META for.visitor - The RegionStateVisitor instance to react over the query results.IOException - If some error occurs while querying META or parsing results.private void visitMetaEntry(RegionStateStore.RegionStateVisitor visitor, Result result) throws IOException
IOExceptionvoid updateRegionLocation(RegionStateNode regionStateNode) throws IOException
IOExceptionprivate void updateMetaLocation(RegionInfo regionInfo, ServerName serverName, RegionState.State state) throws IOException
IOExceptionprivate void updateUserRegionLocation(RegionInfo regionInfo, RegionState.State state, ServerName regionLocation, long openSeqNum, long pid) throws IOException
IOExceptionprivate void updateRegionLocation(RegionInfo regionInfo, RegionState.State state, Put put) throws IOException
IOExceptionprivate long getOpenSeqNumForParentRegion(RegionInfo region) throws IOException
IOExceptionprivate Table getMetaTable() throws IOException
IOExceptionpublic void splitRegion(RegionInfo parent, RegionInfo hriA, RegionInfo hriB, ServerName serverName) throws IOException
IOExceptionpublic void mergeRegions(RegionInfo child, RegionInfo[] parents, ServerName serverName) throws IOException
IOExceptionpublic void deleteRegion(RegionInfo regionInfo) throws IOException
IOExceptionpublic void deleteRegions(List<RegionInfo> regions) throws IOException
IOExceptionprivate Scan getScanForUpdateRegionReplicas(TableName tableName)
public void removeRegionReplicas(TableName tableName, int oldReplicaCount, int newReplicaCount) throws IOException
IOExceptionprivate boolean hasGlobalReplicationScope(TableName tableName) throws IOException
IOExceptionprivate boolean hasGlobalReplicationScope(TableDescriptor htd)
private int getRegionReplication(TableDescriptor htd)
private TableDescriptor getTableDescriptor(TableName tableName) throws IOException
IOExceptionpublic static RegionState.State getRegionState(Result r, RegionInfo regionInfo)
Result.private static byte[] getStateColumn(int replicaId)
private static void debugLogMutations(List<? extends Mutation> mutations) throws IOException
IOExceptionprivate static void debugLogMutation(Mutation p) throws IOException
IOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.