@InterfaceAudience.Private public class ServerRegionReplicaUtil extends RegionReplicaUtil
RegionReplicaUtil
but for the server sideModifier and Type | Field and Description |
---|---|
private static boolean |
DEFAULT_REGION_REPLICA_REPLICATION |
private static boolean |
DEFAULT_REGION_REPLICA_STORE_FILE_REFRESH |
private static double |
DEFAULT_REGION_REPLICA_STORE_FILE_REFRESH_MEMSTORE_MULTIPLIER |
private static org.slf4j.Logger |
LOG |
static String |
REGION_REPLICA_REPLICATION_CONF_KEY
Whether asynchronous WAL replication to the secondary region replicas is enabled or not.
|
private static String |
REGION_REPLICA_REPLICATION_PEER |
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 RegionInfo |
getRegionInfoForFs(RegionInfo 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,
RegionInfo regionInfo,
RegionInfo 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.
|
addReplicas, getRegionInfoForDefaultReplica, getRegionInfoForReplica, isDefaultReplica, isDefaultReplica, isReplicasForSameRegion, removeNonDefaultRegions
private static final org.slf4j.Logger LOG
public static final String REGION_REPLICA_REPLICATION_CONF_KEY
Admin
java class.
Replication to secondary region replicas works over standard inter-cluster replication.ยทprivate static final boolean DEFAULT_REGION_REPLICA_REPLICATION
private static final String REGION_REPLICA_REPLICATION_PEER
public static final String REGION_REPLICA_STORE_FILE_REFRESH
private static final boolean DEFAULT_REGION_REPLICA_STORE_FILE_REFRESH
public static final String REGION_REPLICA_STORE_FILE_REFRESH_MEMSTORE_MULTIPLIER
private static final double DEFAULT_REGION_REPLICA_STORE_FILE_REFRESH_MEMSTORE_MULTIPLIER
public ServerRegionReplicaUtil()
public static RegionInfo getRegionInfoForFs(RegionInfo 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, RegionInfo regionInfo, RegionInfo 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–2019 The Apache Software Foundation. All rights reserved.