forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
237 lines
46 KiB
HTML
237 lines
46 KiB
HTML
<a name="mrs_01_1609"></a><a name="mrs_01_1609"></a>
|
|
|
|
<h1 class="topictitle1">Configuring HBase DR</h1>
|
|
<div id="body1595926919567"><div class="section" id="mrs_01_1609__s9c6bed471289404ba828223a59d19a6b"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_1609__ade9f6359a5384d09a20aa8fa81885e7f">HBase disaster recovery (DR), a key feature that is used to ensure high availability (HA) of the HBase cluster system, provides the real-time remote DR function for HBase. HBase DR provides basic O&M tools, including tools for maintaining and re-establishing DR relationships, verifying data, and querying data synchronization progress. To implement real-time DR, back up data of an HBase cluster to another HBase cluster. DR in the HBase table common data writing and BulkLoad batch data writing scenarios is supported. </p>
|
|
<div class="note" id="mrs_01_1609__note1286611300323"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_1609__p1486614300321">This section applies to MRS 3.<em id="mrs_01_1609__i13635314125715">x</em> or later clusters.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="mrs_01_1609__s0055f381415e4857abfea720698e5d20"><h4 class="sectiontitle">Prerequisites</h4><ul id="mrs_01_1609__u8cc72485909a4a07a782c2009cd3458d"><li id="mrs_01_1609__l99a9479733b2477ebb92b1b4a9c741cc">The active and standby clusters are successfully installed and started, and you have the administrator permissions on the clusters.</li></ul>
|
|
<ul id="mrs_01_1609__u79c941c210ef4447bf22501634f316c5"><li id="mrs_01_1609__l02a3f8df7d1c46c18e386ce76d9278b2">Ensure that the network connection between the active and standby clusters is normal and ports are available.</li><li id="mrs_01_1609__l042d7806d026482dbe696659fd59aea1">If the active cluster is deployed in security mode and is not managed by one FusionInsight Manager, cross-cluster trust relationship has been configured for the active and standby clusters.. If the active cluster is deployed in normal mode, no cross-cluster mutual trust is required.</li><li id="mrs_01_1609__la2d19ffa10df44c7b2008706a605bc92">Cross-cluster replication has been configured for the active and standby clusters.</li><li id="mrs_01_1609__l555cc6e50fbb42be93a3bb0cb35109e7">Time is consistent between the active and standby clusters and the NTP service on the active and standby clusters uses the same time source.</li><li id="mrs_01_1609__l5f448e22378246578ce41e7d881a378d">Mapping relationships between the names of all hosts in the active and standby clusters and IP addresses have been configured in the hosts files of all the nodes in the active and standby clusters and of the node where the active cluster client resides.</li><li id="mrs_01_1609__l911f914305414f00ab391d8c39652e20">The network bandwidth between the active and standby clusters is determined based on service volume, which cannot be less than the possible maximum service volume.</li><li id="mrs_01_1609__li177211224124820">The MRS versions of the active and standby clusters must be the same.</li><li id="mrs_01_1609__li1818194311412">The scale of the standby cluster must be greater than or equal to that of the active cluster.</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1609__sacae13ecf61c48949ad977b27b2980f8"><h4 class="sectiontitle">Constraints</h4><ul id="mrs_01_1609__u30285edf512147598f0acd31f4af9531"><li id="mrs_01_1609__lf801c745c73f4c4091795ff6be10fc5e">Although DR provides the real-time data replication function, the data synchronization progress is affected by many factors, such as the service volume in the active cluster and the health status of the standby cluster. In normal cases, the standby cluster should not take over services. In extreme cases, system maintenance personnel and other decision makers determine whether the standby cluster takes over services according to the current data synchronization indicators.</li></ul>
|
|
<ul id="mrs_01_1609__u2ec3d8a51e644c419eb3ca8f34ee3cf0"><li id="mrs_01_1609__lbd41e04a12694304ba7d60c1da4baba3">HBase clusters must be deployed in active/standby mode.</li><li id="mrs_01_1609__l95eb0f60edf041e18c92fb4994523eb0">Table-level operations on the DR table of the standby cluster are forbidden, such as modifying the table attributes and deleting the table. Misoperations on the standby cluster will cause data synchronization failure of the active cluster. As a result, table data in the standby cluster is lost.</li><li id="mrs_01_1609__l3d45b524bd2e4dd9a694a5954ab1d130">If the DR data synchronization function is enabled for HBase tables of the active cluster, the DR table structure of the standby cluster needs to be modified to ensure table structure consistency between the active and standby clusters during table structure modification. </li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_01_1609__s07eb958049cb41a99a47c6fded22d004"><h4 class="sectiontitle">Procedure</h4><p id="mrs_01_1609__a80ae4ec3c48146e2b0f619cc98405044"><strong id="mrs_01_1609__b1659275213915">Configuring the common data writing DR parameters for the active cluster</strong></p>
|
|
</div>
|
|
<ol id="mrs_01_1609__o169dc6b2ac674d8fb2c716bae9ed2b6a"><li id="mrs_01_1609__l10d2959960384d92b4fc58d293e18778"><span>Log in to Manager of the active cluster.</span></li><li id="mrs_01_1609__lcb4093c94c7a4d99b8b8d369d46d53ee"><span>Choose <strong id="mrs_01_1609__b3542912134016">Cluster</strong> > <em id="mrs_01_1609__i154381264018">Name of the desired cluster</em> > <strong id="mrs_01_1609__b254311122406">Services</strong> > <strong id="mrs_01_1609__b1954311124403">HBase</strong> > <strong id="mrs_01_1609__b154411129405">Configurations</strong> and click <strong id="mrs_01_1609__b14544121224010">All Configurations</strong>. The HBase configuration page is displayed.</span></li><li id="mrs_01_1609__l6578a6eefe0341dc879738b875753aba"><span>(Optional) <a href="#mrs_01_1609__tcc2ebdc7794f4718bf8175f779496069">Table 1</a> describes the optional configuration items during HBase DR. You can set the parameters based on the description or use the default values.</span><p>
|
|
<div class="tablenoborder"><a name="mrs_01_1609__tcc2ebdc7794f4718bf8175f779496069"></a><a name="tcc2ebdc7794f4718bf8175f779496069"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1609__tcc2ebdc7794f4718bf8175f779496069" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Optional configuration items</caption><thead align="left"><tr id="mrs_01_1609__rfa718055b3e243c48d70cd1015cef214"><th align="left" class="cellrowborder" valign="top" width="18.98%" id="mcps1.3.5.3.2.1.2.5.1.1"><p id="mrs_01_1609__a8ae58b00bb0b46d4a708cea2ca1cc9f4">Navigation Path</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="28.01%" id="mcps1.3.5.3.2.1.2.5.1.2"><p id="mrs_01_1609__a0dc64e89c05e4e59a6252384e77fac45">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.350000000000001%" id="mcps1.3.5.3.2.1.2.5.1.3"><p id="mrs_01_1609__ab9282c26fd4143d4bc04ac1806b38e25">Default Value</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.660000000000004%" id="mcps1.3.5.3.2.1.2.5.1.4"><p id="mrs_01_1609__a51ef30fec865406ea8affdd557593780">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1609__r832186d96216492f80ecb70c3ef2f5e1"><td class="cellrowborder" rowspan="2" valign="top" width="18.98%" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__ae70aed75e72d4c24a13a4283b17ada0e">HMaster > Performance</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.01%" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__ad66b0a10aabb42feaad5ac5c122d423c">hbase.master.logcleaner.ttl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__ac5ae253bd2a249a7bea6317901b24055">600000</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.660000000000004%" headers="mcps1.3.5.3.2.1.2.5.1.4 "><p id="mrs_01_1609__a92a1a63ed89f4c91b90f98ea5d2120ae">Specifies the retention period of HLog. If the value is set to <strong id="mrs_01_1609__b03803386306">604800000</strong> (unit: millisecond), the retention period of HLog is 7 days.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__rd31fe02b065746a59765aa4781b1c355"><td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__a95a4aff72fe84242ae9b99c7e37eb165">hbase.master.cleaner.interval</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__a362f4d33f9904c25a40f8dc4e812781d">60000</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__a7d86530b5d424616a2ff6c927a887c49">Interval for the HMaster to delete historical HLog files. The HLog that exceeds the configured period will be automatically deleted. You are advised to set it to the maximum value to save more HLogs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__r469a13d71f464cf680fe44e20105bdee"><td class="cellrowborder" rowspan="5" valign="top" width="18.98%" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__a6ebaa822a8a04a568faa6e856e975eba">RegionServer > Replication</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="28.01%" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__a66eba58af9cd4306bf515e16bda8328c">replication.source.size.capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.350000000000001%" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__a9af7145507584d75935317ae7f0fa80e">16777216</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.660000000000004%" headers="mcps1.3.5.3.2.1.2.5.1.4 "><p id="mrs_01_1609__a88ed0c3882e44cccb9dae9261513b6da">Maximum size of edits, in bytes. If the edit size exceeds the value, HLog edits will be sent to the standby cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__r9de73b50711b435a84889d2ca1c1c864"><td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__a3cf2462297fc45c3aaaac2aaebe0ac4a">replication.source.nb.capacity</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__a64931531280c418ebac00e58466f9a2d">25000</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__aa36da7268c9946a49f62cb496e725b51">Maximum number of edits, which is another condition for triggering HLog edits to be sent to the standby cluster. After data in the active cluster is synchronized to the standby cluster, the active cluster reads and sends data in HLog according to this parameter value. This parameter is used together with <strong id="mrs_01_1609__b336432719577">replication.source.size.capacity</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__r153f2e0506e24c6e97d1dac275486d6e"><td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__af87a3b2b51c240159cfdb8550d4ffe5e">replication.source.maxretriesmultiplier</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__a79fde18fb9074b539aafa02760aed18c">10</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__aea950e2ed3a4440f8a7ed568eb1a4164">Maximum number of retries when an exception occurs during replication.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__re501670a0fe74fef80a2fd4ccdc35dfb"><td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__ac98cc1901be24037b8e5c24ce7e18bd4">replication.source.sleepforretries</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__a0ec494703e5e44839932d4955d6e08b3">1000</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__a3aad1be328044729a54970f0f21ebacf">Retry interval (Unit: ms)</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__rf5a1ec0d66f244a0b59f6fb034159e7a"><td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.1 "><p id="mrs_01_1609__a582aab54f2e7475f83eaeaa098ef452f">hbase.regionserver.replication.handler.count</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.2 "><p id="mrs_01_1609__a19e83e2637d841d4bb9df24bbafb9a23">6</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" headers="mcps1.3.5.3.2.1.2.5.1.3 "><p id="mrs_01_1609__acefa80c765e740168c6b6048e620c0b7">Number of replication RPC server instances on RegionServer</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</p></li></ol>
|
|
<p id="mrs_01_1609__a0c92240be54d41cca88d5c0357b91228"><strong id="mrs_01_1609__b16852114016574">Configuring the BulkLoad batch data writing DR parameters for the active cluster</strong></p>
|
|
<ol start="4" id="mrs_01_1609__o754af4978d2944e1ab5a0c898fce1b4f"><li id="mrs_01_1609__lc1e37bc682aa4f1a84bdc415a3f65f1f"><span>Determine whether to enable the BulkLoad batch data writing DR function.</span><p><p id="mrs_01_1609__a87708b80e96c41f78e5e2afc2def450f">If yes, go to <a href="#mrs_01_1609__l4716d1d3802e4b24ba3b3b49cf396866">5</a>.</p>
|
|
<p id="mrs_01_1609__a81ba2436ca8a492bb53cbacb1a4e88de">If no, go to <a href="#mrs_01_1609__l3a38ddf2af1b455995b7223d0fe94c23">8</a>.</p>
|
|
</p></li><li id="mrs_01_1609__l4716d1d3802e4b24ba3b3b49cf396866"><a name="mrs_01_1609__l4716d1d3802e4b24ba3b3b49cf396866"></a><a name="l4716d1d3802e4b24ba3b3b49cf396866"></a><span>Choose <strong id="mrs_01_1609__b577410521578">Cluster</strong> > <em id="mrs_01_1609__i3774115275720">Name of the desired cluster</em> > <strong id="mrs_01_1609__b147741752165717">Services</strong> > <strong id="mrs_01_1609__b177595265717">HBase</strong> > <strong id="mrs_01_1609__b1877585255720">Configurations</strong> and click <strong id="mrs_01_1609__b277595295711">All Configurations</strong>. The HBase configuration page is displayed.</span></li><li id="mrs_01_1609__le6a5bd0597304b0fab360da08bf2f337"><span>Search for <strong id="mrs_01_1609__b17529165815710">hbase.replication.bulkload.enabled</strong> and change its value to <strong id="mrs_01_1609__b3777824185819">true</strong> to enable the BulkLoad batch data writing DR function.</span></li><li id="mrs_01_1609__l50fef15c044c4d74a689d50b5993ad5a"><span>Search for <strong id="mrs_01_1609__b544523605816">hbase.replication.cluster.id</strong> and change the HBase ID of the active cluster. The ID is used by the standby cluster to connect to the active cluster. The value can contain uppercase letters, lowercase letters, digits, and underscores (_), and cannot exceed 30 characters.</span></li></ol>
|
|
<p id="mrs_01_1609__a1e2f9c187239482baad8056ffe9c357e"><strong id="mrs_01_1609__b61481410185915">Restarting the HBase service and install the client</strong></p>
|
|
<ol start="8" id="mrs_01_1609__o4abf0555d68d430ca0b851d46720e19f"><li id="mrs_01_1609__l3a38ddf2af1b455995b7223d0fe94c23"><a name="mrs_01_1609__l3a38ddf2af1b455995b7223d0fe94c23"></a><a name="l3a38ddf2af1b455995b7223d0fe94c23"></a><span>Click <strong id="mrs_01_1609__b146710115591">Save</strong>. In the displayed dialog box, click <strong id="mrs_01_1609__b17606412195914">OK</strong>. Restart the HBase service.</span></li><li id="mrs_01_1609__ld41c100d760b4f43aeea74735b353151"><span>In the active and standby clusters, choose <strong id="mrs_01_1609__b264394511595">Cluster</strong> > <strong id="mrs_01_1609__b14643445175915"><em id="mrs_01_1609__i146378368594">Name of the desired cluster</em></strong> > <strong id="mrs_01_1609__b19313161135020">Service</strong> > <strong id="mrs_01_1609__b331374205019">HBase</strong> > <strong id="mrs_01_1609__b931311635010">More</strong> > <strong id="mrs_01_1609__b148097910509">Download Client</strong> to download the client and install it.</span></li></ol>
|
|
<p id="mrs_01_1609__aa96d7a217b7a4ae19e7fc2799f9a9beb"><strong id="mrs_01_1609__b17565010703">Adding the DR relationship between the active and standby clusters</strong></p>
|
|
<ol start="10" id="mrs_01_1609__o2746b5cf2a7e451a95062a256c22d9a7"><li id="mrs_01_1609__l0b0687211a0f40a8a4a2df198c89dca3"><span>Log in as user <strong id="mrs_01_1609__b115941179017">hbase</strong> to the HBase shell page of the active cluster.</span></li><li id="mrs_01_1609__l81439b113e2c4682a786fed2933688fd"><span>Run the following command on HBase Shell to create the DR synchronization relationship between the active cluster HBase and the standby cluster HBase.</span><p><p id="mrs_01_1609__a5628bb024b5f41579912352b48da0201"><strong id="mrs_01_1609__b7267111064116">add_peer '</strong><em id="mrs_01_1609__i2027218105411">Standby cluster ID</em><strong id="mrs_01_1609__b93661413124116">', CLUSTER_KEY => "</strong><em id="mrs_01_1609__i2373111311411">ZooKeeper service IP address in the standby cluster </em><strong id="mrs_01_1609__b08021874112">", CONFIG => {"hbase.regionserver.kerberos.principal" => "</strong><em id="mrs_01_1609__i148512183411">Standby cluster RegionServer principal</em><strong id="mrs_01_1609__b12323121104111">", "hbase.master.kerberos.principal" => "</strong><em id="mrs_01_1609__i1032913212413">Standby cluster HMaster principal</em><strong id="mrs_01_1609__b2323162112413">"}</strong></p>
|
|
<ul id="mrs_01_1609__ub0646755d54840cb97aa19f19a2fff71"><li id="mrs_01_1609__ld623da1f32c34ef5840882e4894835c0">The standby cluster ID indicates the ID for the active cluster to recognize the standby cluster. Enter an ID. The value can be specified randomly. Digits are recommended.</li><li id="mrs_01_1609__l5539cc359e2e4b0dbe1a786bb7ad9ff8">The ZooKeeper address of the standby cluster includes the service IP address of ZooKeeper, the port for listening to client connections, and the HBase root directory of the standby cluster on ZooKeeper.</li><li id="mrs_01_1609__li174704313017">Search for <strong id="mrs_01_1609__b81962091215">hbase.master.kerberos.principal</strong> and <strong id="mrs_01_1609__b34271987128">hbase.regionserver.kerberos.principal</strong> in the HBase <strong id="mrs_01_1609__b977114148122">hbase-site.xml</strong> configuration file of the standby cluster.</li></ul>
|
|
<p id="mrs_01_1609__p8988123120393">For example, to add the DR relationship between the active and standby clusters, run the <strong id="mrs_01_1609__b11489174334010">add_peer '</strong><em id="mrs_01_1609__i1049744320405">Standby cluster ID</em><strong id="mrs_01_1609__b34911743134012">', CLUSTER_KEY => "<em id="mrs_01_1609__i14917435404">192.168.40.2,192.168.40.3,192.168.40.4:24002:/hbase</em>", CONFIG => {"hbase.regionserver.kerberos.principal" => "<em id="mrs_01_1609__i5491743114011">hbase/hadoop.hadoop.com@HADOOP.COM</em>", "hbase.master.kerberos.principal" => "<em id="mrs_01_1609__i12491124384014">hbase/hadoop.hadoop.com@HADOOP.COM</em>"}</strong></p>
|
|
</p></li><li id="mrs_01_1609__li94881558184110"><span>(Optional) If the BulkLoad batch data write DR function is enabled, the HBase client configuration of the active cluster must be copied to the standby cluster.</span><p><ul id="mrs_01_1609__ul380103319465"><li id="mrs_01_1609__li1880119338462">Create the <strong id="mrs_01_1609__b1226121071619">/hbase/replicationConf/</strong><em id="mrs_01_1609__i1664011211813"><strong id="mrs_01_1609__b01887122180">hbase.replication.cluster.id of the active cluster</strong></em> directory in the HDFS of the standby cluster.</li><li id="mrs_01_1609__li196701236194610">HBase client configuration file, which is copied to the <strong id="mrs_01_1609__b48516151739">/hbase/replicationConf/<em id="mrs_01_1609__i2323142518311">hbase.replication.cluster.id of the active cluster</em></strong> directory of the HDFS of the standby cluster.<p id="mrs_01_1609__p519422419484">Example: <strong id="mrs_01_1609__b388015861917">hdfs dfs -put HBase/hbase/conf/core-site.xml HBase/hbase/conf/hdfs-site.xml HBase/hbase/conf/yarn-site.xml hdfs://<em id="mrs_01_1609__i647961771910">NameNode IP</em>:<em id="mrs_01_1609__i885752320194">25000</em>/hbase/replicationConf/<em id="mrs_01_1609__i155299303199">source_cluster</em></strong></p>
|
|
</li></ul>
|
|
</p></li></ol>
|
|
<p id="mrs_01_1609__a2d134292236e40c99e20864e71abb9a3"><strong id="mrs_01_1609__b1367131918515">Enabling HBase DR to synchronize data</strong></p>
|
|
<ol start="13" id="mrs_01_1609__ol154511151013"><li id="mrs_01_1609__li6545181518111"><span>Check whether a naming space exists in the HBase service instance of the standby cluster and the naming space has the same name as the naming space of the HBase table for which the DR function is to be enabled.</span><p><ul id="mrs_01_1609__ul135453151118"><li id="mrs_01_1609__li354516151911">If the same namespace exists, go to <a href="#mrs_01_1609__li254519151517">14</a>.</li><li id="mrs_01_1609__li454520159113">If no, create a naming space with the same name in the HBase shell of the standby cluster and go to <a href="#mrs_01_1609__li254519151517">14</a>.</li></ul>
|
|
</p></li><li id="mrs_01_1609__li254519151517"><a name="mrs_01_1609__li254519151517"></a><a name="li254519151517"></a><span>In the HBase shell of the active cluster, run the following command as user <strong id="mrs_01_1609__b176005351353">hbase</strong> to enable the real-time DR function for the table data of the active cluster to ensure that the data modified in the active cluster can be synchronized to the standby cluster in real time.</span><p><p id="mrs_01_1609__p165452152011">You can only synchronize the data of one HTable at a time.</p>
|
|
<p id="mrs_01_1609__p354514151910"><strong id="mrs_01_1609__b236218391756">enable_table_replication '</strong><em id="mrs_01_1609__i5362103915511">table name</em><strong id="mrs_01_1609__b208179551758">'</strong></p>
|
|
<div class="note" id="mrs_01_1609__note25451615811"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1609__ul20545815818"><li id="mrs_01_1609__li1154510152119">If the standby cluster does not contain a table with the same name as the table for which real-time synchronization is to be enabled, the table is automatically created.</li><li id="mrs_01_1609__li454517153119">If a table with the same name as the table for which real-time synchronization is to be enabled exists in the standby cluster, the structures of the two tables must be the same.</li><li id="mrs_01_1609__li145450153119">If the encryption algorithm SMS4 or AES is configured for '<em id="mrs_01_1609__i13744039620">Table name</em>', the function for synchronizing data from the active cluster to the standby cluster cannot be enabled for the HBase table.</li><li id="mrs_01_1609__li9545615915">If the standby cluster is offline or has tables with the same name but different structures, the DR function cannot be enabled.</li><li id="mrs_01_1609__li75457151213">If the DR data synchronization function is enabled for some Phoenix tables in the active cluster, the standby cluster cannot have common HBase tables with the same names as the Phoenix tables in the active cluster. Otherwise, the DR function fails to be enabled or the tables with the names in the standby cluster cannot be used properly.</li><li id="mrs_01_1609__li554518158117">If the DR data synchronization function is enabled for Phoenix tables in the active cluster, you need to enable the DR data synchronization function for the metadata tables of the Phoenix tables. The metadata tables include SYSTEM.CATALOG, SYSTEM.FUNCTION, SYSTEM.SEQUENCE, and SYSTEM.STATS.</li><li id="mrs_01_1609__li554516152118">If the DR data synchronization function is enabled for HBase tables of the active cluster, after adding new indexes to HBase tables, you need to manually add secondary indexes to DR tables in the standby cluster to ensure secondary index consistency between the active and standby clusters.</li><li id="mrs_01_1609__li45456152017">The HBase multi-instance function also supports DR. You need to modify the parameters on the HBase service instance that corresponds to the standby cluster and run the commands on the clients of multiple instances. When adding the DR relationship, you need to select the directory, such as <strong id="mrs_01_1609__b5958217563">hbase1</strong>, for ZooKeeper of the standby cluster to store HBase multi-instance data.</li></ul>
|
|
</div></div>
|
|
</p></li><li id="mrs_01_1609__li1354518150116"><span>(Optional) If HBase does not use Ranger, run the following command as user <strong id="mrs_01_1609__b452751918612">hbase</strong> in the HBase shell of the active cluster to enable the real-time permission to control data DR function for the HBase tables in the active cluster.</span><p><p id="mrs_01_1609__p85451815415"><strong id="mrs_01_1609__b1654551516120">enable_table_replication 'hbase:acl'</strong></p>
|
|
</p></li></ol>
|
|
<p id="mrs_01_1609__a2b54e21471444bc289d70a09b0724dce"><strong id="mrs_01_1609__b14735152119617">Creating Users</strong></p>
|
|
<ol start="16" id="mrs_01_1609__ol145314189112"><li id="mrs_01_1609__li184535181311"><span>Log in to FusionInsight Manager of the standby cluster, choose <strong id="mrs_01_1609__b199915226618">System</strong> > <strong id="mrs_01_1609__b99993221365">Permission</strong> > <strong id="mrs_01_1609__b14999522561">Role</strong> > <strong id="mrs_01_1609__b12999122768">Create Role</strong> to create a role, and add the same permission for the standby data table to the role based on the permission of the HBase source data table of the active cluster.</span></li><li id="mrs_01_1609__li1245315181511"><span>Choose <strong id="mrs_01_1609__b137192513617">System</strong> > <strong id="mrs_01_1609__b971102519617">Permission</strong> > <strong id="mrs_01_1609__b197120251063">User</strong> > <strong id="mrs_01_1609__b172425469">Create</strong> to create a user. Set the <strong id="mrs_01_1609__b3721425964">User Type</strong> to <strong id="mrs_01_1609__b5726257612">Human-Machine</strong> or <strong id="mrs_01_1609__b137242519617">Machine-Machine</strong> based on service requirements and add the user to the created role. Access the HBase DR data of the standby cluster as the newly created user.</span><p><div class="note" id="mrs_01_1609__note94531318812"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1609__ul1684614381891"><li id="mrs_01_1609__li11846103818914">After the permission of the active HBase source data table is modified, to ensure that the standby cluster can properly read data, modify the role permission for the standby cluster.</li><li id="mrs_01_1609__li198461738398">If the current component uses Ranger for permission control, you need to configure permission management policies based on Ranger. For details, see <a href="mrs_01_1857.html">Adding a Ranger Access Permission Policy for HBase</a>.</li></ul>
|
|
</div></div>
|
|
</p></li></ol>
|
|
<p id="mrs_01_1609__p1053216181332"><strong id="mrs_01_1609__b1719545720610">Synchronizing the table data of the active cluster</strong></p>
|
|
<ol start="18" id="mrs_01_1609__ol11511163715916"><li id="mrs_01_1609__li15511137185914"><span>After HBase DR is configured and data synchronization is enabled, check whether tables and data exist in the active cluster and whether the historical data needs to be synchronized to the standby cluster.</span><p><ul id="mrs_01_1609__ul8511113718597"><li id="mrs_01_1609__li651163715910">If yes, a table exists and data needs to be synchronized. Log in as the HBase table user to the node where the HBase client of the active cluster is installed and run the kinit username to authenticate the identity. The user must have the read and write permissions on tables and the execute permission on the <strong id="mrs_01_1609__b129121421574">hbase:meta</strong> table. Then go to <a href="#mrs_01_1609__li2511113725912">19</a>.</li><li id="mrs_01_1609__li1511103715593">If no, no further action is required.</li></ul>
|
|
</p></li><li id="mrs_01_1609__li2511113725912"><a name="mrs_01_1609__li2511113725912"></a><a name="li2511113725912"></a><span>The HBase DR configuration does not support automatic synchronization of historical data in tables. You need to back up the historical data of the active cluster and then manually restore the historical data in the standby cluster.</span><p><p id="mrs_01_1609__p185111137155912">Manual recovery refers to the recovery of a single table, which can be performed through Export, DistCp, or Import.</p>
|
|
<p id="mrs_01_1609__p151114373599">To manually recover a single table, perform the following steps:</p>
|
|
<ol type="a" id="mrs_01_1609__ol1651117378595"><li id="mrs_01_1609__li1451163719595">Export table data from the active cluster.<p id="mrs_01_1609__p451118371592"><a name="mrs_01_1609__li1451163719595"></a><a name="li1451163719595"></a><strong id="mrs_01_1609__b173020426710">hbase org.apache.hadoop.hbase.mapreduce.Export -Dhbase.mapreduce.include.deleted.rows=true</strong> <em id="mrs_01_1609__i9351142075">Table name</em> <em id="mrs_01_1609__i16355428719">Directory where the source data is stored</em></p>
|
|
<p id="mrs_01_1609__p13511113775918">Example: <strong id="mrs_01_1609__b1844213451378">hbase org.apache.hadoop.hbase.mapreduce.Export -Dhbase.mapreduce.include.deleted.rows=true t1 /user/hbase/t1</strong></p>
|
|
</li><li id="mrs_01_1609__li1551114371598">Copy the data that has been exported to the standby cluster.<p id="mrs_01_1609__p851193775914"><a name="mrs_01_1609__li1551114371598"></a><a name="li1551114371598"></a><strong id="mrs_01_1609__b12227184816719">hadoop distcp</strong><em id="mrs_01_1609__i132283481776"> directory where the source data is stored on the active cluster </em><strong id="mrs_01_1609__b7228134817712">hdfs://</strong><em id="mrs_01_1609__i1022864814713">ActiveNameNodeIP:8020/directory where the source data is stored on the standby cluster</em></p>
|
|
<p id="mrs_01_1609__p105111437155910"><strong id="mrs_01_1609__b38433261187">ActiveNameNodeIP</strong> indicates the IP address of the active NameNode in the standby cluster.</p>
|
|
<p id="mrs_01_1609__p17511193785915">Example: <strong id="mrs_01_1609__b18867136380">hadoop distcp /user/hbase/t1 hdfs://192.168.40.2:8020/user/hbase/t1</strong></p>
|
|
</li><li id="mrs_01_1609__li13511437175912">Import data to the standby cluster as the HBase table user of the standby cluster.<p id="mrs_01_1609__p5273102316719"><a name="mrs_01_1609__li13511437175912"></a><a name="li13511437175912"></a>On the HBase shell screen of the standby cluster, run the following command as user <strong id="mrs_01_1609__b15324121617513">hbase</strong> to retain the data writing status:</p>
|
|
<p id="mrs_01_1609__p19560957818"><strong id="mrs_01_1609__b11560654815">set_clusterState_active</strong></p>
|
|
<p id="mrs_01_1609__p9560452086">The command is run successfully if the following information is displayed:</p>
|
|
<pre class="screen" id="mrs_01_1609__screen1456095389">hbase(main):001:0> set_clusterState_active
|
|
=> true</pre>
|
|
<p id="mrs_01_1609__p205119374592"><strong id="mrs_01_1609__b1364914551787">hbase org.apache.hadoop.hbase.mapreduce.Import</strong> <em id="mrs_01_1609__i1865413551282">-Dimport.bulk.output=Directory where the output data is stored in the standby cluster Table name Directory where the source data is stored in the standby cluster</em></p>
|
|
<p id="mrs_01_1609__p10511123712596"><strong id="mrs_01_1609__b95327584813">hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles</strong> <em id="mrs_01_1609__i1753717589817">Directory where the output data is stored in the standby cluster Table name</em></p>
|
|
<p id="mrs_01_1609__p162784011502">Example:</p>
|
|
<pre class="screen" id="mrs_01_1609__screen10139141116371">hbase(main):001:0> set_clusterState_active
|
|
=> true</pre>
|
|
<p id="mrs_01_1609__p19511123775913"><strong id="mrs_01_1609__b1511113715598">hbase org.apache.hadoop.hbase.mapreduce.Import -Dimport.bulk.output=/user/hbase/output_t1 t1 /user/hbase/t1</strong></p>
|
|
<p id="mrs_01_1609__p3511837135915"><strong id="mrs_01_1609__b12511123720591">hbase org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles /user/hbase/output_t1 t1</strong></p>
|
|
</li></ol>
|
|
</p></li></ol><ol start="20" id="mrs_01_1609__ol1055864145914"><li id="mrs_01_1609__li14558144113594"><span>Run the following command on the HBase client to check the synchronized data of the active and standby clusters. After the DR data synchronization function is enabled, you can run this command to check whether the newly synchronized data is consistent.</span><p><p id="mrs_01_1609__p1555820412595"><strong id="mrs_01_1609__b79435615534">hbase org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication --starttime</strong><em id="mrs_01_1609__i139535615312">=Start time</em> <strong id="mrs_01_1609__b1795125675318">--endtime</strong><em id="mrs_01_1609__i12955565538">=End time</em> <em id="mrs_01_1609__i10959566538">Column family name ID of the standby cluster Table name</em></p>
|
|
<div class="note" id="mrs_01_1609__note35581641135913"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_1609__ul25581041155916"><li id="mrs_01_1609__li19558114111591">The start time must be earlier than the end time.</li><li id="mrs_01_1609__li155581441125913">The values of <strong id="mrs_01_1609__b17506192017915">starttime</strong> and <strong id="mrs_01_1609__b95111720896">endtime</strong> must be in the timestamp format. You need to run <strong id="mrs_01_1609__b6512122016911">date -d "2015-09-30 00:00:00" +%s to</strong> change a common time format to a timestamp format.</li></ul>
|
|
</div></div>
|
|
</p></li></ol>
|
|
<p id="mrs_01_1609__p6181055105614"><strong id="mrs_01_1609__b8921722193">Specify the data writing status for the active and standby clusters.</strong></p>
|
|
<ol start="21" id="mrs_01_1609__ol048054495910"><li id="mrs_01_1609__li114809449590"><span>On the HBase shell screen of the active cluster, run the following command as user <strong id="mrs_01_1609__b177212246914">hbase</strong> to retain the data writing status:</span><p><p id="mrs_01_1609__p13480124415595"><strong id="mrs_01_1609__b13480344195917">set_clusterState_active</strong></p>
|
|
<p id="mrs_01_1609__p154804444591">The command is run successfully if the following information is displayed:</p>
|
|
<pre class="screen" id="mrs_01_1609__screen348015447599">hbase(main):001:0> set_clusterState_active
|
|
=> true</pre>
|
|
</p></li><li id="mrs_01_1609__li848074419591"><span>On the HBase shell screen of the standby cluster, run the following command as user <strong id="mrs_01_1609__b13809428593">hbase</strong> to retain the data read-only status:</span><p><p id="mrs_01_1609__p94801644175910"><strong id="mrs_01_1609__b104801244125912">set_clusterState_standby</strong></p>
|
|
<p id="mrs_01_1609__p11480134416592">The command is run successfully if the following information is displayed:</p>
|
|
<pre class="screen" id="mrs_01_1609__screen448074419591">hbase(main):001:0> set_clusterState_standby
|
|
=> true</pre>
|
|
</p></li></ol>
|
|
<div class="section" id="mrs_01_1609__sdba7303bedcf49e18e191e7212d6133e"><h4 class="sectiontitle">Related Commands</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_1609__t0185085179054e1bbb7dc8a7dda9f276" frame="border" border="1" rules="all"><caption><b>Table 2 </b>HBase DR</caption><thead align="left"><tr id="mrs_01_1609__r11d088991b56459fbe300119ab9470a4"><th align="left" class="cellrowborder" valign="top" width="15.661566156615661%" id="mcps1.3.21.2.2.4.1.1"><p id="mrs_01_1609__aa4b600e723c34c2aa1297762472aa7b3">Operation</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="41.7941794179418%" id="mcps1.3.21.2.2.4.1.2"><p id="mrs_01_1609__a4abf120c1bce4affaa022a7ce06897c5">Command</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.544254425442546%" id="mcps1.3.21.2.2.4.1.3"><p id="mrs_01_1609__a55600d78518048049863a23a65628482">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_01_1609__r019e58433fe04a57a14e9c6d08594903"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__a80fcbf67f0124378aa1a9d4de1cce457">Set up a DR relationship.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__p09825370288">add_peer'<em id="mrs_01_1609__i1871424822115">Standby cluster ID</em>', CLUSTER_KEY => "<em id="mrs_01_1609__i7508135512119">Standby cluster ZooKeeper service IP address</em>", CONFIG => {"hbase.regionserver.kerberos.principal" => "<em id="mrs_01_1609__i159404913225">Standby cluster RegionServer principal</em>", "hbase.master.kerberos.principal" => "<em id="mrs_01_1609__i1043821872219">Standby cluster HMaster principal</em>"}</p>
|
|
<p id="mrs_01_1609__a9f528b3a0f73456d8370b96aed8a0b08"><strong id="mrs_01_1609__aea9caca5c40f4e9598ed226b73b0dde1">add_peer '1','zk1,zk2,zk3:2181:/hbase1'</strong></p>
|
|
<p id="mrs_01_1609__ab18a7bd5056e49cf9a18746f1d3f3038"><strong id="mrs_01_1609__b175961643445">2181</strong>: port number of ZooKeeper in the cluster</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__aba3ce6668ae24b688afc71b9da3a4e0f">Set up the relationship between the active cluster and the standby cluster.</p>
|
|
<p id="mrs_01_1609__p1997762453111">If BulkLoad batch data write DR is enabled:</p>
|
|
<ul id="mrs_01_1609__ul770924733013"><li id="mrs_01_1609__li1470904712303">Create the <strong id="mrs_01_1609__b1277710182313">/hbase/replicationConf/<em id="mrs_01_1609__i227512542318">hbase.replication.cluster.id of the active cluster</em></strong> directory in the HDFS of the standby cluster.</li><li id="mrs_01_1609__li171012477300">HBase client configuration file, which is copied to the <strong id="mrs_01_1609__b102011853430">/hbase/replicationConf/<em id="mrs_01_1609__i131969534313">hbase.replication.cluster.id of the active cluster</em></strong> directory of the HDFS of the standby cluster.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__rc1f75bba69114834a2b9af19003c5ab4"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__adb10a1dd7bec4608b7a8386e8301ef46">Remove the DR relationship.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__a663f8cac9a284145b95f689ad0884968"><strong id="mrs_01_1609__b9799122381017">remove_peer</strong> <em id="mrs_01_1609__i980414231105">'Standby cluster ID'</em></p>
|
|
<p id="mrs_01_1609__a207cdd227b114a83b1809ab117f668d6">Example:</p>
|
|
<p id="mrs_01_1609__a43bd727f8146439e816c40505c8a7b29"><strong id="mrs_01_1609__a4902dce1c1f941939181c94a524486b7">remove_peer '1'</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__a7f902a16df514b44b2fe4d8f4e1cd4e2">Remove standby cluster information from the active cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__rd585d7beb25f4ec7b5e20f0061da161b"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__aa007fcaf2fab45d7a6a4db8778ba4922">Querying the DR Relationship</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__ad696c631513c43dbaec5cd37531028b1"><strong id="mrs_01_1609__a7d63d4126eaf435e8e1e1c224add5c20">list_peers</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__a3ba74dafdbdc42079b035ed8dc2767f9">Query standby cluster information (mainly Zookeeper information) in the active cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__rf805328c9bef471a8dc75c5734f3797a"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__a410271a04041430cbd3fdb7ebe04ce72">Enable the real-time user table synchronization function.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__adc78874d9b304847aa85c9f8dca76d0d"><strong id="mrs_01_1609__b10183133471019">enable_table_replication</strong> <em id="mrs_01_1609__i4188173410109">'Table name'</em></p>
|
|
<p id="mrs_01_1609__a22fe66640737475c9c0337470bbb2fad">Example:</p>
|
|
<p id="mrs_01_1609__adf76cc5c495f44d28aba29cf2aea04a3"><strong id="mrs_01_1609__a60260d4b7a1748d78819d6db78a60714">enable_table_replication 't1'</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__a5465f2a27a01414888b5ef1cb274a776">Synchronize user tables from the active cluster to the standby cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__r5b8556df96844800a85d1f473d06a70e"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__a9a4727c180404ac79cc6c9f95daac8d1">Disable the real-time user table synchronization function.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__a4786b68b8011429780f01c4708ee5407"><strong id="mrs_01_1609__b03691840171017">disable_table_replication</strong> <em id="mrs_01_1609__i18374124019100">'Table name'</em></p>
|
|
<p id="mrs_01_1609__ad3cc836e654c4ea089345495d00408fb">Example:</p>
|
|
<p id="mrs_01_1609__ade54b44109e9471c8d48001f75717752"><strong id="mrs_01_1609__a217bec93c7984aabb202d4120aabb02d">disable_table_replication 't1'</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__ac3e5d4a1c334409fb361efdc6deaeec0">Do not synchronize user tables from the active cluster to the standby cluster.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__r6c8a81e3fe06468a8201a91eb90168de"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__aa1c93ce57f8f4322a3fc7ad24c71f8df">Verify data of the active and standby clusters.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__adbda98bb0fcf4d6cb326f21f30bf7944"><strong id="mrs_01_1609__b137411345201012">bin/hbase org.apache.hadoop.hbase.mapreduce.replication.VerifyReplication --starttime=</strong><em id="mrs_01_1609__i974684518106">Start time</em> <strong id="mrs_01_1609__b1674611450102">--endtime=</strong><em id="mrs_01_1609__i1746204561016">End time</em> <em id="mrs_01_1609__i2074724511010">Column family name Standby cluster ID Table name</em></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__a82035bf079c845189d8c566d677f6818">Verify whether data of the specified table is the same between the active cluster and the standby cluster.</p>
|
|
<p id="mrs_01_1609__a535a5c523c0b4303adeca48feab8ece3">The description of the parameters in this command is as follows:</p>
|
|
<ul id="mrs_01_1609__u8ab9cfc1c4da4101bc9ecdf00e30f657"><li id="mrs_01_1609__l1ed11f87ad164e449256688b42103892">Start time: If start time is not specified, the default value <strong id="mrs_01_1609__b1748250131012">0</strong> will be used.</li><li id="mrs_01_1609__l8dcf45b28f454d4f9f70468ab21add53">End time: If end time is not specified, the time when the current operation is submitted will be used by default.</li><li id="mrs_01_1609__l06ab7cbb8c104cb48d1f0ed1393fc819">Table name: If a table name is not entered, all user tables for which the real-time synchronization function is enabled will be verified by default.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__r17fd21e3187e4bfcbba51f54a80b1058"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__a0b7a050ca66043efbeebb86c554bf283">Switch the data writing status. </p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__a0442737ddc524311874f74eff1370959"><strong id="mrs_01_1609__a89b707907c3945b6b076d2e4dd0ef479">set_clusterState_active</strong></p>
|
|
<p id="mrs_01_1609__a1da8f782f97743f383f653391ea4b688"><strong id="mrs_01_1609__a402568340dad4721bc84820350a60680">set_clusterState_standby</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__aa7f645f4104e4a6aac33268a86aee646">Specifies whether data can be written to the cluster HBase tables.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_01_1609__rc4a5f0471eca49af84a65c74c6181361"><td class="cellrowborder" valign="top" width="15.661566156615661%" headers="mcps1.3.21.2.2.4.1.1 "><p id="mrs_01_1609__ad2e839a440274c38b1286cfe5cecab8b">Add or update the active cluster HDFS configurations saved in the peer cluster.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.7941794179418%" headers="mcps1.3.21.2.2.4.1.2 "><p id="mrs_01_1609__a28c935a609ef4fe4b71e37129d6cc26c"><strong id="mrs_01_1609__b38701219112018">hdfs dfs -put -f HBase/hbase/conf/core-site.xml HBase/hbase/conf/hdfs-site.xml HBase/hbase/conf/yarn-site.xml hdfs://</strong><em id="mrs_01_1609__i576471734719">Standby cluster</em> <strong id="mrs_01_1609__b229682332311"><em id="mrs_01_1609__i584702914235">NameNode</em></strong><strong id="mrs_01_1609__b143271110445"><em id="mrs_01_1609__i23278104412"> IP:PORT</em>/hbase/replicationConf/</strong><em id="mrs_01_1609__i11345141134414">Active cluster</em><strong id="mrs_01_1609__b4328415444"><em id="mrs_01_1609__i113281513441">hbase.replication.cluster.id</em></strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.544254425442546%" headers="mcps1.3.21.2.2.4.1.3 "><p id="mrs_01_1609__af38c20969eea43398bf9b3c10a116477">Enable DR for data including bulkload data. When HDFS parameters are modified in the active cluster, the modification cannot be automatically synchronized from the active cluster to the standby cluster. You need to manually run the command to synchronize configuration. The affected parameters are as follows:</p>
|
|
<ul id="mrs_01_1609__ue089a71081c94b0ba41ee09761d3422f"><li id="mrs_01_1609__l53a8b10142ed4128b27e604aea40f423">fs.defaultFS</li><li id="mrs_01_1609__lc584259bba5144659f7d1dc57bb303cb">dfs.client.failover.proxy.provider.hacluster</li><li id="mrs_01_1609__l16d9ed7668654a7682c68164ef27c4b8">dfs.client.failover.connection.retries.on.timeouts</li><li id="mrs_01_1609__lada30aef676c4069b7ae499039414382">dfs.client.failover.connection.retries</li></ul>
|
|
<p id="mrs_01_1609__p1220035932012">For example, change <strong id="mrs_01_1609__b11137231142518">fs.defaultFS</strong> to <strong id="mrs_01_1609__b0671134192512">hdfs://hacluster_sale</strong>,</p>
|
|
<p id="mrs_01_1609__p1299633218">HBase client configuration file, which is copied to the <strong id="mrs_01_1609__b14717103642">/hbase/replicationConf/<em id="mrs_01_1609__i147118312415">hbase.replication.cluster.id of the active cluster</em></strong> directory of the HDFS of the standby cluster.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0500.html">Using HBase</a></div>
|
|
</div>
|
|
</div>
|
|
|