Skip to content

Commit 904150c

Browse files
committed
HBASE-26478 Update ref guide about the new region replication framework (#3885)
Signed-off-by: Yulin Niu <niuyulin@apache.org>
1 parent 81823bb commit 904150c

File tree

1 file changed

+35
-10
lines changed

1 file changed

+35
-10
lines changed

src/main/asciidoc/_chapters/architecture.adoc

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2884,29 +2884,45 @@ secondaries. When they observe the flush/compaction or bulk load event, the
28842884
secondary regions replay the event to pick up the new files and drop the old
28852885
ones.
28862886
2887-
Committing writes in the same order as in primary ensures that the secondaries won’t diverge from the primary regions data, but since the log replication is asynchronous, the data might still be stale in secondary regions. Since this feature works as a replication endpoint, the performance and latency characteristics is expected to be similar to inter-cluster replication.
2887+
Committing writes in the same order as in primary ensures that the secondaries
2888+
won’t diverge from the primary regions data, but since the log replication is
2889+
asynchronous, the data might still be stale in secondary regions.
28882890
28892891
Async WAL Replication is *disabled* by default. You can enable this feature by
2890-
setting `hbase.region.replica.replication.enabled` to `true`. The Async WAL
2891-
Replication feature will add a new replication peer named
2892+
setting `hbase.region.replica.replication.enabled` to `true`.
2893+
2894+
Before 3.0.0, this feature works as a replication endpoint, the performance and
2895+
latency characteristics is expected to be similar to inter-cluster replication.
2896+
And once enabled, it will create a replication peer named
28922897
`region_replica_replication` as a replication peer when you create a table with
2893-
region replication > 1 for the first time. Once enabled, if you want to disable
2894-
this feature, you need to do two actions in the following order:
2895-
* Set configuration property `hbase.region.replica.replication.enabled` to false in `hbase-site.xml` (see Configuration section below)
2896-
* Disable the replication peer named `region_replica_replication` in the cluster using hbase shell or `Admin` class:
2898+
region replication > 1 for the first time.
2899+
2900+
if you want to disable this feature, you need to do two actions in the
2901+
following order:
2902+
* Set configuration property `hbase.region.replica.replication.enabled` to
2903+
false in `hbase-site.xml` (see Configuration section below)
2904+
* Disable the replication peer named `region_replica_replication` in the cluster
2905+
using hbase shell or `Admin` class:
28972906
[source,bourne]
28982907
----
28992908
hbase> disable_peer 'region_replica_replication'
29002909
----
29012910
2902-
Async WAL Replication and the `hbase:meta` table is a little more involved and gets its own section below; see <<async.wal.replication.meta>>
2911+
In 3.0.0, this feature is re-implemented to decouple with the general replication
2912+
framework. Now we do not need to create a special replication peer. And during
2913+
rolling upgrading, we will remove this replication peer automatically if it is
2914+
present. See https://issues.apache.org/jira/browse/HBASE-26233[HBASE-26233] and
2915+
the design doc in our git repo for more details.
2916+
2917+
Async WAL Replication and the `hbase:meta` table is a little more involved and
2918+
gets its own section below; see <<async.wal.replication.meta>>
29032919
29042920
=== Store File TTL
29052921
In both of the write propagation approaches mentioned above, store files of the primary will be opened in secondaries independent of the primary region. So for files that the primary compacted away, the secondaries might still be referring to these files for reading. Both features are using HFileLinks to refer to files, but there is no protection (yet) for guaranteeing that the file will not be deleted prematurely. Thus, as a guard, you should set the configuration property `hbase.master.hfilecleaner.ttl` to a larger value, such as 1 hour to guarantee that you will not receive IOExceptions for requests going to replicas.
29062922
29072923
[[async.wal.replication.meta]]
29082924
=== Region replication for META table’s region
2909-
Async WAL Replication does not work for the META table’s WAL.
2925+
The general Async WAL Replication does not work for the META table’s WAL.
29102926
The meta table’s secondary replicas refresh themselves from the persistent store
29112927
files every `hbase.regionserver.meta.storefile.refresh.period`, (a non-zero value).
29122928
Note how the META replication period is distinct from the user-space
@@ -2924,7 +2940,16 @@ would a user-space table (if `hbase.meta.replica.count` is set, it will take
29242940
precedent over what is set for replica count in the META table updating META
29252941
replica count to match).
29262942
2927-
===== Load Balancing META table load =====
2943+
==== Async WAL Replication for META table as of hbase-3.0.0+ ====
2944+
In https://issues.apache.org/jira/browse/HBASE-26233[HBASE-26233] we
2945+
re-implemented the region replication framework to not rely on the general
2946+
replication framework, so it can work together with META table as well. The
2947+
code described in the above section have been removed mostly, but the config
2948+
`hbase.region.replica.replication.catalog.enabled` is still kept, you
2949+
could still use it to control whether to enable async wal replication for META
2950+
table. And the ability to alter META table is also kept.
2951+
2952+
==== Load Balancing META table load ====
29282953
29292954
hbase-2.4.0 also adds a *new* client-side `LoadBalance` mode. When enabled
29302955
client-side, clients will try to read META replicas first before falling back on

0 commit comments

Comments
 (0)