@Test public void testHTableFailedPutAndNewPut() throws Exception { HTable ht = new HTable(); MyAsyncProcess ap = new MyAsyncProcess(createHConnection(), conf, true); ht.ap = ap; ht.setAutoFlush(false, true); ht.setWriteBufferSize(0); Put p = createPut(1, false); ht.put(p); ap.waitUntilDone(); p = createPut(1, true); Assert.assertEquals(0, ht.writeAsyncBuffer.size()); try { ht.put(p); Assert.fail(); } catch (RetriesExhaustedException expected) { } Assert.assertEquals("the put should not been inserted.", 0, ht.writeAsyncBuffer.size()); }
@VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); }
AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } }
AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
      RpcRetryingCallerFactory rpcCaller, boolean useGlobalErrors, RpcControllerFactory rpcFactory); }
AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
      RpcRetryingCallerFactory rpcCaller, boolean useGlobalErrors, RpcControllerFactory rpcFactory); AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows,
      boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults); AsyncRequestFuture submit(ExecutorService pool, TableName tableName,
      List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback,
      boolean needResults); AsyncRequestFuture submitAll(TableName tableName,
      List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results); AsyncRequestFuture submitAll(ExecutorService pool, TableName tableName,
      List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results); boolean hasError(); RetriesExhaustedWithDetailsException waitForAllPreviousOpsAndReset(
      List<Row> failedRows); }
AsyncProcess { @VisibleForTesting void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(ClusterConnection hc, Configuration conf, ExecutorService pool,
      RpcRetryingCallerFactory rpcCaller, boolean useGlobalErrors, RpcControllerFactory rpcFactory); AsyncRequestFuture submit(TableName tableName, List<? extends Row> rows,
      boolean atLeastOne, Batch.Callback<CResult> callback, boolean needResults); AsyncRequestFuture submit(ExecutorService pool, TableName tableName,
      List<? extends Row> rows, boolean atLeastOne, Batch.Callback<CResult> callback,
      boolean needResults); AsyncRequestFuture submitAll(TableName tableName,
      List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results); AsyncRequestFuture submitAll(ExecutorService pool, TableName tableName,
      List<? extends Row> rows, Batch.Callback<CResult> callback, Object[] results); boolean hasError(); RetriesExhaustedWithDetailsException waitForAllPreviousOpsAndReset(
      List<Row> failedRows);  }