HBASE-8844 Document the removal of replication state AKA start/stop_replication (Misty Stanley-Jones)

This commit is contained in:
Jean-Daniel Cryans 2014-06-13 08:15:26 -07:00
parent 92b494df45
commit 8e547f3ba7
2 changed files with 15 additions and 20 deletions

View File

@ -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

View File

@ -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>