OperationAdapter<org.apache.hadoop.hbase.client.Mutation,com.google.cloud.bigtable.data.v2.models.MutationApi<?>>
public class HBaseMutationAdapter extends MutationAdapter<org.apache.hadoop.hbase.client.Mutation>
MutationApi
.
This class uses instanceof checking to determine an appropriate adaptation to apply.Constructor | Description |
---|---|
HBaseMutationAdapter(MutationAdapter<org.apache.hadoop.hbase.client.Delete> deleteAdapter,
MutationAdapter<org.apache.hadoop.hbase.client.Put> putAdapter,
MutationAdapter<org.apache.hadoop.hbase.client.Increment> incrementAdapter,
MutationAdapter<org.apache.hadoop.hbase.client.Append> appendAdapter) |
Constructor for MutationAdapter.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
adaptMutations(org.apache.hadoop.hbase.client.Mutation mutation,
com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutationModel) |
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. |
adapt, getBytes, toEntry
public HBaseMutationAdapter(MutationAdapter<org.apache.hadoop.hbase.client.Delete> deleteAdapter, MutationAdapter<org.apache.hadoop.hbase.client.Put> putAdapter, MutationAdapter<org.apache.hadoop.hbase.client.Increment> incrementAdapter, MutationAdapter<org.apache.hadoop.hbase.client.Append> appendAdapter)
Constructor for MutationAdapter.
deleteAdapter
- a OperationAdapter
object.putAdapter
- a OperationAdapter
object.incrementAdapter
- a OperationAdapter
object.appendAdapter
- a OperationAdapter
object.protected void adaptMutations(org.apache.hadoop.hbase.client.Mutation mutation, com.google.cloud.bigtable.data.v2.models.MutationApi<?> mutationModel)
MutationAdapter
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
.adaptMutations
in class MutationAdapter<org.apache.hadoop.hbase.client.Mutation>
mutation
- The HBase Mutation
to convertmutationModel
- The model MutationApi