Package org.apache.hive.ptest.execution.conf

Examples of org.apache.hive.ptest.execution.conf.TestBatch


    List<ListenableFuture<Void>> droneResults = Lists.newArrayList();
    for(final Drone drone : ImmutableList.copyOf(mDrones)) {
      droneResults.add(mExecutor.submit(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          TestBatch batch = null;
          try {
            do {
              batch = parallelWorkQueue.poll(mNumPollSeconds, TimeUnit.SECONDS);
              if(mShutdown) {
                mLogger.warn("Shutting down host " + mHost.getName());
                return null;
              }
              if(batch != null) {
                if(!executeTestBatch(drone, batch, failedTestResults)) {
                  failedTestResults.add(batch);
                }
              }
            } while(!mShutdown && !parallelWorkQueue.isEmpty());
          } catch(AbortDroneException ex) {
            mDrones.remove(drone); // return value not checked due to concurrent access
            mLogger.error("Aborting drone during parallel execution", ex);
            if(batch != null) {
              Preconditions.checkState(parallelWorkQueue.add(batch),
                  "Could not add batch to parallel queue " + batch);
            }
          }
          return null;
        }
      }));
    }
    if(mShutdown) {
      mLogger.warn("Shutting down host " + mHost.getName());
      return;
    }
    Futures.allAsList(droneResults).get();
    mLogger.info("Starting isolated execution on " + mHost.getName());
    for(Drone drone : ImmutableList.copyOf(mDrones)) {
      TestBatch batch = null;
      try {
        do {
          batch = isolatedWorkQueue.poll(mNumPollSeconds, TimeUnit.SECONDS);
          if(batch != null) {
            if(!executeTestBatch(drone, batch, failedTestResults)) {
View Full Code Here


    List<ListenableFuture<Void>> droneResults = Lists.newArrayList();
    for(final Drone drone : ImmutableList.copyOf(mDrones)) {
      droneResults.add(mExecutor.submit(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
          TestBatch batch = null;
          try {
            do {
              batch = parallelWorkQueue.poll(mNumPollSeconds, TimeUnit.SECONDS);
              if(mShutdown) {
                mLogger.warn("Shutting down host " + mHost.getName());
                return null;
              }
              if(batch != null) {
                if(!executeTestBatch(drone, batch, failedTestResults)) {
                  failedTestResults.add(batch);
                }
              }
            } while(!mShutdown && !parallelWorkQueue.isEmpty());
          } catch(AbortDroneException ex) {
            mDrones.remove(drone); // return value not checked due to concurrent access
            mLogger.error("Aborting drone during parallel execution", ex);
            if(batch != null) {
              Preconditions.checkState(parallelWorkQueue.add(batch),
                  "Could not add batch to parallel queue " + batch);
            }
          }
          return null;
        }
      }));
    }
    if(mShutdown) {
      mLogger.warn("Shutting down host " + mHost.getName());
      return;
    }
    Futures.allAsList(droneResults).get();
    mLogger.info("Starting isolated execution on " + mHost.getName());
    for(Drone drone : ImmutableList.copyOf(mDrones)) {
      TestBatch batch = null;
      try {
        do {
          batch = isolatedWorkQueue.poll(mNumPollSeconds, TimeUnit.SECONDS);
          if(batch != null) {
            if(!executeTestBatch(drone, batch, failedTestResults)) {
View Full Code Here

TOP

Related Classes of org.apache.hive.ptest.execution.conf.TestBatch

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.