@Test public void testCreateBulkMutation() { BulkMutation mockBulkMutation = Mockito.mock(BulkMutation.class); when(bigtableSession.createBulkMutation(Mockito.<BigtableTableName>any())) .thenReturn(mockBulkMutation); assertTrue(dataClientWrapper.createBulkMutation(TABLE_ID) instanceof BulkMutationClassicApi); verify(bigtableSession).createBulkMutation(Mockito.<BigtableTableName>any()); }
@Override public BulkMutationWrapper createBulkMutation(String tableId) { BigtableTableName tableName = new BigtableTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId)); return new BulkMutationClassicApi(session.createBulkMutation(tableName)); }
DataClientClassicApi implements DataClientWrapper { @Override public BulkMutationWrapper createBulkMutation(String tableId) { BigtableTableName tableName = new BigtableTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId)); return new BulkMutationClassicApi(session.createBulkMutation(tableName)); } }
DataClientClassicApi implements DataClientWrapper { @Override public BulkMutationWrapper createBulkMutation(String tableId) { BigtableTableName tableName = new BigtableTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId)); return new BulkMutationClassicApi(session.createBulkMutation(tableName)); } DataClientClassicApi(BigtableSession session, RequestContext requestContext); }
DataClientClassicApi implements DataClientWrapper { @Override public BulkMutationWrapper createBulkMutation(String tableId) { BigtableTableName tableName = new BigtableTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId)); return new BulkMutationClassicApi(session.createBulkMutation(tableName)); } DataClientClassicApi(BigtableSession session, RequestContext requestContext); @Override BulkMutationWrapper createBulkMutation(String tableId); @Override BulkReadWrapper createBulkRead(String tableId); @Override ApiFuture<Void> mutateRowAsync(RowMutation rowMutation); @Override ApiFuture<Result> readModifyWriteRowAsync(ReadModifyWriteRow readModifyWriteRow); @Override ApiFuture<Boolean> checkAndMutateRowAsync(ConditionalRowMutation conditionalRowMutation); @Override ApiFuture<List<KeyOffset>> sampleRowKeysAsync(String tableId); @Override ApiFuture<Result> readRowAsync(String tableId, ByteString rowKey, Filters.Filter filter); @Override org.apache.hadoop.hbase.client.ResultScanner readRows(Query request); @Override ApiFuture<List<Result>> readRowsAsync(Query request); @Override void readRowsAsync(Query request, final StreamObserver<Result> observer); @Override void close(); }
DataClientClassicApi implements DataClientWrapper { @Override public BulkMutationWrapper createBulkMutation(String tableId) { BigtableTableName tableName = new BigtableTableName( NameUtil.formatTableName( requestContext.getProjectId(), requestContext.getInstanceId(), tableId)); return new BulkMutationClassicApi(session.createBulkMutation(tableName)); } DataClientClassicApi(BigtableSession session, RequestContext requestContext); @Override BulkMutationWrapper createBulkMutation(String tableId); @Override BulkReadWrapper createBulkRead(String tableId); @Override ApiFuture<Void> mutateRowAsync(RowMutation rowMutation); @Override ApiFuture<Result> readModifyWriteRowAsync(ReadModifyWriteRow readModifyWriteRow); @Override ApiFuture<Boolean> checkAndMutateRowAsync(ConditionalRowMutation conditionalRowMutation); @Override ApiFuture<List<KeyOffset>> sampleRowKeysAsync(String tableId); @Override ApiFuture<Result> readRowAsync(String tableId, ByteString rowKey, Filters.Filter filter); @Override org.apache.hadoop.hbase.client.ResultScanner readRows(Query request); @Override ApiFuture<List<Result>> readRowsAsync(Query request); @Override void readRowsAsync(Query request, final StreamObserver<Result> observer); @Override void close();  }