Search in sources :

Example 21 with ReadModifyWriteRow

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

the class BigtableDataClientTest method proxyReadModifyWriteRowTest.

@Test
public void proxyReadModifyWriteRowTest() {
    Mockito.when(mockStub.readModifyWriteRowCallable()).thenReturn(mockReadModifyWriteRowCallable);
    ReadModifyWriteRow request = ReadModifyWriteRow.create("fake-table", "some-key").append("fake-family", "fake-qualifier", "suffix");
    bigtableDataClient.readModifyWriteRowAsync(request);
    Mockito.verify(mockReadModifyWriteRowCallable).futureCall(request);
}
Also used : ReadModifyWriteRow(com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow) Test(org.junit.Test)

Aggregations

ReadModifyWriteRow (com.google.cloud.bigtable.data.v2.models.ReadModifyWriteRow)20 Test (org.junit.Test)16 ReadModifyWriteRowRequest (com.google.bigtable.v2.ReadModifyWriteRowRequest)9 ReadModifyWriteRule (com.google.bigtable.v2.ReadModifyWriteRule)6 Append (org.apache.hadoop.hbase.client.Append)5 Increment (org.apache.hadoop.hbase.client.Increment)5 ByteString (com.google.protobuf.ByteString)3 ReadModifyWriteRowResponse (com.google.bigtable.v2.ReadModifyWriteRowResponse)1 BigtableDataClient (com.google.cloud.bigtable.data.v2.BigtableDataClient)1 Row (com.google.cloud.bigtable.data.v2.models.Row)1 RowMutationEntry (com.google.cloud.bigtable.data.v2.models.RowMutationEntry)1 HeaderTracerUnaryCallable (com.google.cloud.bigtable.data.v2.stub.metrics.HeaderTracerUnaryCallable)1 StatsHeadersUnaryCallable (com.google.cloud.bigtable.data.v2.stub.metrics.StatsHeadersUnaryCallable)1 ImmutableMap (com.google.common.collect.ImmutableMap)1 Scope (io.opencensus.common.Scope)1 Span (io.opencensus.trace.Span)1 Map (java.util.Map)1 ExecutionException (java.util.concurrent.ExecutionException)1 Delete (org.apache.hadoop.hbase.client.Delete)1 Put (org.apache.hadoop.hbase.client.Put)1