Class RowMutation
- All Implemented Interfaces:
MutationApi<RowMutation>
,Serializable
BigtableDataClient.mutateRowAsync(RowMutation)
.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAdds aValue
to an aggregate cell.static RowMutation
Creates a new instance of the mutation builder for the given target with targetId.static RowMutation
Creates new instance of mutation builder for the given target with targetId by wrapping existing set of row mutations.static RowMutation
Creates a new instance of the mutation builder for the given target with targetId.static RowMutation
Creates new instance of mutation builder for the given target with targetId by wrapping existing set of row mutations.static RowMutation
Deprecated.static RowMutation
Deprecated.Please usecreate(TargetId, ByteString, Mutation)
instead.static RowMutation
Deprecated.Please usecreate(TargetId, String)
instead.static RowMutation
Deprecated.Please usecreate(TargetId, String, Mutation)
instead.deleteCells
(String familyName, com.google.protobuf.ByteString qualifier) Adds a mutation which deletes cells from the specified column.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.deleteCells
(String familyName, String qualifier) Adds a mutation which deletes cells from the specified column.deleteFamily
(String familyName) Adds a mutation which deletes all cells from the specified column family.Adds a mutation which deletes all cells from the containing row.static RowMutation
fromProto
(MutateRowRequest request) Wraps the protobufMutateRowRequest
.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.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.setCell
(String familyName, com.google.protobuf.ByteString qualifier, com.google.protobuf.ByteString value) Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.Adds a mutation which sets the value of the specified cell.toBulkProto
(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) Creates a single entry bulkMutateRowsRequest
, which will be merged by the batching logic in the callable chain.toProto
(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.google.cloud.bigtable.data.v2.models.MutationApi
addToCell, addToCell
-
Method Details
-
create
Deprecated.Please usecreate(TargetId, String)
instead. -
create
Creates a new instance of the mutation builder for the given target with targetId.- See Also:
-
create
Deprecated.Please usecreate(TargetId, ByteString)
instead. -
create
Creates a new instance of the mutation builder for the given target with targetId.- See Also:
-
create
Deprecated.Please usecreate(TargetId, String, Mutation)
instead. -
create
Creates new instance of mutation builder for the given target with targetId by wrapping existing set of row mutations. The builder will be owned by this RowMutation and should not be used by the caller after this call. This functionality is intended for advanced usage.Sample code:
Mutation mutation = Mutation.create() .setCell("[FAMILY_NAME]", "[QUALIFIER]", [TIMESTAMP], "[VALUE]"); RowMutation rowMutation = RowMutation.create(TableId.of("[TABLE]"), "[ROW_KEY]", mutation);
- See Also:
-
create
@Deprecated public static RowMutation create(String tableId, com.google.protobuf.ByteString key, Mutation mutation) Deprecated.Please usecreate(TargetId, ByteString, Mutation)
instead. -
create
public 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. The builder will be owned by this RowMutation and should not be used by the caller after this call. This functionality is intended for advanced usage.Sample code:
Mutation mutation = Mutation.create() .setCell("[FAMILY_NAME]", "[QUALIFIER]", [TIMESTAMP], "[VALUE]"); RowMutation rowMutation = RowMutation.create(TableId.of("[TABLE]"), [BYTE_STRING_ROW_KEY], mutation);
- See Also:
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, @Nonnull String value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.This a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, @Nonnull String value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.This 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`.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull com.google.protobuf.ByteString value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.Uses microseconds since epoch as the timestamp.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, @Nonnull com.google.protobuf.ByteString value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.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`.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.This a convenience method that converts Strings to ByteStrings and uses microseconds since epoch as the timestamp. Also it accepts long value.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull String qualifier, long timestamp, long value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.This 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`.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.Uses microseconds since epoch as the timestamp.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
setCell
public RowMutation setCell(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, long timestamp, long value) Description copied from interface:MutationApi
Adds a mutation which sets the value of the specified cell.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`.
- Specified by:
setCell
in interfaceMutationApi<RowMutation>
-
deleteCells
Description copied from interface:MutationApi
Adds a mutation which deletes cells from the specified column.- Specified by:
deleteCells
in interfaceMutationApi<RowMutation>
-
deleteCells
public RowMutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier) Description copied from interface:MutationApi
Adds a mutation which deletes cells from the specified column.- Specified by:
deleteCells
in interfaceMutationApi<RowMutation>
-
deleteCells
public RowMutation deleteCells(@Nonnull String familyName, @Nonnull com.google.protobuf.ByteString qualifier, @Nonnull Range.TimestampRange timestampRange) Description copied from interface:MutationApi
Adds a mutation which deletes cells from the specified column, restricted to a given timestamp range.- Specified by:
deleteCells
in interfaceMutationApi<RowMutation>
- Parameters:
familyName
- The family name.qualifier
- The qualifier.timestampRange
- The timestamp range in microseconds.
-
deleteFamily
Description copied from interface:MutationApi
Adds a mutation which deletes all cells from the specified column family.- Specified by:
deleteFamily
in interfaceMutationApi<RowMutation>
-
deleteRow
Description copied from interface:MutationApi
Adds a mutation which deletes all cells from the containing row.- Specified by:
deleteRow
in interfaceMutationApi<RowMutation>
-
addToCell
public RowMutation addToCell(@Nonnull String familyName, @Nonnull Value qualifier, @Nonnull Value timestamp, @Nonnull Value input) Description copied from interface:MutationApi
Adds aValue
to an aggregate cell. The column family must be an aggregate family and have an input type matching the type ofValue
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`.
- Specified by:
addToCell
in interfaceMutationApi<RowMutation>
-
toProto
@InternalApi public MutateRowRequest toProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) -
toBulkProto
@InternalApi public MutateRowsRequest toBulkProto(com.google.cloud.bigtable.data.v2.internal.RequestContext requestContext) Creates a single entry bulkMutateRowsRequest
, which will be merged by the batching logic in the callable chain. -
fromProto
Wraps the protobufMutateRowRequest
.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.
-
create(TargetId, ByteString)
instead.