@InterfaceAudience.Private public class RecoveredReplicationSource extends ReplicationSource
ReplicationSource.LogsComparatorThread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
private String |
actualPeerId |
private static org.slf4j.Logger |
LOG |
conf, DEFAULT_WAIT_ON_ENDPOINT_SECONDS, fs, manager, peerClusterZnode, queueSizePerGroup, replicationQueueInfo, replicationQueues, server, WAIT_ON_ENDPOINT_SECONDS, walEntryFilter, workerThreadsMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
RecoveredReplicationSource() |
| Modifier and Type | Method and Description |
|---|---|
String |
getPeerId()
Get the id that the source is replicating to.
|
private org.apache.hadoop.fs.Path |
getReplSyncUpPath(org.apache.hadoop.fs.Path path) |
ServerName |
getServerWALsBelongTo()
The queue of WALs only belong to one region server.
|
void |
init(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileSystem fs,
ReplicationSourceManager manager,
ReplicationQueues replicationQueues,
ReplicationPeers replicationPeers,
Server server,
String peerClusterZnode,
UUID clusterId,
ReplicationEndpoint replicationEndpoint,
WALFileLengthProvider walFileLengthProvider,
MetricsSource metrics)
Instantiation method used by region servers
|
void |
locateRecoveredPaths(PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue) |
protected ReplicationSourceWALReader |
startNewWALReader(String threadName,
String walGroupId,
PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue,
long startPosition) |
void |
tryFinish() |
protected void |
tryStartNewShipper(String walGroupId,
PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue) |
addHFileRefs, enqueueLog, getCurrentPath, getPeerClusterZnode, getReplicationEndpoint, getSourceManager, getSourceMetrics, getStats, getUncaughtExceptionHandler, getWALFileLengthProvider, isPeerEnabled, isSourceActive, postShipEdits, run, sleepForRetries, startup, terminate, terminate, terminate, tryThrottleactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprivate static final org.slf4j.Logger LOG
private String actualPeerId
public RecoveredReplicationSource()
public void init(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.FileSystem fs, ReplicationSourceManager manager, ReplicationQueues replicationQueues, ReplicationPeers replicationPeers, Server server, String peerClusterZnode, UUID clusterId, ReplicationEndpoint replicationEndpoint, WALFileLengthProvider walFileLengthProvider, MetricsSource metrics) throws IOException
ReplicationSourceinit in interface ReplicationSourceInterfaceinit in class ReplicationSourceconf - configuration to usefs - file system to usemanager - replication manager to ping toserver - the server for this region serverpeerClusterZnode - the name of our znodeclusterId - unique UUID for the clusterreplicationEndpoint - the replication endpoint implementationmetrics - metrics for replication sourceIOExceptionprotected void tryStartNewShipper(String walGroupId, PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue)
tryStartNewShipper in class ReplicationSourceprotected ReplicationSourceWALReader startNewWALReader(String threadName, String walGroupId, PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue, long startPosition)
startNewWALReader in class ReplicationSourcepublic void locateRecoveredPaths(PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue) throws IOException
IOExceptionprivate org.apache.hadoop.fs.Path getReplSyncUpPath(org.apache.hadoop.fs.Path path) throws IOException
IOExceptionpublic void tryFinish()
public String getPeerId()
ReplicationSourceInterfacegetPeerId in interface ReplicationSourceInterfacegetPeerId in class ReplicationSourcepublic ServerName getServerWALsBelongTo()
ReplicationSourceInterfacegetServerWALsBelongTo in interface ReplicationSourceInterfacegetServerWALsBelongTo in class ReplicationSourceCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.