@Test public void testMutate() throws ExecutionException, InterruptedException { Put put = new Put(Bytes.toBytes("rowKey")); RowMutationEntry entry = RowMutationEntry.create("rowKey"); when(mockRequestAdapter.adaptEntry(put)).thenReturn(entry); when(mockBulkMutation.add(entry)).thenReturn(ApiFutures.immediateFuture(null)); asyncBufferedMutator.mutate(put).get(); verify(mockRequestAdapter).adaptEntry(put); verify(mockBulkMutation).add(entry); }
@Override public List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations) { return helper.mutate(mutations).stream() .map(apiFuture -> toCompletableFuture(apiFuture).thenApply(r -> (Void) null)) .collect(Collectors.toList()); }
BigtableAsyncBufferedMutator implements AsyncBufferedMutator { @Override public List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations) { return helper.mutate(mutations).stream() .map(apiFuture -> toCompletableFuture(apiFuture).thenApply(r -> (Void) null)) .collect(Collectors.toList()); } }
BigtableAsyncBufferedMutator implements AsyncBufferedMutator { @Override public List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations) { return helper.mutate(mutations).stream() .map(apiFuture -> toCompletableFuture(apiFuture).thenApply(r -> (Void) null)) .collect(Collectors.toList()); } BigtableAsyncBufferedMutator(
      BigtableApi bigtableApi, BigtableHBaseSettings settings, HBaseRequestAdapter adapter); }
BigtableAsyncBufferedMutator implements AsyncBufferedMutator { @Override public List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations) { return helper.mutate(mutations).stream() .map(apiFuture -> toCompletableFuture(apiFuture).thenApply(r -> (Void) null)) .collect(Collectors.toList()); } BigtableAsyncBufferedMutator(
      BigtableApi bigtableApi, BigtableHBaseSettings settings, HBaseRequestAdapter adapter); @Override void close(); @Override void flush(); @Override Configuration getConfiguration(); @Override TableName getName(); @Override long getWriteBufferSize(); @Override List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations); @Override CompletableFuture<Void> mutate(final Mutation mutation); }
BigtableAsyncBufferedMutator implements AsyncBufferedMutator { @Override public List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations) { return helper.mutate(mutations).stream() .map(apiFuture -> toCompletableFuture(apiFuture).thenApply(r -> (Void) null)) .collect(Collectors.toList()); } BigtableAsyncBufferedMutator(
      BigtableApi bigtableApi, BigtableHBaseSettings settings, HBaseRequestAdapter adapter); @Override void close(); @Override void flush(); @Override Configuration getConfiguration(); @Override TableName getName(); @Override long getWriteBufferSize(); @Override List<CompletableFuture<Void>> mutate(List<? extends Mutation> mutations); @Override CompletableFuture<Void> mutate(final Mutation mutation);  }