Package co.cask.cdap.proto

Examples of co.cask.cdap.proto.QueryStatus


    final StatementExecutionFuture resultFuture = new StatementExecutionFuture(this, futureHandle);
    Futures.addCallback(futureHandle, new FutureCallback<QueryHandle>() {
      @Override
      public void onSuccess(final QueryHandle handle) {
        try {
          QueryStatus status = getStatus(handle);
          if (!status.getStatus().isDone()) {
            executor.schedule(new Runnable() {
              @Override
              public void run() {
                onSuccess(handle);
              }
            }, 300, TimeUnit.MILLISECONDS);
          } else {
            if (!status.hasResults()) {
              close(handle);
            }
            if (!resultFuture.set(new ClientExploreExecutionResult(AbstractExploreClient.this,
                                                                   handle, status.hasResults()))) {
              close(handle);
            }
          }
        } catch (Exception e) {
          throw Throwables.propagate(e);
View Full Code Here

TOP

Related Classes of co.cask.cdap.proto.QueryStatus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.