Skip to content

Conversation

@sushanb
Copy link
Contributor

@sushanb sushanb commented Mar 7, 2022

  1. Replaces dependency on BaseReplicationEndpoint with ReplicationEndpoint
  2. Adds a dependency on bigtable shaded guava.
  3. Adds tests for scope and custom WAL entry filters
  4. Adds a config for custom wal entry filters for Hbase2.x

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 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> ☕️

@sushanb sushanb requested a review from vermas2012 March 7, 2022 19:14
@sushanb sushanb requested a review from a team as a code owner March 7, 2022 19:14
@product-auto-label product-auto-label bot added the api: bigtable Issues related to the googleapis/java-bigtable-hbase API. label Mar 7, 2022
@sushanb sushanb force-pushed the main branch 2 times, most recently from 35e3fc6 to 617034a Compare March 14, 2022 16:39
@sushanb sushanb requested a review from vermas2012 March 14, 2022 18:50
@sushanb sushanb requested a review from vermas2012 March 15, 2022 17:44
TestUtils.waitForReplication(
() -> {
// replicate Entries will be zero
return TestReplicationEndpoint.replicatedEntries.get() >= 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be 2

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FILTERED_ROW_KEY is not passed under replicateContext

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then explain in the comment that FILTERED KEY will not be passed. A new engineer debugging this test should not need to figure that part out.

"Number of cells , actual cells: " + hbaseResult.listCells(),
2,
2,
hbaseResult.listCells().size());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Result cbtResult = cbtTable.get(new Get(ROW_KEY).setMaxVersions());
Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required

Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Assert.assertEquals(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method seems weird, what are we validating ? The name should give me a hint, this is not an "assertEquals" method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

1,
1,
cbtResult.listCells().size());
TestUtils.assertEquals(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

"Number of cells , actual cells: " + hbaseResult.listCells(),
2,
2,
hbaseResult.listCells().size());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Result cbtResult = cbtTable.get(new Get(ROW_KEY).setMaxVersions());
Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Assert.assertEquals(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not calling your method.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

TestUtils.assertEquals(
hbaseResult,
cbtResult,
HConstants.REPLICATION_SCOPE_GLOBAL,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check it in test. Use assertEqual on cells.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Contributor Author

@sushanb sushanb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed PR feedbacks

"Number of cells , actual cells: " + hbaseResult.listCells(),
2,
2,
hbaseResult.listCells().size());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Assert.assertEquals(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

1,
1,
cbtResult.listCells().size());
TestUtils.assertEquals(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

"Number of cells , actual cells: " + hbaseResult.listCells(),
2,
2,
hbaseResult.listCells().size());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

Result cbtResult = cbtTable.get(new Get(ROW_KEY).setMaxVersions());
Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

TestUtils.assertEquals(
hbaseResult,
cbtResult,
HConstants.REPLICATION_SCOPE_GLOBAL,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Result hbaseResult = hbaseTable.get(new Get(ROW_KEY).setMaxVersions());
Assert.assertFalse(cbtResult.isEmpty());
Assert.assertFalse(hbaseResult.isEmpty());
Assert.assertEquals(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@sushanb sushanb added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 18, 2022
@sushanb sushanb force-pushed the main branch 2 times, most recently from a33222a to a938eac Compare March 18, 2022 16:51
TestUtils.waitForReplication(
() -> {
// replicate Entries will be zero
return TestReplicationEndpoint.replicatedEntries.get() >= 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then explain in the comment that FILTERED KEY will not be passed. A new engineer debugging this test should not need to figure that part out.

@sushanb sushanb added kokoro:force-run Add this label to force Kokoro to re-run the tests. owlbot:run Add this label to trigger the Owlbot post processor. labels Mar 18, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Mar 18, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 18, 2022
@sushanb sushanb merged commit f748c70 into googleapis:main Mar 18, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Apr 4, 2022
🤖 I have created a release *beep* *boop*
---


## [2.1.0](v2.0.0...v2.1.0) (2022-04-01)


### Features

* [hase-cbt-replication]Add a metrics for hbase<>bigtable timestamp overflow ([#3540](#3540)) ([9c73318](9c73318))
* Adding a detailed readme for HBase replication support. ([#3527](#3527)) ([b406ac5](b406ac5))
* enable dry-run mode for HBase to Cloud Bigtable replication ([#3532](#3532)) ([164738b](164738b))
* Enable HBase to Cloud Bigtable replication  ([#3510](#3510)) ([68d4a01](68d4a01))
* flag a put in future timestamp and record a metrics ([#3534](#3534)) ([7dd7653](7dd7653))
* remove base repl endpoint from hbase 2.x ([#3539](#3539)) ([f748c70](f748c70))


### Bug Fixes

* [hbase-cbt-replication] make hbase2.x endpoint context private ([#3559](#3559)) ([5ec3b18](5ec3b18))
* consistent behavior of customwalentry filter across hbase1.x and hbase2.x ([#3562](#3562)) ([f70b0cb](f70b0cb))
* license and notice files for all the shaded artifacts ([#3565](#3565)) ([86a5643](86a5643))
* minor documentation update ([#3572](#3572)) ([68db6c2](68db6c2))


### Documentation

* fix typos in README and add --region option ([#3520](#3520)) ([c189d46](c189d46))


### Dependencies

* update dependency ch.qos.logback:logback-classic to v1.2.11 ([#3538](#3538)) ([92e8b63](92e8b63))
* update dependency com.google.cloud:google-cloud-bigtable-emulator to v0.142.3 ([#3528](#3528)) ([33a8eba](33a8eba))
* update dependency com.google.cloud:google-cloud-bigtable-emulator to v0.143.0 ([#3543](#3543)) ([2d57f14](2d57f14))
* update dependency net.bytebuddy:byte-buddy to v1.12.8 ([#3502](#3502)) ([77ae2f1](77ae2f1))
* update jmh.version to v1.35 ([#3561](#3561)) ([188738d](188738d))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigtable Issues related to the googleapis/java-bigtable-hbase API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants