@InterfaceAudience.Private public class ReplicationMarkerChore extends ScheduledChore
WALEdit.METAFAMILY
and column qualifier as
WALEdit.REPLICATION_MARKER
and empty value. If config key
REPLICATION_MARKER_ENABLED_KEY
is set to true, then we will create 1 marker row every
REPLICATION_MARKER_CHORE_DURATION_KEY
ms
ReplicationSourceWALReader
will populate
the Replication Marker edit with region_server_name, wal_name and wal_offset encoded in
WALProtos.ReplicationMarkerDescriptor
object. Replication
will change the
REPLICATION_SCOPE for this edit to GLOBAL so that it can replicate. On the sink cluster,
ReplicationSink
will convert the
ReplicationMarkerDescriptor into a Put mutation to REPLICATION_SINK_TRACKER_TABLE_NAME_STR table.Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private static String |
DELIMITER |
private static org.slf4j.Logger |
LOG |
private static MultiVersionConcurrencyControl |
MVCC |
static RegionInfo |
REGION_INFO |
static int |
REPLICATION_MARKER_CHORE_DURATION_DEFAULT |
static String |
REPLICATION_MARKER_CHORE_DURATION_KEY |
static boolean |
REPLICATION_MARKER_ENABLED_DEFAULT |
static String |
REPLICATION_MARKER_ENABLED_KEY |
private RegionServerServices |
rsServices |
private WAL |
wal |
Constructor and Description |
---|
ReplicationMarkerChore(Stoppable stopper,
RegionServerServices rsServices,
int period,
org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
protected void |
chore()
The task to execute on each scheduled execution of the Chore
|
static byte[] |
getRowKey(String serverName,
long timestamp)
Creates a rowkey with region server name and timestamp.
|
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
private static final org.slf4j.Logger LOG
private static final MultiVersionConcurrencyControl MVCC
public static final RegionInfo REGION_INFO
private static final String DELIMITER
private final org.apache.hadoop.conf.Configuration conf
private final RegionServerServices rsServices
public static final String REPLICATION_MARKER_ENABLED_KEY
public static final boolean REPLICATION_MARKER_ENABLED_DEFAULT
public static final String REPLICATION_MARKER_CHORE_DURATION_KEY
public static final int REPLICATION_MARKER_CHORE_DURATION_DEFAULT
public ReplicationMarkerChore(Stoppable stopper, RegionServerServices rsServices, int period, org.apache.hadoop.conf.Configuration conf)
protected void chore()
ScheduledChore
chore
in class ScheduledChore
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.