FAQ
Author: brock
Date: Wed Nov 26 02:10:00 2014
New Revision: 1641745

URL: http://svn.apache.org/r1641745
Log:
HIVE-8965 - Enhance PTest to kill all processes between tests and to report when a TEST*.xml file is not generated (Brock reviewed by Szehon)

Modified:
     hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java

Modified: hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java
URL: http://svn.apache.org/viewvc/hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java?rev=1641745&r1=1641744&r2=1641745&view=diff
==============================================================================
--- hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java (original)
+++ hive/trunk/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/Phase.java Wed Nov 26 02:10:00 2014
@@ -94,7 +94,7 @@ public abstract class Phase {
      for(HostExecutor hostExecutor : hostExecutors) {
        futures.add(hostExecutor.execIgnoreAllErrors(command));
      }
- return toListOfResults(futures);
+ return toListOfResults(futures, false);
    }
    // clean prep
    protected List<RemoteCommandResult> execInstances(String command)
@@ -167,10 +167,15 @@ public abstract class Phase {
    }
    private <T extends RemoteCommandResult> List<T> toListOfResults(List<ListenableFuture<T>> futures)
        throws Exception {
+ return toListOfResults(futures, true);
+ }
+ private <T extends RemoteCommandResult> List<T> toListOfResults(List<ListenableFuture<T>> futures,
+ boolean reportErrors)
+ throws Exception {
      List<T> results = Lists.newArrayList();
      for(T result : Futures.allAsList(futures).get()) {
        if(result != null) {
- if(result.getException() != null || result.getExitCode() != 0) {
+ if(reportErrors && (result.getException() != null || result.getExitCode() != 0)) {
            throw new SSHExecutionException(result);
          }
          results.add(result);

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedNov 26, '14 at 2:10a
activeNov 26, '14 at 2:10a
posts1
users1
websitehive.apache.org

1 user in discussion

Brock: 1 post

People

Translate

site design / logo © 2021 Grokbase