OperationAdapter<T,com.google.cloud.bigtable.data.v2.models.MutationApi<?>>
DeleteAdapter
, HBaseMutationAdapter
, PutAdapter
, RowMutationsAdapter
, UnsupportedMutationAdapter
public abstract class MutationAdapter<T extends org.apache.hadoop.hbase.client.Row> extends Object implements OperationAdapter<T,com.google.cloud.bigtable.data.v2.models.MutationApi<?>>
Mutation
Operation into a Google Cloud Java
Mutation
.Constructor | Description |
---|---|
MutationAdapter() |
Modifier and Type | Method | Description |
---|---|---|
void |
adapt(T operation,
com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation) |
Adapt a single HBase Operation to a single Bigtable generated message.
|
protected abstract void |
adaptMutations(T operation,
com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation) |
Converts an HBase
Mutation which represents a set of changes to a single row from an
HBase perspective to a Google Cloud Java Mutation
which represent the set of changes. |
protected static byte[] |
getBytes(com.google.protobuf.ByteString bs) |
|
void |
toEntry(T operation,
com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation) |
protected static byte[] getBytes(com.google.protobuf.ByteString bs)
public final void adapt(T operation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation)
adapt
in interface OperationAdapter<T extends org.apache.hadoop.hbase.client.Row,com.google.cloud.bigtable.data.v2.models.MutationApi<?>>
operation
- The HBase operation to convert.mutation
- Type to which HBase operation will be mapped to. Typically it will be
Google Cloud Java Bigtable Models.public final void toEntry(T operation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation)
protected abstract void adaptMutations(T operation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutation)
Mutation
which represents a set of changes to a single row from an
HBase perspective to a Google Cloud Java Mutation
which represent the set of changes. The name "Mutation" represents a more granular change in
Bigtable than an HBase "Mutation"; An HBase Cell
is akin to a Cloud Bigtable Mutation
. A CloudBigtable MutateRowRequest
or MutateRowsRequest.Entry
is akin to an HBase Mutation
.operation
- The HBase Mutation
to convertmutation
- The model MutationApi