Repository: hive
Updated Branches:
  refs/heads/master 721304037 -> 3d325d7ba


Revert "HIVE-14561. Minor ptest2 improvements. (Siddharth Seth, reviewed by 
Prasanth Jayachandran)"

This reverts commit 4b04c9c9347d79ce02f5c0b40498bbf438296e2d.


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/3d325d7b
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/3d325d7b
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/3d325d7b

Branch: refs/heads/master
Commit: 3d325d7bae94b3fc371fc6ea658ddd8bac95d040
Parents: 7213040
Author: Siddharth Seth <[email protected]>
Authored: Thu Aug 25 13:38:11 2016 -0700
Committer: Siddharth Seth <[email protected]>
Committed: Thu Aug 25 13:38:11 2016 -0700

----------------------------------------------------------------------
 testutils/ptest2/pom.xml                        |  5 ++--
 .../hive/ptest/api/client/PTestClient.java      | 22 +++++-----------
 .../ptest/api/server/ExecutionController.java   |  4 ---
 .../hive/ptest/api/server/TestExecutor.java     |  6 ++---
 .../hive/ptest/api/server/TestLogger.java       |  8 ------
 .../hive/ptest/execution/HostExecutor.java      | 16 ++++++------
 .../hive/ptest/execution/LocalCommand.java      |  4 +--
 .../org/apache/hive/ptest/execution/PTest.java  |  4 +--
 .../conf/ExecutionContextConfiguration.java     | 12 ---------
 .../ptest/execution/conf/TestConfiguration.java | 27 --------------------
 .../hive/ptest/execution/conf/TestParser.java   | 10 +-------
 .../context/FixedExecutionContextProvider.java  |  6 +----
 .../ptest2/src/main/resources/log4j2.properties |  2 +-
 13 files changed, 25 insertions(+), 101 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/pom.xml
----------------------------------------------------------------------
diff --git a/testutils/ptest2/pom.xml b/testutils/ptest2/pom.xml
index 375c2a1..4dcd4a2 100644
--- a/testutils/ptest2/pom.xml
+++ b/testutils/ptest2/pom.xml
@@ -27,7 +27,6 @@ limitations under the License.
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <log4j2.version>2.4.1</log4j2.version>
-    <spring.framework.version>3.2.16.RELEASE</spring.framework.version>
   </properties>
 
   <repositories>
@@ -138,12 +137,12 @@ limitations under the License.
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-web</artifactId>
-      <version>${spring.framework.version}</version>
+      <version>3.2.1.RELEASE</version>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-webmvc</artifactId>
-      <version>${spring.framework.version}</version>
+      <version>3.2.1.RELEASE</version>
     </dependency>
     <dependency>
       <groupId>xml-apis</groupId>

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/client/PTestClient.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/client/PTestClient.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/client/PTestClient.java
index 817e00a..14a639a 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/client/PTestClient.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/client/PTestClient.java
@@ -90,21 +90,13 @@ public class PTestClient {
   private final String mLogsEndpoint;
   private final ObjectMapper mMapper;
   private final DefaultHttpClient mHttpClient;
-  private final String testOutputDir;
 
-  public PTestClient(String logsEndpoint, String apiEndPoint, String password, 
String testOutputDir)
+  public PTestClient(String logsEndpoint, String apiEndPoint, String password)
       throws MalformedURLException {
-    this.testOutputDir = testOutputDir;
-    if (!Strings.isNullOrEmpty(testOutputDir)) {
-      Preconditions.checkArgument(Strings.isNullOrEmpty(logsEndpoint),
-          "logsEndPoint must be specified if " + OUTPUT_DIR + " is specified");
-      if (logsEndpoint.endsWith("/")) {
-        this.mLogsEndpoint = logsEndpoint;
-      } else {
-        this.mLogsEndpoint = logsEndpoint + "/";
-      }
+    if (logsEndpoint.endsWith("/")) {
+      this.mLogsEndpoint = logsEndpoint;
     } else {
-      this.mLogsEndpoint = null;
+      this.mLogsEndpoint = logsEndpoint + "/";
     }
     if(apiEndPoint.endsWith("/")) {
       this.mApiEndPoint = apiEndPoint + "api/v1";
@@ -119,7 +111,7 @@ public class PTestClient {
         new UsernamePasswordCredentials("hive", password));
   }
   public boolean testStart(String profile, String testHandle,
-      String jira, String patch, boolean clearLibraryCache)
+      String jira, String patch, String testOutputDir, boolean 
clearLibraryCache)
           throws Exception {
     patch = Strings.nullToEmpty(patch).trim();
     if(!patch.isEmpty()) {
@@ -309,7 +301,7 @@ public class PTestClient {
         ENDPOINT
     });
     PTestClient client = new 
PTestClient(commandLine.getOptionValue(LOGS_ENDPOINT), 
commandLine.getOptionValue(ENDPOINT),
-        commandLine.getOptionValue(PASSWORD), 
commandLine.getOptionValue(OUTPUT_DIR));
+        commandLine.getOptionValue(PASSWORD));
     String command = commandLine.getOptionValue(COMMAND);
     boolean result;
     if("testStart".equalsIgnoreCase(command)) {
@@ -318,7 +310,7 @@ public class PTestClient {
           TEST_HANDLE
       });
       result = client.testStart(commandLine.getOptionValue(PROFILE), 
commandLine.getOptionValue(TEST_HANDLE),
-          commandLine.getOptionValue(JIRA), commandLine.getOptionValue(PATCH),
+          commandLine.getOptionValue(JIRA), commandLine.getOptionValue(PATCH), 
commandLine.getOptionValue(OUTPUT_DIR),
           commandLine.hasOption(CLEAR_LIBRARY_CACHE));
     } else if("testTailLog".equalsIgnoreCase(command)) {
       result = client.testTailLog(commandLine.getOptionValue(TEST_HANDLE));

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/ExecutionController.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/ExecutionController.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/ExecutionController.java
index 2f96ad0..279cd72 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/ExecutionController.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/ExecutionController.java
@@ -57,8 +57,6 @@ import com.google.common.base.Strings;
 import com.google.common.collect.Lists;
 
 
-
-
 /**
  * Server interface of the ptest environment. Each request
  * is converted from JSON and each response is returned in JSON.
@@ -81,9 +79,7 @@ public class ExecutionController {
       throws IOException {
     String executionContextConfigurationFile = 
System.getProperty(CONF_PROPERTY, "").trim();
     Preconditions.checkArgument(!executionContextConfigurationFile.isEmpty(), 
CONF_PROPERTY + " is required");
-    LOG.info("Reading configuration from file: " + 
executionContextConfigurationFile);
     mExecutionContextConfiguration = 
ExecutionContextConfiguration.fromFile(executionContextConfigurationFile);
-    LOG.info("ExecutionContext is [{}]", mExecutionContextConfiguration);
     mExecutionContextProvider = 
mExecutionContextConfiguration.getExecutionContextProvider();
     mTests = Collections.synchronizedMap(new LinkedHashMap<String, Test>() {
       private static final long serialVersionUID = 1L;

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestExecutor.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestExecutor.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestExecutor.java
index a33d222..2d0939d 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestExecutor.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestExecutor.java
@@ -98,9 +98,7 @@ public class TestExecutor extends Thread {
           File profileConfFile = new 
File(mExecutionContextConfiguration.getProfileDirectory(),
               String.format("%s.properties", profile));
           if(!profileConfFile.isFile()) {
-            test.setStatus(Status.illegalArgument(
-                "Profile " + profile + " not found in directory " +
-                    mExecutionContextConfiguration.getProfileDirectory()));
+            test.setStatus(Status.illegalArgument("Profile " + profile + " not 
found"));
             test.setExecutionFinishTime(System.currentTimeMillis());
           } else {
             File logDir = Dirs.create(new File(mExecutionContextConfiguration.
@@ -126,7 +124,7 @@ public class TestExecutor extends Thread {
               test.setStatus(Status.failed("Tests failed with exit code " + 
result));
             }
             logStream.flush();
-            // if all drones where abandoned on a host, try replacing them.
+            // if all drones where abandoned on a host, replace it
             mExecutionContext.replaceBadHosts();
           }
         }

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestLogger.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestLogger.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestLogger.java
index ca2c8a3..d8c6d2e 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestLogger.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/api/server/TestLogger.java
@@ -225,10 +225,6 @@ public class TestLogger extends MarkerIgnoringBase {
     return "<unknown>";
   }
 
-  private String getThreadName() {
-    return Thread.currentThread().getName();
-  }
-
   private String getCallerShortName(StackTraceElement frame) {
     String className = frame.getClassName();
     String methodName = frame.getMethodName();
@@ -246,10 +242,6 @@ public class TestLogger extends MarkerIgnoringBase {
       mLog.print(" ");
       mLog.print(String.format("%5s", level.name()));
       mLog.print(" ");
-      mLog.print("[");
-      mLog.print(getThreadName());
-      mLog.print("]");
-      mLog.print(" ");
       mLog.print(getCaller());
       mLog.print(" ");
       mLog.print(msg);

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
index 5f84f00..2c9100e 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/HostExecutor.java
@@ -110,10 +110,10 @@ class HostExecutor {
           executeTests(parallelWorkQueue, isolatedWorkQueue, 
failedTestResults);
         } finally {
           stopwatch.stop();
-          mLogger.info("Finishing submitTests on host: {}. 
ElapsedTime(ms)={}," +
+          mLogger.info("Finishing submitTests on host: {}. 
ElapsedTime(seconds)={}," +
               " NumParallelBatchesProcessed={}, 
NumIsolatedBatchesProcessed={}",
               new Object[]{getHost().toString(),
-                  stopwatch.elapsed(TimeUnit.MILLISECONDS), 
numParallelBatchesProcessed,
+                  stopwatch.elapsed(TimeUnit.SECONDS), 
numParallelBatchesProcessed,
                   numIsolatedBatchesProcessed});
         }
         return null;
@@ -175,8 +175,8 @@ class HostExecutor {
                   }
                 } finally {
                   sw.stop();
-                  mLogger.info("Finished processing parallel batch [{}] on 
host {}. ElapsedTime(ms)={}",
-                      new Object[]{batch.getName(), getHost().toShortString(), 
sw.elapsed(TimeUnit.MILLISECONDS)});
+                  mLogger.info("Finished processing parallel batch [{}] on 
host {}. ElapsedTime(seconds)={}",
+                      new Object[]{batch.getName(), getHost().toShortString(), 
sw.elapsed(TimeUnit.SECONDS)});
                 }
               }
             } while(!mShutdown && !parallelWorkQueue.isEmpty());
@@ -214,8 +214,8 @@ class HostExecutor {
               }
             } finally {
               sw.stop();
-              mLogger.info("Finished processing isolated batch [{}] on host 
{}. ElapsedTime(ms)={}",
-                  new Object[]{batch.getName(), getHost().toShortString(), 
sw.elapsed(TimeUnit.MILLISECONDS)});
+              mLogger.info("Finished processing isolated batch [{}] on host 
{}. ElapsedTime(seconds)={}",
+                  new Object[]{batch.getName(), getHost().toShortString(), 
sw.elapsed(TimeUnit.SECONDS)});
             }
           }
         } while(!mShutdown && !isolatedWorkQueue.isEmpty());
@@ -258,9 +258,9 @@ class HostExecutor {
         drone.getHost(), drone.getInstance(), command, true).
         call();
     sw.stop();
-    mLogger.info("Completed executing tests for batch [{}] on host {}. 
ElapsedTime(ms)={}",
+    mLogger.info("Completed executing tests for batch [{}] on host {}. 
ElapsedTime(seconds)={}",
         new Object[]{batch.getName(),
-            getHost().toShortString(), sw.elapsed(TimeUnit.MILLISECONDS)});
+            getHost().toShortString(), sw.elapsed(TimeUnit.SECONDS)});
     File batchLogDir = null;
     if(sshResult.getExitCode() == Constants.EXIT_CODE_UNKNOWN) {
       throw new AbortDroneException("Drone " + drone.toString() + " exited 
with " +

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/LocalCommand.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/LocalCommand.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/LocalCommand.java
index b57320d..4d397ea 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/LocalCommand.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/LocalCommand.java
@@ -64,9 +64,9 @@ public class LocalCommand {
         exitCode = process.waitFor();
         if (stopwatch.isRunning()) {
           stopwatch.stop();
-          logger.info("Finished LocalCommandId={}. ElapsedTime(ms)={}", 
commandId,
+          logger.info("Finished LocalCommandId={}. ElapsedTime(seconds)={}", 
commandId,
               stopwatch.elapsed(
-                  TimeUnit.MILLISECONDS));
+                  TimeUnit.SECONDS));
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
index 0ff090d..de5c322 100644
--- a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
+++ b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/PTest.java
@@ -35,7 +35,6 @@ import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
 import com.google.common.annotations.VisibleForTesting;
-import com.google.common.util.concurrent.ThreadFactoryBuilder;
 import org.apache.commons.cli.CommandLine;
 import org.apache.commons.cli.CommandLineParser;
 import org.apache.commons.cli.GnuParser;
@@ -99,8 +98,7 @@ public class PTest {
     mExecutionContext = executionContext;
     mSshCommandExecutor = sshCommandExecutor;
     mRsyncCommandExecutor = rsyncCommandExecutor;
-    mExecutor = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool(
-        new ThreadFactoryBuilder().setDaemon(true).setNameFormat("HostExecutor 
%d").build()));
+    mExecutor = 
MoreExecutors.listeningDecorator(Executors.newCachedThreadPool());
     final File failedLogDir = Dirs.create(new File(logDir, "failed"));
     final File succeededLogDir = Dirs.create(new File(logDir, "succeeded"));
     final File scratchDir = Dirs.createEmpty(new 
File(mExecutionContext.getLocalWorkingDirectory(), "scratch"));

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/ExecutionContextConfiguration.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/ExecutionContextConfiguration.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/ExecutionContextConfiguration.java
index 35ddd44..945ad77 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/ExecutionContextConfiguration.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/ExecutionContextConfiguration.java
@@ -103,16 +103,4 @@ public class ExecutionContextConfiguration {
       in.close();
     }
   }
-
-  @Override
-  public String toString() {
-    return "ExecutionContextConfiguration{" +
-        "mExecutionContextProvider=" + mExecutionContextProvider +
-        ", mWorkingDirectory='" + mWorkingDirectory + '\'' +
-        ", mGlobalLogDirectory='" + mGlobalLogDirectory + '\'' +
-        ", mProfileDirectory='" + mProfileDirectory + '\'' +
-        ", mMaxLogDirectoriesPerProfile=" + mMaxLogDirectoriesPerProfile +
-        ", mMaxRsyncThreads=" + mMaxRsyncThreads +
-        '}';
-  }
 }

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
index 2c5bd3a..ac4bafb 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestConfiguration.java
@@ -60,11 +60,6 @@ public class TestConfiguration {
   private static final String LOGS_URL = "logsURL";
   private static final String TEST_CASE_PROPERTY_NAME = "testCasePropertyName";
   private static final String BUILD_TOOL = "buildTool";
-  // The following parameters are not supported yet. TODO Add support
-  private static final String APPLY_PATCH_SCRIPT_PATH = "applyPatchScriptPath";
-  private static final String PREP_TEMPLATE_PATH = "prepTemplatePath";
-  private static final String BATCH_EXEC_TEMPLATE_PATH = 
"batchExecTemplatePath";
-
 
   private final Context context;
   private String antArgs;
@@ -91,9 +86,6 @@ public class TestConfiguration {
   private final String jiraPassword;
   private final String testCasePropertyName;
   private final String buildTool;
-  private final String applyPathScriptPath;
-  private final String prepTemplatePath;
-  private final String batchExecTemplatePath;
   
   private String jiraName;
   private boolean clearLibraryCache;
@@ -137,10 +129,6 @@ public class TestConfiguration {
     testCasePropertyName = context.getString(TEST_CASE_PROPERTY_NAME, 
"testcase").trim();
     sshOpts = context.getString(SSH_OPTS, "").trim();
 
-    applyPathScriptPath = context.getString(APPLY_PATCH_SCRIPT_PATH, null);
-    prepTemplatePath = context.getString(PREP_TEMPLATE_PATH, null);
-    batchExecTemplatePath = context.getString(BATCH_EXEC_TEMPLATE_PATH, null);
-
   }
   public Context getContext() {
     return context;
@@ -225,21 +213,6 @@ public class TestConfiguration {
   public String getTestCasePropertyName() {
     return testCasePropertyName;
   }
-
-  public String getApplyPathScriptPath() {
-    return applyPathScriptPath;
-  }
-
-  public String getPrepTemplatePath() {
-    return prepTemplatePath;
-  }
-
-  public String getBatchExecTemplatePath() {
-    return batchExecTemplatePath;
-  }
-
-  // TODO - Allow the branch to be specified as a parameter to ptest, rather 
than requiring a separate property file.
-  // (will need to handle an alternate work-dir as well in this case - derive 
from branch?)
   public void setPatch(String patch) {
     this.patch = Strings.nullToEmpty(patch);
   }

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestParser.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestParser.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestParser.java
index e38cbb4..c51ef3c 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestParser.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/conf/TestParser.java
@@ -116,15 +116,7 @@ public class TestParser {
     Map<String, Properties> properties = parseQTestProperties();
 
     List<QFileTestBatch> result = Lists.newArrayList();
-    String qFileTestsString = context.getString("qFileTests",null);
-    String []aliases;
-    if (qFileTestsString != null) {
-      aliases = qFileTestsString.split(" ");
-    } else {
-      aliases = new String[0];
-    }
-
-    for(String alias : aliases) {
+    for(String alias : context.getString("qFileTests", "").split(" ")) {
       Context testContext = new Context(context.getSubProperties(
           Joiner.on(".").join("qFileTest", alias, "")));
       String driver = checkNotNull(testContext.getString("driver"), 
"driver").trim();

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/FixedExecutionContextProvider.java
----------------------------------------------------------------------
diff --git 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/FixedExecutionContextProvider.java
 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/FixedExecutionContextProvider.java
index f7b50d6..075ae3e 100644
--- 
a/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/FixedExecutionContextProvider.java
+++ 
b/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/FixedExecutionContextProvider.java
@@ -57,11 +57,7 @@ public class FixedExecutionContextProvider implements 
ExecutionContextProvider {
   }
   @Override
   public void replaceBadHosts(ExecutionContext executionContext) throws 
CreateHostsFailedException {
-    if (!executionContext.getBadHosts().isEmpty()) {
-      LOG.warn(
-          "Found bad nodes on FixedExecutionContext. Cannot replace them. 
Degraded performance. badNodes={}",
-          executionContext.getBadHosts());
-    }
+    throw new UnsupportedOperationException();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/3d325d7b/testutils/ptest2/src/main/resources/log4j2.properties
----------------------------------------------------------------------
diff --git a/testutils/ptest2/src/main/resources/log4j2.properties 
b/testutils/ptest2/src/main/resources/log4j2.properties
index 1c16919..85f1b64 100644
--- a/testutils/ptest2/src/main/resources/log4j2.properties
+++ b/testutils/ptest2/src/main/resources/log4j2.properties
@@ -40,7 +40,7 @@ appender.FILE.name = FILE
 appender.FILE.fileName = ${sys:hive.ptest.log.dir}/${sys:hive.ptest.log.file}
 appender.FILE.filePattern = 
${sys:hive.ptest.log.dir}/${sys:hive.ptest.log.file}.%i
 appender.FILE.layout.type = PatternLayout
-appender.FILE.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p [%t] %c{1}:%L - 
%m%n
+appender.FILE.layout.pattern = %d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
 appender.FILE.policies.type = Policies
 appender.FILE.policies.size.type = SizeBasedTriggeringPolicy
 appender.FILE.policies.size.size = 50MB

Reply via email to