Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Bigtable: 05. Surface: Bulk Mutations#2936

Merged
garrettjonesgoogle merged 6 commits into
googleapis:mastergoogleapis/google-cloud-java:masterfrom
igorbernstein2:05-surface-bulk-mutationsigorbernstein2/google-cloud-java:05-surface-bulk-mutationsCopy head branch name to clipboard
Mar 1, 2018
Merged

Bigtable: 05. Surface: Bulk Mutations#2936
garrettjonesgoogle merged 6 commits into
googleapis:mastergoogleapis/google-cloud-java:masterfrom
igorbernstein2:05-surface-bulk-mutationsigorbernstein2/google-cloud-java:05-surface-bulk-mutationsCopy head branch name to clipboard

Conversation

@igorbernstein2

@igorbernstein2 igorbernstein2 commented Feb 22, 2018

Copy link
Copy Markdown
Contributor

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.

Edit: This has been reviewed by @kevinsi4508 and ready for @garrettjonesgoogle

NOTE: this api assumes the current gax batching infrastructure. It will be extended once flushing is figured out

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 22, 2018

@kevinsi4508 kevinsi4508 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Some minor nits.
LGTM

future,
new ApiFutureCallback<Void>() {
@Override
public void onFailure(Throwable throwable) {

This comment was marked as spam.

This comment was marked as spam.

// Resolve the request
innerResult.set(null);

// Now, close will promptly finish

This comment was marked as spam.

This comment was marked as spam.

@igorbernstein2

Copy link
Copy Markdown
Contributor Author

@garrettjonesgoogle, can you take a look when you have a moment?

* InstanceName instanceName = InstanceName.of("[PROJECT]", "[INSTANCE]");
* try (BigtableClient bigtableClient = BigtableClient.create(instanceName)) {
* try (BulkMutations mutations = bigtableClient.newBulkMutations()) {
* for(String someValue in someCollection) {

This comment was marked as spam.

This comment was marked as spam.

/** 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.

This comment was marked as spam.

This comment was marked as spam.

/**
* 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}

This comment was marked as spam.

This comment was marked as spam.

*
* @see com.google.cloud.bigtable.data.v2.BigtableDataClient#newBulkMutations() for example usage.
*/
public final class BulkMutations implements AutoCloseable {

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

* } catch (BulkMutationFailure failure) {
* // Handle error
* }
* // After `mutations` are closed, all mutations have been applied

This comment was marked as spam.

This comment was marked as spam.

lock.wait(waitMs);
}

if (numFailures > 0) {

This comment was marked as spam.

This comment was marked as spam.

@igorbernstein2

Copy link
Copy Markdown
Contributor Author

All feedback has been addressed. The only open question is if BulkMutations can be modeled in terms of callables. @garrettjonesgoogle, PTAL

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.
@igorbernstein2 igorbernstein2 force-pushed the 05-surface-bulk-mutations branch from 6773a12 to 2eabf60 Compare March 1, 2018 00:59
@igorbernstein2

Copy link
Copy Markdown
Contributor Author

rebased (and squashed to simplify rebasing). Will address feedback next

@igorbernstein2

Copy link
Copy Markdown
Contributor Author

Ok, all feedback has been addressed and the PR has been rebased. PTAL, if it looks good, please merge

@pongad

pongad commented Mar 1, 2018

Copy link
Copy Markdown
Contributor

LGTM. @garrettjonesgoogle can +2

@garrettjonesgoogle garrettjonesgoogle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@garrettjonesgoogle garrettjonesgoogle merged commit c5d35ba into googleapis:master Mar 1, 2018
@igorbernstein2

Copy link
Copy Markdown
Contributor Author

Thank you!

@igorbernstein2 igorbernstein2 deleted the 05-surface-bulk-mutations branch March 1, 2018 15:54
chingor13 pushed a commit that referenced this pull request Feb 20, 2026
…ng to v1.49.0 (#2936)

Co-authored-by: Phong Chuong <147636638+PhongChuong@users.noreply.github.com>
suztomo pushed a commit that referenced this pull request Mar 9, 2026
lqiu96 pushed a commit that referenced this pull request Mar 20, 2026
…ng to v1.49.0 (#2936)

Co-authored-by: Phong Chuong <147636638+PhongChuong@users.noreply.github.com>
chingor13 pushed a commit that referenced this pull request Mar 24, 2026
🤖 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).
chingor13 pushed a commit that referenced this pull request Mar 30, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.