@InterfaceAudience.Private public class RecoveredReplicationSource extends ReplicationSource
ReplicationSource.LogsComparator
Thread.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, workerThreads
MAX_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, tryThrottle
activeCount, 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, yield
private 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
ReplicationSource
init
in interface ReplicationSourceInterface
init
in class ReplicationSource
conf
- 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 sourceIOException
protected void tryStartNewShipper(String walGroupId, PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue)
tryStartNewShipper
in class ReplicationSource
protected ReplicationSourceWALReader startNewWALReader(String threadName, String walGroupId, PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue, long startPosition)
startNewWALReader
in class ReplicationSource
public void locateRecoveredPaths(PriorityBlockingQueue<org.apache.hadoop.fs.Path> queue) throws IOException
IOException
private org.apache.hadoop.fs.Path getReplSyncUpPath(org.apache.hadoop.fs.Path path) throws IOException
IOException
public void tryFinish()
public String getPeerId()
ReplicationSourceInterface
getPeerId
in interface ReplicationSourceInterface
getPeerId
in class ReplicationSource
public ServerName getServerWALsBelongTo()
ReplicationSourceInterface
getServerWALsBelongTo
in interface ReplicationSourceInterface
getServerWALsBelongTo
in class ReplicationSource
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.