@InterfaceAudience.Private public class VerifyWALEntriesReplicationEndpoint extends BaseReplicationEndpoint
ReplicationEndpoint
that replicates nothing.
Mainly used by ITBLL to check whether all the entries in WAL files are fine, since for normal
case, we will only read the WAL files when there are region servers crash and we need to split
the log, but for replication we will read all the entries and pass them to the
ReplicationEndpoint
, so setting up a replication peer can help finding out whether there
are broken entries in WAL files.ReplicationEndpoint.Context, ReplicationEndpoint.ReplicateContext
ctx, REPLICATION_WALENTRYFILTER_CONFIG_KEY
Constructor and Description |
---|
VerifyWALEntriesReplicationEndpoint() |
Modifier and Type | Method and Description |
---|---|
boolean |
canReplicateToSameCluster()
Whether or not, the replication endpoint can replicate to it's source cluster with the same
UUID
|
private void |
checkCell(Cell cell) |
protected void |
doStart() |
protected void |
doStop() |
UUID |
getPeerUUID()
Returns a UUID of the provided peer id.
|
WALEntryFilter |
getWALEntryfilter()
Returns a default set of filters
|
boolean |
replicate(ReplicationEndpoint.ReplicateContext replicateContext)
Replicate the given set of entries (in the context) to the other cluster.
|
void |
start()
Initiates service startup and returns immediately.
|
void |
stop()
If the service is starting or running, this initiates service shutdown and returns immediately.
|
getNamespaceTableCfWALEntryFilter, getScopeWALEntryFilter, init, isStarting, peerConfigUpdated
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, doCancelStart, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning
public VerifyWALEntriesReplicationEndpoint()
public boolean canReplicateToSameCluster()
ReplicationEndpoint
canReplicateToSameCluster
in interface ReplicationEndpoint
canReplicateToSameCluster
in class BaseReplicationEndpoint
public UUID getPeerUUID()
ReplicationEndpoint
public WALEntryFilter getWALEntryfilter()
BaseReplicationEndpoint
getWALEntryfilter
in interface ReplicationEndpoint
getWALEntryfilter
in class BaseReplicationEndpoint
WALEntryFilter
or null.public boolean replicate(ReplicationEndpoint.ReplicateContext replicateContext)
ReplicationEndpoint
replicateContext
- a context where WAL entries and other
parameters can be obtained.public void start()
ReplicationEndpoint
public void stop()
ReplicationEndpoint
protected void doStart()
doStart
in class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
protected void doStop()
doStop
in class org.apache.hbase.thirdparty.com.google.common.util.concurrent.AbstractService
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.