public class Replication extends java.lang.Object implements ReplicationSourceService, ReplicationSinkService
HRegionServer.| Constructor and Description |
|---|
Replication()
Empty constructor
|
| Modifier and Type | Method and Description |
|---|---|
ReplicationSourceManager |
getReplicationManager()
Get the replication sources manager
|
void |
initialize(Server server,
FileSystem fs,
Path logDir,
Path oldLogDir,
WALProvider walProvider)
Initializes the replication service object.
|
void |
join()
Join with the replication threads
|
ReplicationLoad |
refreshAndGetReplicationLoad()
Refresh and Get ReplicationLoad
|
void |
replicateLogEntries(java.util.List<WALEntry> entries,
CellScanner cells,
java.lang.String replicationClusterId,
java.lang.String sourceBaseNamespaceDirPath,
java.lang.String sourceHFileArchiveDirPath)
Carry on the list of log entries down to the sink
|
void |
startReplicationService()
If replication is enabled and this cluster is a master,
it starts
|
void |
stopReplicationService()
Stops replication service.
|
public void initialize(Server server, FileSystem fs, Path logDir, Path oldLogDir, WALProvider walProvider) throws java.io.IOException
ReplicationServiceinitialize in interface ReplicationServicewalProvider - can be null if not initialized inside a live region server environment, for
example, ReplicationSyncUp.java.io.IOExceptionpublic void stopReplicationService()
stopReplicationService in interface ReplicationServicepublic void join()
public void replicateLogEntries(java.util.List<WALEntry> entries,
CellScanner cells,
java.lang.String replicationClusterId,
java.lang.String sourceBaseNamespaceDirPath,
java.lang.String sourceHFileArchiveDirPath)
throws java.io.IOException
replicateLogEntries in interface ReplicationSinkServiceentries - list of entries to replicatecells - The data -- the cells -- that entries describes (the entries do not
contain the Cells we are replicating; they are passed here on the side in this
CellScanner).replicationClusterId - Id which will uniquely identify source cluster FS client
configurations in the replication configuration directorysourceBaseNamespaceDirPath - Path that point to the source cluster base namespace
directory required for replicating hfilessourceHFileArchiveDirPath - Path that point to the source cluster hfile archive directoryjava.io.IOExceptionpublic void startReplicationService()
throws java.io.IOException
startReplicationService in interface ReplicationServicejava.io.IOExceptionpublic ReplicationSourceManager getReplicationManager()
public ReplicationLoad refreshAndGetReplicationLoad()
ReplicationServicerefreshAndGetReplicationLoad in interface ReplicationService