@InterfaceAudience.Private public class ReplicationManager extends Object
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf |
private ReplicationPeers |
replicationPeers |
private ReplicationQueuesClient |
replicationQueuesClient |
private ZKWatcher |
zkw |
Constructor and Description |
---|
ReplicationManager(org.apache.hadoop.conf.Configuration conf,
ZKWatcher zkw,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
void |
addReplicationPeer(String peerId,
ReplicationPeerConfig peerConfig,
boolean enabled) |
private void |
checkConfiguredWALEntryFilters(ReplicationPeerConfig peerConfig) |
private void |
checkNamespacesAndTableCfsConfigConflict(Set<String> namespaces,
Map<TableName,? extends Collection<String>> tableCfs)
Set a namespace in the peer config means that all tables in this namespace will be replicated
to the peer cluster.
|
private void |
checkPeerConfig(ReplicationPeerConfig peerConfig)
If replicate_all flag is true, it means all user tables will be replicated to peer cluster.
|
void |
disableReplicationPeer(String peerId) |
void |
enableReplicationPeer(String peerId) |
ReplicationPeerConfig |
getPeerConfig(String peerId) |
List<ReplicationPeerDescription> |
listReplicationPeers(Pattern pattern) |
void |
removeReplicationPeer(String peerId) |
void |
updatePeerConfig(String peerId,
ReplicationPeerConfig peerConfig) |
private final org.apache.hadoop.conf.Configuration conf
private final ReplicationQueuesClient replicationQueuesClient
private final ReplicationPeers replicationPeers
public ReplicationManager(org.apache.hadoop.conf.Configuration conf, ZKWatcher zkw, Abortable abortable) throws IOException
IOException
public void addReplicationPeer(String peerId, ReplicationPeerConfig peerConfig, boolean enabled) throws ReplicationException, IOException
ReplicationException
IOException
public void removeReplicationPeer(String peerId) throws ReplicationException
ReplicationException
public void enableReplicationPeer(String peerId) throws ReplicationException
ReplicationException
public void disableReplicationPeer(String peerId) throws ReplicationException
ReplicationException
public ReplicationPeerConfig getPeerConfig(String peerId) throws ReplicationException, ReplicationPeerNotFoundException
public void updatePeerConfig(String peerId, ReplicationPeerConfig peerConfig) throws ReplicationException, IOException
ReplicationException
IOException
public List<ReplicationPeerDescription> listReplicationPeers(Pattern pattern) throws ReplicationException
ReplicationException
private void checkPeerConfig(ReplicationPeerConfig peerConfig) throws ReplicationException, IOException
ReplicationException
IOException
private void checkNamespacesAndTableCfsConfigConflict(Set<String> namespaces, Map<TableName,? extends Collection<String>> tableCfs) throws ReplicationException
ReplicationException
private void checkConfiguredWALEntryFilters(ReplicationPeerConfig peerConfig) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.