public final class RowMutation extends Object implements MutationApi<RowMutation>, Serializable
BigtableDataClient.mutateRowAsync(RowMutation).| Modifier and Type | Method and Description |
|---|---|
RowMutation |
addToCell(String familyName,
Value qualifier,
Value timestamp,
Value input)
Adds a
Value to an aggregate cell. |
static RowMutation |
create(String tableId,
com.google.protobuf.ByteString key)
Deprecated.
Please use
create(TargetId, ByteString) instead. |
static RowMutation |
create(String tableId,
com.google.protobuf.ByteString key,
Mutation mutation)
Deprecated.
Please use
create(TargetId, ByteString, Mutation) instead. |
static RowMutation |
create(String tableId,
String key)
Deprecated.
Please use
create(TargetId, String) instead. |
static RowMutation |
create(String tableId,
String key,
Mutation mutation)
Deprecated.
Please use
create(TargetId, String, Mutation) instead. |
static RowMutation |
create(TargetId targetId,
com.google.protobuf.ByteString key)
Creates a new instance of the mutation builder for the given target with targetId.
|
static RowMutation |
create(TargetId targetId,
com.google.protobuf.ByteString key,
Mutation mutation)
Creates new instance of mutation builder for the given target with targetId by wrapping
existing set of row mutations.
|
static RowMutation |
create(TargetId targetId,
String key)
Creates a new instance of the mutation builder for the given target with targetId.
|
static RowMutation |
create(TargetId targetId,
String key,
Mutation mutation)
Creates new instance of mutation builder for the given target with targetId by wrapping
existing set of row mutations.
|
RowMutation |
deleteCells(String familyName,
com.google.protobuf.ByteString qualifier)
Adds a mutation which deletes cells from the specified column.
|
RowMutation |
deleteCells(String familyName,
com.google.protobuf.ByteString qualifier,
Range.TimestampRange timestampRange)
Adds a mutation which deletes cells from the specified column, restricted to a given timestamp
range.
|
RowMutation |
deleteCells(String familyName,
String qualifier)
Adds a mutation which deletes cells from the specified column.
|
RowMutation |
deleteFamily(String familyName)
Adds a mutation which deletes all cells from the specified column family.
|
RowMutation |
deleteRow()
Adds a mutation which deletes all cells from the containing row.
|
static RowMutation |
fromProto(MutateRowRequest request)
Wraps the protobuf
MutateRowRequest. |
TargetId |
getTargetId() |
RowMutation |
mergeToCell(String familyName,
Value qualifier,
Value timestamp,
Value input)
Merges a
Value accumulator to an aggregate cell. |
RowMutation |
setCell(String familyName,
com.google.protobuf.ByteString qualifier,
com.google.protobuf.ByteString value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
com.google.protobuf.ByteString qualifier,
long value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
com.google.protobuf.ByteString qualifier,
long timestamp,
com.google.protobuf.ByteString value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
com.google.protobuf.ByteString qualifier,
long timestamp,
long value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
String qualifier,
long value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
String qualifier,
long timestamp,
long value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
String qualifier,
long timestamp,
String value)
Adds a mutation which sets the value of the specified cell.
|
RowMutation |
setCell(String familyName,
String qualifier,
String value)
Adds a mutation which sets the value of the specified cell.
|
MutateRowsRequest |
toBulkProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
Creates a single entry bulk
MutateRowsRequest, which will be
merged by the batching logic in the callable chain. |
MutateRowRequest |
toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) |
SessionMutateRowRequest |
toSessionProto() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddToCell, addToCell, mergeToCell, mergeToCell@Deprecated public static RowMutation create(String tableId, String key)
create(TargetId, String) instead.public static RowMutation create(TargetId targetId, String key)
AuthorizedViewId,
TableId@Deprecated public static RowMutation create(String tableId, com.google.protobuf.ByteString key)
create(TargetId, ByteString) instead.public static RowMutation create(TargetId targetId, com.google.protobuf.ByteString key)
AuthorizedViewId,
TableId@Deprecated public static RowMutation create(String tableId, String key, Mutation mutation)
create(TargetId, String, Mutation) instead.public static RowMutation create(TargetId targetId, String key, Mutation mutation)
Sample code:
Mutation mutation = Mutation.create()
.setCell("[FAMILY_NAME]", "[QUALIFIER]", [TIMESTAMP], "[VALUE]");
RowMutation rowMutation = RowMutation.create(TableId.of("[TABLE]"), "[ROW_KEY]", mutation);
AuthorizedViewId,
TableId@Deprecated public static RowMutation create(String tableId, com.google.protobuf.ByteString key, Mutation mutation)
create(TargetId, ByteString, Mutation) instead.public static RowMutation create(TargetId targetId, com.google.protobuf.ByteString key, Mutation mutation)
Sample code:
Mutation mutation = Mutation.create()
.setCell("[FAMILY_NAME]", "[QUALIFIER]", [TIMESTAMP], "[VALUE]");
RowMutation rowMutation = RowMutation.create(TableId.of("[TABLE]"), [BYTE_STRING_ROW_KEY], mutation);
AuthorizedViewId,
TableIdpublic RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, @Nonnull String value)
MutationApiThis a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, @Nonnull String value)
MutationApiThis is a convenience override that converts Strings to ByteStrings.
Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull com.google.protobuf.ByteString value)
MutationApiUses microseconds since epoch as the timestamp.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, @Nonnull com.google.protobuf.ByteString value)
MutationApiNote: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long value)
MutationApiThis a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp. Also it accepts long value.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, long value)
MutationApiThis is a convenience override that converts Strings to ByteStrings.
Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long value)
MutationApiUses microseconds since epoch as the timestamp.
setCell in interface MutationApi<RowMutation>public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, long value)
MutationApiNote: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
setCell in interface MutationApi<RowMutation>public RowMutation deleteCells(@Nonnull String familyName, @Nonnull String qualifier)
MutationApideleteCells in interface MutationApi<RowMutation>public RowMutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier)
MutationApideleteCells in interface MutationApi<RowMutation>public RowMutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull Range.TimestampRange timestampRange)
MutationApideleteCells in interface MutationApi<RowMutation>familyName - The family name.qualifier - The qualifier.timestampRange - The timestamp range in microseconds.public RowMutation deleteFamily(@Nonnull String familyName)
MutationApideleteFamily in interface MutationApi<RowMutation>public RowMutation deleteRow()
MutationApideleteRow in interface MutationApi<RowMutation>public RowMutation addToCell(@Nonnull String familyName, @Nonnull Value qualifier, @Nonnull Value timestamp, @Nonnull Value input)
MutationApiValue to an aggregate cell. The column family must be an aggregate family and
have an input type matching the type of Value or this mutation will be rejected.
Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
addToCell in interface MutationApi<RowMutation>public RowMutation mergeToCell(@Nonnull String familyName, @Nonnull Value qualifier, @Nonnull Value timestamp, @Nonnull Value input)
MutationApiValue accumulator to an aggregate cell. The column family must be an aggregate
family or this mutation will be rejected.
Note: The timestamp values are in microseconds but must match the granularity of the table(defaults to `MILLIS`). Therefore, the given value must be a multiple of 1000 (millisecond granularity). For example: `1571902339435000`.
mergeToCell in interface MutationApi<RowMutation>@InternalApi public TargetId getTargetId()
@InternalApi public SessionMutateRowRequest toSessionProto()
@InternalApi public MutateRowRequest toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
@InternalApi public MutateRowsRequest toBulkProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext)
MutateRowsRequest, which will be
merged by the batching logic in the callable chain.@BetaApi public static RowMutation fromProto(@Nonnull MutateRowRequest request)
MutateRowRequest.
This is meant for advanced usage only. Please ensure that the MutateRowRequest does not use server side timestamps. The BigtableDataClient assumes that RowMutations are idempotent and is configured to enable retries by default. If serverside timestamps are enabled, this can lead to duplicate mutations.
WARNING: when applied, the resulting mutation object will ignore the project id and instance id in the table_name and instead apply the configuration in the client.
Copyright © 2026 Google LLC. All rights reserved.