Search in sources :

Example 6 with RowMutation

use of com.google.cloud.bigtable.data.v2.models.RowMutation in project java-bigtable-hbase by googleapis.

the class HBaseRequestAdapter method adapt.

/**
 * adapt.
 *
 * @param mutations a {@link org.apache.hadoop.hbase.client.RowMutations} object.
 * @return a {@link RowMutation} object.
 */
public RowMutation adapt(RowMutations mutations) {
    RowMutation rowMutation = newRowMutationModel(mutations.getRow());
    adapt(mutations, rowMutation);
    return rowMutation;
}
Also used : RowMutation(com.google.cloud.bigtable.data.v2.models.RowMutation)

Example 7 with RowMutation

use of com.google.cloud.bigtable.data.v2.models.RowMutation in project java-bigtable-hbase by googleapis.

the class HBaseRequestAdapter method adapt.

/**
 * adapt.
 *
 * @param delete a {@link org.apache.hadoop.hbase.client.Delete} object.
 * @return a {@link RowMutation} object.
 */
public RowMutation adapt(Delete delete) {
    RowMutation rowMutation = newRowMutationModel(delete.getRow());
    adapt(delete, rowMutation);
    return rowMutation;
}
Also used : RowMutation(com.google.cloud.bigtable.data.v2.models.RowMutation)

Example 8 with RowMutation

use of com.google.cloud.bigtable.data.v2.models.RowMutation in project java-bigtable-hbase by googleapis.

the class HBaseRequestAdapter method adaptEntry.

/**
 * adapt.
 *
 * @param delete a {@link Delete} object.
 * @return a {@link RowMutationEntry} object.
 */
public RowMutationEntry adaptEntry(Delete delete) {
    RowMutationEntry rowMutation = buildRowMutationEntry(delete.getRow());
    adapt(delete, rowMutation);
    return rowMutation;
}
Also used : RowMutationEntry(com.google.cloud.bigtable.data.v2.models.RowMutationEntry)

Example 9 with RowMutation

use of com.google.cloud.bigtable.data.v2.models.RowMutation in project java-bigtable-hbase by googleapis.

the class HBaseRequestAdapter method adaptEntry.

/**
 * adaptEntry.
 *
 * @param mutations a {@link org.apache.hadoop.hbase.client.RowMutations} object.
 * @return a {@link RowMutationEntry} object.
 */
public RowMutationEntry adaptEntry(RowMutations mutations) {
    RowMutationEntry rowMutation = buildRowMutationEntry(mutations.getRow());
    adapt(mutations, rowMutation);
    return rowMutation;
}
Also used : RowMutationEntry(com.google.cloud.bigtable.data.v2.models.RowMutationEntry)

Example 10 with RowMutation

use of com.google.cloud.bigtable.data.v2.models.RowMutation in project java-bigtable-hbase by googleapis.

the class TestPutAdapter method adapt.

private MutateRowRequest adapt(Put put) {
    RowMutation rowMutation = RowMutation.create(TABLE_ID, ByteString.copyFrom(put.getRow()));
    adapter.adapt(put, rowMutation);
    return rowMutation.toProto(REQUEST_CONTEXT);
}
Also used : RowMutation(com.google.cloud.bigtable.data.v2.models.RowMutation)

Aggregations

RowMutation (com.google.cloud.bigtable.data.v2.models.RowMutation)23 ByteString (com.google.protobuf.ByteString)8 Test (org.junit.Test)7 ConditionalRowMutation (com.google.cloud.bigtable.data.v2.models.ConditionalRowMutation)5 RowMutationEntry (com.google.cloud.bigtable.data.v2.models.RowMutationEntry)5 MutateRowRequest (com.google.bigtable.v2.MutateRowRequest)3 ApiFuture (com.google.api.core.ApiFuture)2 UnaryCallable (com.google.api.gax.rpc.UnaryCallable)2 BigtableDataClient (com.google.cloud.bigtable.data.v2.BigtableDataClient)2 ApiFutures (com.google.api.core.ApiFutures)1 Batcher (com.google.api.gax.batching.Batcher)1 BatcherImpl (com.google.api.gax.batching.BatcherImpl)1 BatchingDescriptor (com.google.api.gax.batching.BatchingDescriptor)1 BatchingSettings (com.google.api.gax.batching.BatchingSettings)1 FlowControlSettings (com.google.api.gax.batching.FlowControlSettings)1 NotFoundException (com.google.api.gax.rpc.NotFoundException)1 ResponseObserver (com.google.api.gax.rpc.ResponseObserver)1 ServerStreamingCallable (com.google.api.gax.rpc.ServerStreamingCallable)1 CheckAndMutateRowRequest (com.google.bigtable.v2.CheckAndMutateRowRequest)1 CheckAndMutateRowResponse (com.google.bigtable.v2.CheckAndMutateRowResponse)1