-
Notifications
You must be signed in to change notification settings - Fork 177
feat: Add a metrics for hbase<>bigtable timestamp overflow #3540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| for (int index = 0; index < cellsToAdapt.size(); index++) { | ||
| Cell cell = cellsToAdapt.get(index); | ||
| // check whether there is timestamp overflow from HBase -> CBT | ||
| if (cell.getTimestamp() >= HBASE_EFFECTIVE_MAX_TIMESTAMP) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it will work out of the box like that.
There are valid deletes, like delete row (
Line 74 in bf999fa
| if (operation.getTimeStamp() != HConstants.LATEST_TIMESTAMP) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
...n/java/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapter.java
Show resolved
Hide resolved
...n/java/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapter.java
Outdated
Show resolved
Hide resolved
...n/java/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapter.java
Outdated
Show resolved
Hide resolved
.../google/cloud/bigtable/hbase/replication/metrics/HBaseToCloudBigtableReplicationMetrics.java
Outdated
Show resolved
Hide resolved
...va/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapterTest.java
Outdated
Show resolved
Hide resolved
...va/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapterTest.java
Outdated
Show resolved
Hide resolved
vermas2012
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test with overflow timestamp on 2.x and 1.x integ tests. You can update an existing test or add a new test, up to you.
...n/java/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapter.java
Outdated
Show resolved
Hide resolved
...va/com/google/cloud/bigtable/hbase/replication/adapters/IncompatibleMutationAdapterTest.java
Outdated
Show resolved
Hide resolved
|
|
||
| for (int i = 0; i < expectedCells.size(); i++) { | ||
| Assert.assertNotEquals( | ||
| "Timestamp mismatch for row " + TestUtils.ROW_KEY, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Timestamps should not match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| hbaseTable.get(new Get(TestUtils.ROW_KEY).setMaxVersions()).listCells(); | ||
| List<Cell> actualCells = cbtTable.get(new Get(TestUtils.ROW_KEY).setMaxVersions()).listCells(); | ||
|
|
||
| for (int i = 0; i < expectedCells.size(); i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check size =1 and compare result[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| List<Cell> actualCells = cbtTable.get(new Get(TestUtils.ROW_KEY).setMaxVersions()).listCells(); | ||
|
|
||
| for (int i = 0; i < expectedCells.size(); i++) { | ||
| Assert.assertNotEquals( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same, don't use array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
🤖 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).
Based on PR https://github.com/googleapis/java-bigtable-hbase/pull/3522/files
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:
Fixes #<issue_number_goes_here> ☕️