public class ServerRegionReplicaUtil extends RegionReplicaUtil
RegionReplicaUtil
but for the server sideModifier and Type | Field and Description |
---|---|
static String |
REGION_REPLICA_REPLICATION_CONF_KEY
Whether asynchronous WAL replication to the secondary region replicas is enabled or not.
|
static String |
REGION_REPLICA_STORE_FILE_REFRESH
Enables or disables refreshing store files of secondary region replicas when the memory is
above the global memstore lower limit.
|
static String |
REGION_REPLICA_STORE_FILE_REFRESH_MEMSTORE_MULTIPLIER
The multiplier to use when we want to refresh a secondary region instead of flushing a primary
region.
|
DEFAULT_REGION_REPLICA_WAIT_FOR_PRIMARY_FLUSH, REGION_REPLICA_WAIT_FOR_PRIMARY_FLUSH_CONF_KEY
Constructor and Description |
---|
ServerRegionReplicaUtil() |
Modifier and Type | Method and Description |
---|---|
static HRegionInfo |
getRegionInfoForFs(HRegionInfo regionInfo)
Returns the regionInfo object to use for interacting with the file system.
|
static double |
getRegionReplicaStoreFileRefreshMultiplier(org.apache.hadoop.conf.Configuration conf) |
static String |
getReplicationPeerId()
Return the peer id used for replicating to secondary region replicas
|
static StoreFileInfo |
getStoreFileInfo(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
HRegionInfo regionInfo,
HRegionInfo regionInfoForFs,
String familyName,
org.apache.hadoop.fs.Path path)
Returns a StoreFileInfo from the given FileStatus.
|
static boolean |
isReadOnly(HRegion region)
Returns whether this region replica can accept writes.
|
static boolean |
isRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isRegionReplicaStoreFileRefreshEnabled(org.apache.hadoop.conf.Configuration conf) |
static boolean |
isRegionReplicaWaitForPrimaryFlushEnabled(org.apache.hadoop.conf.Configuration conf) |
static void |
setupRegionReplicaReplication(org.apache.hadoop.conf.Configuration conf)
Create replication peer for replicating to region replicas if needed.
|
static boolean |
shouldReplayRecoveredEdits(HRegion region)
Returns whether to replay the recovered edits to flush the results.
|
getRegionInfoForDefaultReplica, getRegionInfoForReplica, isDefaultReplica, isDefaultReplica, isReplicasForSameRegion, removeNonDefaultRegions
public static final String REGION_REPLICA_REPLICATION_CONF_KEY
public static final String REGION_REPLICA_STORE_FILE_REFRESH
public static final String REGION_REPLICA_STORE_FILE_REFRESH_MEMSTORE_MULTIPLIER
public static HRegionInfo getRegionInfoForFs(HRegionInfo regionInfo)
public static boolean isReadOnly(HRegion region)
region
- the HRegion objectpublic static boolean shouldReplayRecoveredEdits(HRegion region)
region
- the HRegion objectpublic static StoreFileInfo getStoreFileInfo(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, HRegionInfo regionInfo, HRegionInfo regionInfoForFs, String familyName, org.apache.hadoop.fs.Path path) throws IOException
IOException
public static void setupRegionReplicaReplication(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- configuration to useIOException
public static boolean isRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf)
public static boolean isRegionReplicaWaitForPrimaryFlushEnabled(org.apache.hadoop.conf.Configuration conf)
public static boolean isRegionReplicaStoreFileRefreshEnabled(org.apache.hadoop.conf.Configuration conf)
public static double getRegionReplicaStoreFileRefreshMultiplier(org.apache.hadoop.conf.Configuration conf)
public static String getReplicationPeerId()
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.