com.google.cloud.bigtable.hbase.adapters
Class HBaseMutationAdapter
- java.lang.Object
-
- com.google.cloud.bigtable.hbase.adapters.MutationAdapter<Mutation>
-
- com.google.cloud.bigtable.hbase.adapters.HBaseMutationAdapter
-
- All Implemented Interfaces:
- OperationAdapter<Mutation,com.google.bigtable.v2.MutateRowRequest.Builder>
public class HBaseMutationAdapter extends MutationAdapter<Mutation>
Adapt a generic Mutation to a bigtable operation. This class uses instanceof checking to determine an appropriate adaptation to apply.- Version:
- $Id: $Id
- Author:
- sduskis
-
-
Constructor Summary
Constructors Constructor and Description HBaseMutationAdapter(MutationAdapter<Delete> deleteAdapter, MutationAdapter<Put> putAdapter, MutationAdapter<Increment> incrementAdapter, MutationAdapter<Append> appendAdapter)
Constructor for MutationAdapter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description protected Collection<com.google.bigtable.v2.Mutation>
adaptMutations(Mutation mutation)
Converts an HBaseMutation
which represents a set of changes to a single row from an HBase perspective to a collection of Cloud BigtableMutation
which represent the set of changes.-
Methods inherited from class com.google.cloud.bigtable.hbase.adapters.MutationAdapter
adapt, getBytes, toEntry
-
-
-
-
Constructor Detail
-
HBaseMutationAdapter
public HBaseMutationAdapter(MutationAdapter<Delete> deleteAdapter, MutationAdapter<Put> putAdapter, MutationAdapter<Increment> incrementAdapter, MutationAdapter<Append> appendAdapter)
Constructor for MutationAdapter.
- Parameters:
deleteAdapter
- aOperationAdapter
object.putAdapter
- aOperationAdapter
object.incrementAdapter
- aOperationAdapter
object.appendAdapter
- aOperationAdapter
object.
-
-
Method Detail
-
adaptMutations
protected Collection<com.google.bigtable.v2.Mutation> adaptMutations(Mutation mutation)
Description copied from class:MutationAdapter
Converts an HBaseMutation
which represents a set of changes to a single row from an HBase perspective to a collection of Cloud BigtableMutation
which represent the set of changes. The name "Mutation" represents a more granular change in Bigtable than an HBase "Mutation"; An HBaseCell
is akin to a Cloud BigtableMutation
. A CloudBigtableMutateRowRequest
orMutateRowsRequest.Entry
is akin to an HBaseMutation
.- Specified by:
adaptMutations
in classMutationAdapter<Mutation>
- Parameters:
mutation
- The HBaseMutation
to convert- Returns:
- a
Collection
of Cloud BigtableMutation
-
-