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 — Bigtable: 05. Surface: Bulk Mutations by igorbernstein2 · Pull Request #2936 · googleapis/google-cloud-java Conversation
|
| future, | ||
| new ApiFutureCallback<Void>() { | ||
| @Override | ||
| public void onFailure(Throwable throwable) { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // Resolve the request | ||
| innerResult.set(null); | ||
|
|
||
| // Now, close will promptly finish |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@garrettjonesgoogle, can you take a look when you have a moment? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]"); | ||
| * try (BigtableClient bigtableClient = BigtableClient.create(instanceName)) { | ||
| * try (BulkMutations mutations = bigtableClient.newBulkMutations()) { | ||
| * for(String someValue in someCollection) { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /** Returns the object with the settings used for BulkMutations. */ | ||
| public BatchingCallSettings<RowMutation, Void> bulkMutationsSettings() { | ||
| // NOTE: the user facing BigtableDataClient only exposes this api as newBulkMutations, | ||
| // so the outer name should match that. While the stub sticks to rpc names. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /** | ||
| * This is necessary workaround for {@link | ||
| * com.google.cloud.bigtable.data.v2.stub.EnhancedBigtableStub#mutateRowsCallable()}. The settings | ||
| * are exposed to the user using {@link com.google.cloud.bigtable.data.v2.models.RowMutation} |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * | ||
| * @see com.google.cloud.bigtable.data.v2.BigtableDataClient#newBulkMutations() for example usage. | ||
| */ | ||
| public final class BulkMutations implements AutoCloseable { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| * } catch (BulkMutationFailure failure) { | ||
| * // Handle error | ||
| * } | ||
| * // After `mutations` are closed, all mutations have been applied |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| lock.wait(waitMs); | ||
| } | ||
|
|
||
| if (numFailures > 0) { |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
All feedback has been addressed. The only open question is if BulkMutations can be modeled in terms of callables. @garrettjonesgoogle, PTAL |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Exposes the MutateRows RPC as bulkMutations(). The actual BatchingCallable is wrapped by a BulkMutations wrapper to allow waiting for outstanding mutations and eventually for flushing the batch.
6773a12 to
2eabf60
Compare
|
rebased (and squashed to simplify rebasing). Will address feedback next |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Ok, all feedback has been addressed and the PR has been rebased. PTAL, if it looks good, please merge |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM. @garrettjonesgoogle can +2 |
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.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ng to v1.49.0 (#2936) Co-authored-by: Phong Chuong <[email protected]>
…storage-bom to v2.44.0 (#2936)
…ng to v1.49.0 (#2936) Co-authored-by: Phong Chuong <[email protected]>
🤖 I have created a release *beep* *boop* --- ## [6.61.0](https://togithub.com/googleapis/java-spanner/compare/v6.60.1...v6.61.0) (2024-03-04) ### Features * Support float32 type ([#2894](https://togithub.com/googleapis/java-spanner/issues/2894)) ([879470a](https://togithub.com/googleapis/java-spanner/commit/879470a77a09f1f604a4b9888cb214108cd49372)) ### Bug Fixes * Flaky test issue due to AbortedException. ([#2925](https://togithub.com/googleapis/java-spanner/issues/2925)) ([f9b8e03](https://togithub.com/googleapis/java-spanner/commit/f9b8e037cde42804311af40b67f3b45d634b6ff9)) ### Dependencies * Update dependency com.google.cloud:sdk-platform-java-config to v3.27.0 ([#2935](https://togithub.com/googleapis/java-spanner/issues/2935)) ([55442fc](https://togithub.com/googleapis/java-spanner/commit/55442fce7ea63988a5f439730c3745b32fd09aea)) * Update dependency org.json:json to v20240303 ([#2936](https://togithub.com/googleapis/java-spanner/issues/2936)) ([791aec9](https://togithub.com/googleapis/java-spanner/commit/791aec9a8538601bda786b158285618b573514a9)) ### Documentation * Samples and tests for backup Admin APIs and overall spanner Admin APIs. ([#2882](https://togithub.com/googleapis/java-spanner/issues/2882)) ([7c024f2](https://togithub.com/googleapis/java-spanner/commit/7c024f21625c97979d70391a82ca84730c37b709)) * Update all public documents to use auto-generated admin clients. ([#2928](https://togithub.com/googleapis/java-spanner/issues/2928)) ([faf5a09](https://togithub.com/googleapis/java-spanner/commit/faf5a09dc784386ad40c0fdb0f005d1bdaff9eed)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
…bInfoFactory (#2936) When uploading a file from the files system, there are scenarios when a job would need to customize the actual BlobInfo used to upload to GCS. Add the new UploadBlobInfoFactory which allows a user to produce their own BlobInfo instance given the bucketName and fileName. When producing the BlobInfo the application can also customize other metadata fields. A few convenience adapter methods are available in UploadBlobInfoFactory to simplify common operations. Fixes #2638
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.