Search in sources :

Example 6 with DropRowRangeRequest

use of com.google.bigtable.admin.v2.DropRowRangeRequest in project java-bigtable-hbase by googleapis.

the class TestBigtableAdmin method testDeleteRowRangeByPrefixNonUtf8.

@Test
public void testDeleteRowRangeByPrefixNonUtf8() throws IOException, InterruptedException {
    TableName tableName = TableName.valueOf(TABLE_ID);
    ByteString expectedKey = ByteString.copyFrom(new byte[] { 0, 0, 0, (byte) 128 });
    DropRowRangeRequest expectedRequest = DropRowRangeRequest.newBuilder().setName(TABLE_NAME).setRowKeyPrefix(expectedKey).build();
    responseQueue.put(Empty.getDefaultInstance());
    admin.deleteRowRangeByPrefix(tableName, expectedKey.toByteArray());
    assertEquals(expectedRequest, requestQueue.take());
}
Also used : TableName(org.apache.hadoop.hbase.TableName) DropRowRangeRequest(com.google.bigtable.admin.v2.DropRowRangeRequest) ByteString(com.google.protobuf.ByteString) Test(org.junit.Test)

Aggregations

DropRowRangeRequest (com.google.bigtable.admin.v2.DropRowRangeRequest)6 Test (org.junit.Test)6 ByteString (com.google.protobuf.ByteString)3 ApiFuture (com.google.api.core.ApiFuture)2 ApiFutures (com.google.api.core.ApiFutures)2 GrpcStatusCode (com.google.api.gax.grpc.GrpcStatusCode)2 OperationFuture (com.google.api.gax.longrunning.OperationFuture)2 OperationFutures (com.google.api.gax.longrunning.OperationFutures)2 OperationSnapshot (com.google.api.gax.longrunning.OperationSnapshot)2 NotFoundException (com.google.api.gax.rpc.NotFoundException)2 OperationCallable (com.google.api.gax.rpc.OperationCallable)2 UnaryCallable (com.google.api.gax.rpc.UnaryCallable)2 FakeOperationSnapshot (com.google.api.gax.rpc.testing.FakeOperationSnapshot)2 State (com.google.bigtable.admin.v2.Backup.State)2 BackupInfo (com.google.bigtable.admin.v2.BackupInfo)2 ColumnFamily (com.google.bigtable.admin.v2.ColumnFamily)2 CreateBackupMetadata (com.google.bigtable.admin.v2.CreateBackupMetadata)2 DeleteBackupRequest (com.google.bigtable.admin.v2.DeleteBackupRequest)2 DeleteTableRequest (com.google.bigtable.admin.v2.DeleteTableRequest)2 GcRule (com.google.bigtable.admin.v2.GcRule)2