Tabnine Logo
Driver.processInternal
Code IndexAdd Tabnine 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)

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

  • Reading from database using SQL prepared statement
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Permission (java.security)
    Legacy security code; do not use.
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • JTable (javax.swing)
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now