@InterfaceAudience.Private public class RegionStateStore extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RegionStateStore.RegionStateVisitor |
| Modifier and Type | Field and Description |
|---|---|
protected static char |
META_REPLICA_ID_DELIMITER
The delimiter for meta columns for replicaIds > 0
|
| Constructor and Description |
|---|
RegionStateStore(MasterServices master,
MasterRegion masterRegion) |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteMergeQualifiers(RegionInfo mergeRegion)
Deletes merge qualifiers for the specified merge region.
|
void |
deleteRegion(RegionInfo regionInfo)
Deletes the specified region.
|
void |
deleteRegions(List<RegionInfo> regions)
Deletes the specified regions.
|
List<RegionInfo> |
getMergeRegions(RegionInfo region) |
static RegionState.State |
getRegionState(Result r,
RegionInfo regionInfo)
Pull the region state from a catalog table
Result. |
static byte[] |
getStateColumn(int replicaId) |
boolean |
hasMergeRegions(RegionInfo region)
Check whether the given
region has any 'info:merge*' columns. |
void |
mergeRegions(RegionInfo child,
RegionInfo[] parents,
ServerName serverName,
TableDescriptor htd) |
void |
overwriteRegions(List<RegionInfo> regionInfos,
int regionReplication)
Overwrites the specified regions from hbase:meta.
|
void |
removeRegionReplicas(TableName tableName,
int oldReplicaCount,
int newReplicaCount) |
void |
splitRegion(RegionInfo parent,
RegionInfo splitA,
RegionInfo splitB,
ServerName serverName,
TableDescriptor htd)
Splits the region into two in an atomic operation.
|
void |
visitMeta(RegionStateStore.RegionStateVisitor visitor) |
static 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
RegionStateVisitor passed as second parameter. |
protected static final char META_REPLICA_ID_DELIMITER
public RegionStateStore(MasterServices master, MasterRegion masterRegion)
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.public static void visitMetaEntry(RegionStateStore.RegionStateVisitor visitor, Result result) throws IOException
IOExceptionpublic void splitRegion(RegionInfo parent, RegionInfo splitA, RegionInfo splitB, ServerName serverName, TableDescriptor htd) throws IOException
IOExceptionpublic void mergeRegions(RegionInfo child, RegionInfo[] parents, ServerName serverName, TableDescriptor htd) throws IOException
IOExceptionpublic boolean hasMergeRegions(RegionInfo region) throws IOException
region has any 'info:merge*' columns.IOExceptionpublic List<RegionInfo> getMergeRegions(RegionInfo region) throws IOException
region.IOExceptionpublic void deleteMergeQualifiers(RegionInfo mergeRegion) throws IOException
connection - connection we're usingmergeRegion - the merged regionIOExceptionpublic void deleteRegion(RegionInfo regionInfo) throws IOException
IOExceptionpublic void deleteRegions(List<RegionInfo> regions) throws IOException
IOExceptionpublic void overwriteRegions(List<RegionInfo> regionInfos, int regionReplication) throws IOException
connection - connection we're usingregionInfos - list of regions to be added to METAIOExceptionpublic void removeRegionReplicas(TableName tableName, int oldReplicaCount, int newReplicaCount) throws IOException
IOExceptionpublic static RegionState.State getRegionState(Result r, RegionInfo regionInfo)
Result.public static byte[] getStateColumn(int replicaId)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.