Admin
instead.@InterfaceAudience.Public @Deprecated public class ReplicationAdmin extends Object implements Closeable
This class provides the administrative interface to HBase cluster replication.
Adding a new peer results in creating new outbound connections from every region server to a subset of region servers on the slave cluster. Each new stream of replication will start replicating from the beginning of the current WAL, meaning that edits from that past will be replicated.
Removing a peer is a destructive and irreversible operation that stops all the replication streams for the given cluster and deletes the metadata used to keep track of the replication state.
To see which commands are available in the shell, type
replication
.
Modifier and Type | Field and Description |
---|---|
static String |
CFNAME
Deprecated.
|
static String |
REPLICATIONGLOBAL
Deprecated.
|
static String |
REPLICATIONTYPE
Deprecated.
|
static String |
TNAME
Deprecated.
|
Constructor and Description |
---|
ReplicationAdmin(org.apache.hadoop.conf.Configuration conf)
Deprecated.
Constructor that creates a connection to the local ZooKeeper ensemble.
|
public static final String TNAME
public static final String CFNAME
public static final String REPLICATIONTYPE
public static final String REPLICATIONGLOBAL
public ReplicationAdmin(org.apache.hadoop.conf.Configuration conf) throws IOException
conf
- Configuration to useIOException
- if an internal replication error occursRuntimeException
- if replication isn't enabled.@Deprecated public void addPeer(String id, ReplicationPeerConfig peerConfig, Map<TableName,? extends Collection<String>> tableCfs) throws ReplicationException, IOException
addPeer(String, ReplicationPeerConfig)
instead.id
- a short name that identifies the clusterpeerConfig
- configuration for the replication slave clustertableCfs
- the table and column-family list which will be replicated for this peer.
A map from tableName to column family names. An empty collection can be passed
to indicate replicating all column families. Pass null for replicating all table and column
familiesReplicationException
IOException
@Deprecated public void addPeer(String id, ReplicationPeerConfig peerConfig) throws ReplicationException, IOException
Admin.addReplicationPeer(String, ReplicationPeerConfig)
insteadid
- a short name that identifies the clusterpeerConfig
- configuration for the replication slave clusterReplicationException
IOException
@Deprecated public static Map<TableName,List<String>> parseTableCFsFromConfig(String tableCFsConfig)
@Deprecated public void updatePeerConfig(String id, ReplicationPeerConfig peerConfig) throws IOException
Admin.updateReplicationPeerConfig(String, ReplicationPeerConfig)
insteadIOException
@Deprecated public void removePeer(String id) throws IOException
Admin.removeReplicationPeer(String)
insteadid
- a short name that identifies the clusterIOException
@Deprecated public void enablePeer(String id) throws IOException
Admin.enableReplicationPeer(String)
insteadid
- a short name that identifies the clusterIOException
@Deprecated public void disablePeer(String id) throws IOException
Admin.disableReplicationPeer(String)
insteadid
- a short name that identifies the clusterIOException
@Deprecated public int getPeersCount() throws IOException
IOException
@Deprecated public Map<String,ReplicationPeerConfig> listPeerConfigs() throws IOException
Admin.listReplicationPeers()
insteadIOException
@Deprecated public ReplicationPeerConfig getPeerConfig(String id) throws IOException
Admin.getReplicationPeerConfig(String)
insteadIOException
@Deprecated public String getPeerTableCFs(String id) throws IOException
getPeerConfig(String)
instead.id
- a short name that identifies the clusterIOException
@Deprecated public void appendPeerTableCFs(String id, String tableCfs) throws ReplicationException, IOException
appendPeerTableCFs(String, Map)
instead.id
- a short that identifies the clustertableCfs
- table-cfs config strReplicationException
IOException
@Deprecated public void appendPeerTableCFs(String id, Map<TableName,? extends Collection<String>> tableCfs) throws ReplicationException, IOException
id
- a short that identifies the clustertableCfs
- A map from tableName to column family namesReplicationException
IOException
@Deprecated public void removePeerTableCFs(String id, String tableCf) throws ReplicationException, IOException
removePeerTableCFs(String, Map)
instead.id
- a short name that identifies the clustertableCf
- table-cfs config strReplicationException
IOException
@Deprecated public void removePeerTableCFs(String id, Map<TableName,? extends Collection<String>> tableCfs) throws ReplicationException, IOException
id
- a short name that identifies the clustertableCfs
- A map from tableName to column family namesReplicationException
IOException
@Deprecated public void setPeerTableCFs(String id, Map<TableName,? extends Collection<String>> tableCfs) throws IOException
id
- a short name that identifies the clustertableCfs
- the table and column-family list which will be replicated for this peer.
A map from tableName to column family names. An empty collection can be passed
to indicate replicating all column families. Pass null for replicating all table and column
familiesIOException
@Deprecated public boolean getPeerState(String id) throws ReplicationException, IOException
id
- String format of the Short name that identifies the peer,
an IllegalArgumentException is thrown if it doesn't existReplicationException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
@Deprecated public List<HashMap<String,String>> listReplicated() throws IOException
Admin.listReplicatedTableCFs()
insteadIOException
@Deprecated public void enableTableRep(TableName tableName) throws IOException
Admin.enableTableReplication(TableName)
insteadtableName
- name of the tableIOException
- if a remote or network exception occurs@Deprecated public void disableTableRep(TableName tableName) throws IOException
Admin.disableTableReplication(TableName)
insteadtableName
- name of the tableIOException
- if a remote or network exception occursCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.