- final CheckedFuture<Void, TransactionCommitFailedException> future = futures.get(i);
- if (!future.isDone()) {
- LOG.warn("Future #{}/{} possibly hanged.", future, futures.size());
+ final ListenableFuture<Void> future = futures.get(i);
+
+ try {
+ future.get(0, TimeUnit.NANOSECONDS);
+ } catch (final TimeoutException fe) {
+ LOG.warn("Future #{}/{} not completed yet", i, futures.size());
+ } catch (final ExecutionException fe) {
+ LOG.warn("Future #{}/{} failed", i, futures.size(), e.getCause());
+ } catch (final InterruptedException fe) {
+ LOG.warn("Interrupted while examining future #{}/{}", i, futures.size(), e);