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

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

Best Java code snippets using com.facebook.presto.operator.Driver.processInternal (Showing top 4 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

public ListenableFuture<?> process()
{
  checkLockNotHeld("Can not process while holding the driver lock");
  // if the driver is blocked we don't need to continue
  SettableFuture<?> blockedFuture = driverBlockedFuture.get();
  if (!blockedFuture.isDone()) {
    return blockedFuture;
  }
  Optional<ListenableFuture<?>> result = tryWithLock(100, TimeUnit.MILLISECONDS, () -> {
    ListenableFuture<?> future = processInternal(createTimer());
    return updateDriverBlockedFuture(future);
  });
  return result.orElse(NOT_BLOCKED);
}
origin: prestodb/presto

long start = System.nanoTime();
do {
  ListenableFuture<?> future = processInternal(operationTimer);
  if (!future.isDone()) {
    return updateDriverBlockedFuture(future);
origin: uk.co.nichesolutions.presto/presto-main

public ListenableFuture<?> process()
{
  checkLockNotHeld("Can not process while holding the driver lock");
  try (DriverLockResult lockResult = tryLockAndProcessPendingStateChanges(100, TimeUnit.MILLISECONDS)) {
    if (!lockResult.wasAcquired()) {
      // this is unlikely to happen unless the driver is being
      // destroyed and in that case the caller should notice notice
      // this state change by calling isFinished
      return NOT_BLOCKED;
    }
    return processInternal();
  }
}
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.operatorDriverprocessInternal

Popular methods of Driver

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

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • startActivity (Activity)
  • getSystemService (Context)
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
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