Class ReplicationMarkerChore
java.lang.Object
org.apache.hadoop.hbase.ScheduledChore
org.apache.hadoop.hbase.replication.regionserver.ReplicationMarkerChore
- All Implemented Interfaces:
Runnable
This chore is responsible to create replication marker rows with special WALEdit with family as
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final org.slf4j.Loggerprivate static final MultiVersionConcurrencyControlstatic final RegionInfostatic final intstatic final Stringstatic final booleanstatic final Stringprivate final RegionServerServicesprivate WAL -
Constructor Summary
ConstructorsConstructorDescriptionReplicationMarkerChore(Stoppable stopper, RegionServerServices rsServices, int period) -
Method Summary
Methods inherited from class org.apache.hadoop.hbase.ScheduledChore
cancel, cancel, choreForTesting, cleanup, getInitialDelay, getName, getPeriod, getStopper, getTimeUnit, initialChore, isInitialChoreComplete, isScheduled, run, shutdown, shutdown, toString, triggerNow
-
Field Details
-
LOG
-
MVCC
-
REGION_INFO
-
DELIMITER
- See Also:
-
rsServices
-
wal
-
REPLICATION_MARKER_ENABLED_KEY
- See Also:
-
REPLICATION_MARKER_ENABLED_DEFAULT
- See Also:
-
REPLICATION_MARKER_CHORE_DURATION_KEY
- See Also:
-
REPLICATION_MARKER_CHORE_DURATION_DEFAULT
- See Also:
-
-
Constructor Details
-
ReplicationMarkerChore
-
-
Method Details
-
chore
Description copied from class:ScheduledChoreThe task to execute on each scheduled execution of the Chore- Specified by:
chorein classScheduledChore
-
getRowKey
Creates a rowkey with region server name and timestamp.- Parameters:
serverName- region server nametimestamp- timestamp
-