@Override public void awaitUninterruptibly() { Preconditions.checkNotNull(latch, "Latch not initialized in %s at %s.", siteClass.getSimpleName(), desc); latch.awaitUninterruptibly(); }
public void pause() { if (!injectNow()) { return; } latch.awaitUninterruptibly(); }
/** * Waits until it is safe to exit. Blocks until all currently running fragments have completed. * * <p>This is intended to be used by {@link com.dremio.exec.server.SabotNode#close()}.</p> */ public void waitToExit() { synchronized(this) { if (externalIdToForeman.isEmpty()) { return; } exitLatch = new ExtendedLatch(); } // Wait for at most 5 seconds or until the latch is released. exitLatch.awaitUninterruptibly(5000); }
/** * Waits until it is safe to exit. Blocks until all currently running fragments have completed. * * <p>This is intended to be used by {@link com.dremio.exec.server.SabotNode#close()}.</p> */ public void waitToExit() { synchronized(this) { if (fragmentExecutors == null || fragmentExecutors.size() == 0) { return; } exitLatch = new ExtendedLatch(); } // Wait for at most 5 seconds or until the latch is released. exitLatch.awaitUninterruptibly(5000); }
@Override public void run() { latch.awaitUninterruptibly(); final long startTime = System.currentTimeMillis(); for (int i = 0; i < count; i++) { (new Thread() { @Override public void run() { dummyClass.countDown(); } }).start(); } final long endTime = System.currentTimeMillis(); countingDownTime.value = (endTime - startTime); } }
if (!latch.awaitUninterruptibly(timeout)) {
@Override public void run() { latch.awaitUninterruptibly(); try { Thread.sleep(millis); } catch (final InterruptedException ex) { this.ex.value = ex; } context.getExecutionControls().unpauseAll(); } }
if(numIntFragments > 0 && !endpointLatch.awaitUninterruptibly(timeout)){ long numberRemaining = endpointLatch.getCount(); throw UserException.connectionError()