GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat: introduce `java.time` by diegomarquezp · Pull Request #2415 · googleapis/java-bigtable
This repository was archived by the owner on Aug 30, 2026. It is now read-only.
Conversation
|
| } | ||
| } | ||
|
|
||
| public void attemptFailed(Throwable error, Duration delay) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Instead of deleting this method, should attemptFailled call attemptFailedDuration?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We moved all references in gax to attemptFailedDuration
googleapis/sdk-platform-java#1872
However it still makes sense to keep both. I'll push a commit with this.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I noticed our tracking sheet has a new comment in there. Confirmed it should be as you pointed out.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| BatchingSettings.newBuilder() | ||
| .setElementCountThreshold(10L) | ||
| .setRequestByteThreshold(20L) | ||
| .setDelayThreshold(Duration.ofMillis(5)) |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Im wondering if we should keep the test code the same so that we can verify these settings are ported to the new settings correctly? We can leave a todo to update them in a separate PR.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| public void testAttemptFailed() { | ||
| RuntimeException error = new RuntimeException(); | ||
| Duration delay = Duration.ofMillis(10); | ||
| compositeTracer.attemptFailed(error, delay); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
same here, I think we should keep calling attemptFailed and verify attemptFailedDuration gets called?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the following files and their corresponding tests:
internal/AbstractProtoStructReader.java
internal/ResultSetImpl.java
models/ChangeStreamMutation.java
models/ChangeStreamRecordAdapter.java
models/Heartbeat.java
models/ReadChangeStreamQuery.java
models/sql/SqlType.java
models/sql/Statement.java
models/sql/StructReader.java
changestream/ChangeStreamStateMachine.java
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| /** This method is obsolete. Use {@link #setCommitTime(java.time.Instant)} instead. */ | ||
| @ObsoleteApi("Use setCommitTime(java.time.Instant) instead") | ||
| abstract Builder setCommitTimestamp(org.threeten.bp.Instant commitTimestamp); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to remove the threeten setter, only store it as java.time.Instant, and then reverse the overload of getCommitTime(stamp) above.
The builder is fully internal, we just need to maintain backwards compatibility for the getter
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the catch. This was indeed stated in the tracking sheet. I'll update this as an internal class.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| abstract Builder setToken(@Nonnull String token); | ||
|
|
||
| abstract Builder setEstimatedLowWatermark(Instant estimatedLowWatermark); | ||
| Builder setLowWatermarkTime(java.time.Instant estimatedLowWatermark) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same question as for commit time. Also if we need to keep both setters this should be 'setEstimatedLowWatermarkTime'
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, done.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| /** This method is obsolete. Use {@link #setLowWatermarkTime(java.time.Instant)} instead. */ | ||
| @ObsoleteApi("Use setEstimatedLowWatermarkInstant(java.time.Instant) instead") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
setEstimatedLowWatermarkInstant should be setEstimatedLowWatermarkTime
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This will be removed since it's an internal api change as per #2415 (comment)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| /** This method is obsolete. Use {@link #getEstimatedLowWatermarkInstant()} instead. */ | ||
| @ObsoleteApi("Use getEstimatedLowWatermarkInstant() instead") | ||
| public abstract org.threeten.bp.Instant getEstimatedLowWatermark(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Same question as in ChangeStreamMutation. Wouldn't it be better to store this as java.time.Instant?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Yes, done.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| @InternalApi("Intended for use by the BigtableIO in apache/beam only.") | ||
| public abstract Instant getEstimatedLowWatermark(); | ||
| public java.time.Instant getEstimatedLowWatermarkInstant() { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
In ChangeStreamMutation we call this getEstimatedLowWatermarkTime. We should be consistent w that naming here
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Removed as this is an internal api. I only kept the java.time version
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| /** Get the commit timestamp of the current mutation. */ | ||
| public abstract Instant getCommitTimestamp(); | ||
| public abstract java.time.Instant getCommitTimestamp(); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We still need the threeten getter here, since this is used by beam users. Same for Heartbeat below
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
And for estimatedLowWatermark
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@jackdingilian thanks for the review and apologies for the misunderstanding. This time I got it right:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.