@InterfaceAudience.Private public class Replication extends Object implements ReplicationSourceService, ReplicationSinkService, PropagatingConfigurationObserver
HRegionServer.
Implement PropagatingConfigurationObserver mainly for registering
ReplicationPeers, so we can recreating the replication peer storage.
| Constructor and Description |
|---|
Replication()
Empty constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterChildren(ConfigurationManager manager) |
PeerProcedureHandler |
getPeerProcedureHandler()
Returns a Handler to handle peer procedures.
|
ReplicationSourceManager |
getReplicationManager()
Get the replication sources manager
|
void |
initialize(Server server,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path logDir,
org.apache.hadoop.fs.Path oldLogDir,
WALFactory walFactory)
Initializes the replication service object.
|
void |
join()
Join with the replication threads
|
void |
onConfigurationChange(org.apache.hadoop.conf.Configuration conf) |
ReplicationLoad |
refreshAndGetReplicationLoad()
Refresh and Get ReplicationLoad
|
void |
registerChildren(ConfigurationManager manager) |
void |
replicateLogEntries(List<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry> entries,
CellScanner cells,
String replicationClusterId,
String sourceBaseNamespaceDirPath,
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, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path logDir, org.apache.hadoop.fs.Path oldLogDir, WALFactory walFactory) throws IOException
ReplicationServiceinitialize in interface ReplicationServiceIOExceptionpublic PeerProcedureHandler getPeerProcedureHandler()
ReplicationSourceServicegetPeerProcedureHandler in interface ReplicationSourceServicepublic void stopReplicationService()
stopReplicationService in interface ReplicationServicepublic void join()
public void replicateLogEntries(List<org.apache.hadoop.hbase.shaded.protobuf.generated.AdminProtos.WALEntry> entries, CellScanner cells, String replicationClusterId, String sourceBaseNamespaceDirPath, String sourceHFileArchiveDirPath) throws 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 directoryIOExceptionpublic void startReplicationService()
throws IOException
startReplicationService in interface ReplicationServiceIOExceptionpublic ReplicationSourceManager getReplicationManager()
getReplicationManager in interface ReplicationSourceServicepublic ReplicationLoad refreshAndGetReplicationLoad()
ReplicationServicerefreshAndGetReplicationLoad in interface ReplicationServicepublic void onConfigurationChange(org.apache.hadoop.conf.Configuration conf)
onConfigurationChange in interface ConfigurationObserverpublic void registerChildren(ConfigurationManager manager)
registerChildren in interface PropagatingConfigurationObserverpublic void deregisterChildren(ConfigurationManager manager)
deregisterChildren in interface PropagatingConfigurationObserverCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.