Repository: hbase Updated Branches: refs/heads/master 92b494df4 -> 8e547f3ba
HBASE-8844 Document the removal of replication state AKA start/stop_replication (Misty Stanley-Jones) Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8e547f3b Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8e547f3b Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8e547f3b Branch: refs/heads/master Commit: 8e547f3ba73b698fc61d06d54b71fa4baabb0244 Parents: 92b494d Author: Jean-Daniel Cryans <[email protected]> Authored: Fri Jun 13 08:15:26 2014 -0700 Committer: Jean-Daniel Cryans <[email protected]> Committed: Fri Jun 13 08:58:55 2014 -0700 ---------------------------------------------------------------------- .../hadoop/hbase/replication/package.html | 15 ++++++++++++++- src/main/site/xdoc/replication.xml | 20 +------------------- 2 files changed, 15 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/8e547f3b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html index 0029c75..ea4a2af 100644 --- a/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html +++ b/hbase-server/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html @@ -98,7 +98,9 @@ to another. deploy the files, and then restart HBase if it was running. </li> <li>Run the following command in the master's shell while it's running - <pre>add_peer</pre> + <pre>add_peer 'ID' 'CLUSTER_KEY'</pre> + The ID must be a short integer. To compose the CLUSTER_KEY, use the following template: + <pre>hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent</pre> This will show you the help to setup the replication stream between both clusters. If both clusters use the same Zookeeper cluster, you have to use a different <b>zookeeper.znode.parent</b> since they can't @@ -120,6 +122,17 @@ to another. shell <pre>list_peers</pre> (as of version 0.92) </li> + <li>To enable a peer that was previousy disabled, run the following command in the master's shell. + <pre>enable_peer 'ID'</pre> + </li> + <li>To disable a peer, run the following command in the master's shell. This setting causes + HBase to stop sending the edits to that peer cluster, but it still keeps track of all the + new WALs that it will need to replicate if and when it is re-enabled. + <pre>disable_peer 'ID'</pre> + </li> + <li>To remove a peer, use the following command in the master's shell. + <pre>remove_peer 'ID'</pre> + </li> </ol> You can confirm that your setup works by looking at any region server's log http://git-wip-us.apache.org/repos/asf/hbase/blob/8e547f3b/src/main/site/xdoc/replication.xml ---------------------------------------------------------------------- diff --git a/src/main/site/xdoc/replication.xml b/src/main/site/xdoc/replication.xml index c9a765a..97aaf51 100644 --- a/src/main/site/xdoc/replication.xml +++ b/src/main/site/xdoc/replication.xml @@ -169,28 +169,12 @@ /hbase/replication </pre> <p> - There are three major child znodes in the base replication znode: + There are two major child znodes in the base replication znode: <ul> - <li><b>State znode:</b> /hbase/replication/state</li> <li><b>Peers znode:</b> /hbase/replication/peers</li> <li><b>RS znode:</b> /hbase/replication/rs</li> </ul> </p> - <section name="The State znode"> - <p> - The <b>state znode</b> indicates whether or not replication is enabled on the cluster - corresponding to this zookeeper quorum. It does not have any child znodes and simply - contains a boolean value. This value is initialized on startup based on the - <i>hbase.replication</i> config parameter in the <i>hbase-site.xml</i> file. The status - value is read/maintained by the <i>ReplicationZookeeper.ReplicationStatusTracker</i> - class. It is also cached locally using an AtomicBoolean in the <i>ReplicationZookeeper</i> - class. This value can be changed on a live cluster using the <i>stop_replication</i> - command available through the hbase shell. - </p> - <pre> - /hbase/replication/state [VALUE: true] - </pre> - </section> <section name="The Peers znode"> <p> The <b>peers znode</b> contains a list of all peer replication clusters and the @@ -212,7 +196,6 @@ replication is enabled on that peer cluster. These <i>peer-state znodes</i> do not have child znodes and simply contain a boolean value (i.e. ENABLED or DISABLED). This value is read/maintained by the <i>ReplicationPeer.PeerStateTracker</i> class. - It is also cached locally using an AtomicBoolean in the <i>ReplicationPeer</i> class. </p> <pre> /hbase/replication/peers @@ -295,7 +278,6 @@ The default replication znode structure looks like the following: </p> <pre> - /hbase/replication/state /hbase/replication/peers/{peerId}/peer-state /hbase/replication/rs </pre>
