Bigtable: Expose an API to allow users to create their own batches for MutateRows#3129
Conversation
…ows. This has 2 objectives: 1. Expose enough primitives for users to workaround the lack of batch flushing. This would allow me to experiment with pongad's batching work and unblock integration with apache beam 2. Unblock a transition path from the existing bigtable-client-core. The current plan for a future transition from bigtable-client-core is to implement the BigtableDataClient using this veneer. That interface sits below batching in the current client. To enable this transition path, I need to expose the manual batching primitive
|
The code LGTM. IIUC, we're exposing |
|
Yep. Manual batching is needed to transition the current client to veneer and I plan to leave that feature around for advanced use cases |
| .setColumnQualifier( | ||
| ByteString.copyFromUtf8("fake-qualifier3")) | ||
| .setTimestampMicros(3_000) | ||
| .setValue(ByteString.copyFromUtf8("fake-value3"))))) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| import com.google.cloud.bigtable.data.v2.models.BulkMutation; | ||
|
|
||
| /** | ||
| * A callable to convert userfacing {@link BulkMutation}s to {@link MutateRowsRequest}s. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| * <p>This class is meant for manual batching, while {@link BulkMutationBatcher} is meant for | ||
| * automatic batching with flow control. | ||
| */ | ||
| public final class BulkMutation implements Serializable { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
| public BatchingCallSettings<RowMutation, Void> mutateRowsSettings() { | ||
| return mutateRowsSettings; | ||
| /** Returns the object with the settings used for manually batched calls to MutateRows. */ | ||
| public BatchingCallSettings<RowMutation, Void> bulkMutateRowsSettings() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
All feedback should be addressed, PTAL |
garrettjonesgoogle
left a comment
There was a problem hiding this comment.
LGTM after you address my requested comment
| public BatchingCallSettings<RowMutation, Void> mutateRowsSettings() { | ||
| return mutateRowsSettings; | ||
| /** Returns the object with the settings used for manually batched calls to MutateRows. */ | ||
| public BatchingCallSettings<RowMutation, Void> bulkMutateRowsSettings() { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
|
Updated, please merge when ready |
* feat: enable hermetic library generation * fix config yaml syntax * do not map runners home folder * use copyright update comittish * correct proto_path * update protoc * preserve pr_description * update gapic_generator_version to 2.41.0 * infer image tag from config yaml * correct workflow name * update config scripts and yamls * remove old update_googleapis_committish workflow * sync config structure with that of google-cloud-java * remove quotes from config yamls * fix typo in update_generation_config.yaml * correct * quote codeowners_team in generation config * update generator version * fix path to hermetic_library_generation * remove escaped newlines * fixes to hermetic_library_generation * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This has 2 objectives:
Expose enough primitives for users to workaround the lack of batch flushing.
This would allow me to experiment with @pongad's batching work and unblock integration with apache beam
Unblock a transition path from the existing bigtable-client-core.
The current plan for a future transition from bigtable-client-core is to implement the BigtableDataClient using this veneer. That interface sits below batching in the current client. To enable this transition path, I need to expose the manual batching primitive