Skip to content

Commit 68db6c2

Browse files
authored
fix: minor documentation update (#3572)
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: - [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-bigtable-hbase/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea - [ ] Ensure the tests and linter pass - [ ] Code coverage does not decrease (if any source code was changed) - [ ] Appropriate docs were updated (if necessary) Fixes #<issue_number_goes_here> ☕️ If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent 86a5643 commit 68db6c2

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

hbase-migration-tools/bigtable-hbase-replication/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ data. Near zero downtime migrations include the following steps:
6060
3. Update hbase-site.xml with destination cloud bigtable project id, instance id
6161
and service account json file.
6262
4. Add a CBT replication peer in HBase. On HBase shell
63-
execute `add_peer '2', ENDPOINT_CLASSNAME => 'com.google.cloud.bigtable.hbase.replication.HbaseToCloudBigtableReplicationEndpoint'`
64-
. Use add_peer options to enable replication for select tables.
63+
execute `add_peer '2', ENDPOINT_CLASSNAME => 'com.google.cloud.bigtable.hbase2_x.replication.HbaseToCloudBigtableReplicationEndpoint'`
64+
. Please use endpoint class `com.google.cloud.bigtable.hbase1_x.replication.HbaseToCloudBigtableReplicationEndpoint` for HBase 1.x clusters. Use add_peer options to enable replication for select tables.
6565
5. Immediately disable the CBT replication peer, this allows WAL logs to
6666
accumulate on HDFS. On HBase shell execute: `disable_peer '2'`
6767
6. Check the replicated tables by executing `list_replicated_tables` and enable
@@ -111,6 +111,10 @@ classpath.
111111
</property>
112112
```
113113

114+
We recommend specifying a single-cluster routing [application profile](https://cloud.google.com/bigtable/docs/app-profiles#routing) by setting config key
115+
`google.bigtable.app_profile.id`. A single-cluster routing application profile
116+
preserves order of mutations between HBase and Cloud Bigtable.
117+
114118
Next, you should configure Cloud Bigtable authentication. Create a service
115119
account and download a json file as shown
116120
[here](https://cloud.google.com/docs/authentication/production#create_service_account)
@@ -189,7 +193,7 @@ that can be modified during WAL write.
189193

190194
|Type of mutation |HBase WAL Write behavior |CBT replication library action|
191195
|-----------------|-------------------------|------------------------------|
192-
|DeleteLatestVersion|Resolves the latest version and writes a deletecell with timestamp|Supported, as its normal deletecell
196+
|DeleteLatestVersion|Resolves the latest version and writes a deletecell with timestamp|Supported, as its normal deletecell|
193197
|DeleteFamilyAtVersion|Not modified|Logged and skipped|
194198
|DeleteFamilyBeforeTimestamp|Not modified|Converts it to DeleteFamily if timestamp within a configurable threshold.|
195199
|DeleteFamily|Converts to DeleteFamilyBeforeTimestamp with timestamp=now|See DeleteFamilyBeforeTimestamp|
@@ -232,7 +236,7 @@ in `hbase-site.xml` but we recommend setting it during peer creation.
232236
Enabling/disabling dry run mode during peer creation can avoid restarting the
233237
HBase cluster to pickup changes to `hbase-site.xml` file. Enable dry run mode by
234238
running the following command to add Cloud Bigtable replication peer (please
235-
change the endpoint class for HBase 1.x):
239+
change the endpoint class to `com.google.cloud.bigtable.hbase1_x.replication.HbaseToCloudBigtableReplicationEndpoint` for HBase 1.x):
236240

237241
```
238242
add_peer 'peer_id',

hbase-migration-tools/bigtable-hbase-replication/bigtable-hbase-replication-core/src/main/java/com/google/cloud/bigtable/hbase/replication/configuration/HBaseToCloudBigtableReplicationConfiguration.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@ private HBaseToCloudBigtableReplicationConfiguration() {}
5454
// TODO maybe it should depend on the number of processors on the VM.
5555
public static final int DEFAULT_THREAD_COUNT = 10;
5656

57+
/**
58+
* Determines the size of request to CBT. This parameter controls the number of concurrent RPCs to
59+
* Cloud Bigtable.
60+
*
61+
* <p>Set it to higher value to reduce concurrency, setting it to a value >
62+
* replication.source.size.capacity will result in a single batch of writes to Cloud Bigtable per
63+
* CBTEndpoint replicate call.
64+
*
65+
* <p>Set it to a smaller value to send small batches with max concurrency of
66+
* "google.bigtable.replication.thread_count". This will result in lower replication lag for Cloud
67+
* Bigtable at the expense of more RPCs.
68+
*/
5769
public static final String BATCH_SIZE_KEY = "google.bigtable.replication.batch_size_bytes";
5870
// TODO: Tune this parameter. Usually, this should be smaller than the HBase replication source
5971
// batch capacity by counts and bytes. These capacity are set by `replication.source.nb.capacity`

0 commit comments

Comments
 (0)