From 5f64c2d27bc4c6b554708282d1163a3fe5a8193e Mon Sep 17 00:00:00 2001
From: Michael Stack
Date: Sun, 6 Feb 2011 05:46:39 +0000
Subject: [PATCH] HBASE-3500 Documentation update for replication
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1067598 13f79535-47bb-0310-9956-ffa450edef68
---
CHANGES.txt | 1 +
.../hadoop/hbase/replication/package.html | 13 ++++++++++
src/site/xdoc/replication.xml | 25 +++++++++++--------
3 files changed, 29 insertions(+), 10 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index c55f9d7f5df..e696ee114f2 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -45,6 +45,7 @@ Release 0.91.0 - Unreleased
HBASE-3502 Can't open region because can't open .regioninfo because
AlreadyBeingCreatedException
HBASE-3501 Remove the deletion limit in LogCleaner
+ HBASE-3500 Documentation update for replicatio
IMPROVEMENTS
diff --git a/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html b/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html
index 6f1a087d007..c861f65c1b8 100644
--- a/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html
+++ b/src/main/javadoc/org/apache/hadoop/hbase/replication/package.html
@@ -92,6 +92,7 @@ to another.
<name>hbase.replication</name>
<value>true</value>
</property>
+ deploy the files, and then restart HBase if it was running.
Run the following command in the master's shell while it's running
add_peer
@@ -100,6 +101,18 @@ to another.
to use a different zookeeper.znode.parent since they can't
write in the same folder.
+
+ Once you have a peer, you need to enable replication on your column families.
+ One way to do it is to alter the table and to set the scope like this:
+
+ disable 'your_table'
+ alter 'your_table', {NAME => 'family_name', REPLICATION_SCOPE => '1'}
+ enable 'your_table'
+
+ Currently, a scope of 0 (default) means that it won't be replicated and a
+ scope of 1 means it's going to be. In the future, different scope can be
+ used for routing policies.
+
You can confirm that your setup works by looking at any region server's log
diff --git a/src/site/xdoc/replication.xml b/src/site/xdoc/replication.xml
index 8fc5fcc8c5c..a7bbf8e0faf 100644
--- a/src/site/xdoc/replication.xml
+++ b/src/site/xdoc/replication.xml
@@ -43,7 +43,10 @@
other well known solutions like MySQL master/slave replication where
there’s only one bin log to keep track of. One master cluster can
replicate to any number of slave clusters, and each region server will
- participate to replicate their own stream of edits.
+ participate to replicate their own stream of edits. For more information
+ on the different properties of master/slave replication and other types
+ of replication, please consult
+ How Google Serves Data From Multiple Datacenters.
The replication is done asynchronously, meaning that the clusters can
@@ -73,6 +76,17 @@
+
+
+ The guide on enabling and using cluster replication is contained
+ in the API documentation shipped with your HBase distribution.
+
+
+ The most up-to-date documentation is
+
+ available at this address.
+
+
The following sections describe the life of a single edit going from a
@@ -350,15 +364,6 @@
-
-
- Suppose an edit to cell X happens in a EST cluster, then 2 minutes
- later a new edits happens to the same cell in a PST cluster and that
- both clusters are in a master-master replication. The second edit is
- considered younger, so the first will always hide it while in fact the
- second is older.
-
-
Yes, this is for much later.