Codota Logo
Driver.isFinishedInternal
Code IndexAdd Codota to your IDE (free)

How to use
isFinishedInternal
method
in
com.facebook.presto.operator.Driver

Best Java code snippets using com.facebook.presto.operator.Driver.isFinishedInternal (Showing top 3 results out of 315)

  • Common ways to obtain Driver
private void myMethod () {
Driver d =
  • Codota IconDriverFactory driverFactory;DriverContext driverContext;driverFactory.createDriver(driverContext)
  • Smart code suggestions by Codota
}
origin: prestodb/presto

while (System.nanoTime() - start < maxRuntime && !isFinishedInternal());
origin: uk.co.nichesolutions.presto/presto-main

public boolean isFinished()
{
  checkLockNotHeld("Can not check finished status while holding the driver lock");
  // if we can get the lock, attempt a clean shutdown; otherwise someone else will shutdown
  try (DriverLockResult lockResult = tryLockAndProcessPendingStateChanges(0, TimeUnit.MILLISECONDS)) {
    if (lockResult.wasAcquired()) {
      return isFinishedInternal();
    }
    else {
      // did not get the lock, so we can't check operators, or destroy
      return state.get() != State.ALIVE || driverContext.isDone();
    }
  }
}
origin: uk.co.nichesolutions.presto/presto-main

public ListenableFuture<?> processFor(Duration duration)
{
  checkLockNotHeld("Can not process for a duration while holding the driver lock");
  requireNonNull(duration, "duration is null");
  long maxRuntime = duration.roundTo(TimeUnit.NANOSECONDS);
  try (DriverLockResult lockResult = tryLockAndProcessPendingStateChanges(100, TimeUnit.MILLISECONDS)) {
    if (lockResult.wasAcquired()) {
      driverContext.startProcessTimer();
      try {
        long start = System.nanoTime();
        do {
          ListenableFuture<?> future = processInternal();
          if (!future.isDone()) {
            return future;
          }
        }
        while (System.nanoTime() - start < maxRuntime && !isFinishedInternal());
      }
      finally {
        driverContext.recordProcessed();
      }
    }
  }
  return NOT_BLOCKED;
}
com.facebook.presto.operatorDriverisFinishedInternal

Popular methods of Driver

  • isFinished
  • process
  • getDriverContext
  • close
  • processFor
  • updateSource
  • <init>
  • addSuppressedException
  • checkLockHeld
  • checkLockNotHeld
  • createDriver
  • firstFinishedFuture
  • createDriver,
  • firstFinishedFuture,
  • processInternal,
  • processNewSources,
  • checkOperatorFinishedRevoking,
  • closeAndDestroyOperators,
  • createTimer,
  • destroyIfNecessary,
  • getBlockedFuture

Popular in Java

  • Running tasks concurrently on multiple threads
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • setContentView (Activity)
  • Menu (java.awt)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now