@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_REPLICATION_CATALOG |
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_CATALOG_CONF_KEY
Same as for
REGION_REPLICA_REPLICATION_CONF_KEY but for catalog replication. |
static String |
REGION_REPLICA_REPLICATION_CONF_KEY
Whether asynchronous WAL replication to the secondary region replicas is enabled or not.
|
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 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 |
isMetaRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf,
TableName tn)
Returns True if hbase:meta Region Read Replica is enabled.
|
static boolean |
isReadOnly(HRegion region)
Returns whether this region replica can accept writes.
|
private static boolean |
isRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf)
Returns True if Region Read Replica is enabled for user-space tables.
|
static boolean |
isRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf,
TableName tn) |
static boolean |
isRegionReplicaStoreFileRefreshEnabled(org.apache.hadoop.conf.Configuration conf)
Returns True if we are to refresh user-space hfiles in Region Read Replicas.
|
static boolean |
isRegionReplicaWaitForPrimaryFlushEnabled(org.apache.hadoop.conf.Configuration conf)
Returns True if wait for primary to flush is enabled for user-space tables.
|
static void |
setupRegionReplicaReplication(MasterServices services)
Create replication peer for replicating user-space Region Read Replicas.
|
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
public static final String REGION_REPLICA_REPLICATION_PEER
public static final String REGION_REPLICA_REPLICATION_CATALOG_CONF_KEY
REGION_REPLICA_REPLICATION_CONF_KEY
but for catalog replication.private static final boolean DEFAULT_REGION_REPLICA_REPLICATION_CATALOG
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(MasterServices services) throws IOException, ReplicationException
IOException
ReplicationException
public static boolean isRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf, TableName tn)
tn
(whether hbase:meta or
user-space tables).private static boolean isRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf)
public static boolean isMetaRegionReplicaReplicationEnabled(org.apache.hadoop.conf.Configuration conf, TableName tn)
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)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.