@Override public void close() { if (executor != null) { executor.shutdown(); while (!executor.isTerminated()) { try { executor.awaitTermination(3, TimeUnit.SECONDS); } catch (InterruptedException e) { throw new RuntimeException(e); } } } if (exceptionRef.get() != null) { throw new RuntimeException(exceptionRef.get()); } // wait for any async mutations that transactions write to flush env.getSharedResources().getBatchWriter().waitForAsyncFlush(); }
@Override public void commit() { super.commit(); // wait for any async mutations that transaction write to flush env.getSharedResources().getBatchWriter().waitForAsyncFlush(); } };
env.getSharedResources().getBatchWriter().waitForAsyncFlush(); count = scan(modParams, tabletInfo.getRange()); tabletsScanned++;