@InterfaceAudience.Private public class RegionStateStore extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
initialized |
private static org.apache.commons.logging.Log |
LOG |
protected static char |
META_REPLICA_ID_DELIMITER
The delimiter for meta columns for replicaIds > 0
|
private Region |
metaRegion |
private MultiHConnection |
multiHConnection |
private boolean |
noPersistence |
private Server |
server |
Constructor and Description |
---|
RegionStateStore(Server server) |
Modifier and Type | Method and Description |
---|---|
(package private) static ServerName |
getRegionServer(Result r,
int replicaId)
Returns the
ServerName from catalog table Result
where the region is transitioning. |
(package private) 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) |
(package private) void |
mergeRegions(HRegionInfo p,
HRegionInfo a,
HRegionInfo b,
ServerName sn,
int regionReplication) |
private boolean |
shouldPersistStateChange(HRegionInfo hri,
RegionState state,
RegionState oldState)
Check if we should persist a state change in meta.
|
(package private) void |
splitRegion(HRegionInfo p,
HRegionInfo a,
HRegionInfo b,
ServerName sn,
int regionReplication) |
(package private) void |
start() |
(package private) void |
stop() |
(package private) void |
updateRegionState(long openSeqNum,
RegionState newState,
RegionState oldState) |
private static final org.apache.commons.logging.Log LOG
protected static final char META_REPLICA_ID_DELIMITER
private volatile Region metaRegion
private MultiHConnection multiHConnection
private volatile boolean initialized
private final boolean noPersistence
private final Server server
RegionStateStore(Server server)
static ServerName getRegionServer(Result r, int replicaId)
ServerName
from catalog table Result
where the region is transitioning. It should be the same as
HRegionInfo.getServerName(Result)
if the server is at OPEN state.r
- Result to pull the transitioning server name fromHRegionInfo.getServerName(Result)
if necessary fields not found or empty.private static byte[] getServerNameColumn(int replicaId)
static RegionState.State getRegionState(Result r, int replicaId)
Result
.r
- Result to pull the region state fromprivate static byte[] getStateColumn(int replicaId)
private boolean shouldPersistStateChange(HRegionInfo hri, RegionState state, RegionState oldState)
void start() throws IOException
IOException
void stop()
void updateRegionState(long openSeqNum, RegionState newState, RegionState oldState)
void splitRegion(HRegionInfo p, HRegionInfo a, HRegionInfo b, ServerName sn, int regionReplication) throws IOException
IOException
void mergeRegions(HRegionInfo p, HRegionInfo a, HRegionInfo b, ServerName sn, int regionReplication) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.