You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2015/03/17 21:41:58 UTC

svn commit: r1667398 [1/7] - in /hive/branches/cbo: ./ beeline/src/java/org/apache/hive/beeline/ common/src/java/org/apache/hadoop/hive/conf/ dev-support/ metastore/if/ metastore/src/gen/thrift/gen-cpp/ metastore/src/gen/thrift/gen-javabean/org/apache/...

Author: hashutosh
Date: Tue Mar 17 20:41:57 2015
New Revision: 1667398

URL: http://svn.apache.org/r1667398
Log:
Merged latest trunk into branch (Ashutosh Chauhan)

Added:
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCbrt.java
      - copied unchanged from r1667397, hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFCbrt.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFactorial.java
      - copied unchanged from r1667397, hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFactorial.java
    hive/branches/cbo/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFCbrt.java
      - copied unchanged from r1667397, hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFCbrt.java
    hive/branches/cbo/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFFactorial.java
      - copied unchanged from r1667397, hive/trunk/ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFFactorial.java
    hive/branches/cbo/ql/src/test/queries/clientpositive/alter_table_invalidate_column_stats.q
      - copied unchanged from r1667397, hive/trunk/ql/src/test/queries/clientpositive/alter_table_invalidate_column_stats.q
    hive/branches/cbo/ql/src/test/queries/clientpositive/default_file_format.q
      - copied unchanged from r1667397, hive/trunk/ql/src/test/queries/clientpositive/default_file_format.q
    hive/branches/cbo/ql/src/test/queries/clientpositive/udf_cbrt.q
      - copied unchanged from r1667397, hive/trunk/ql/src/test/queries/clientpositive/udf_cbrt.q
    hive/branches/cbo/ql/src/test/queries/clientpositive/udf_factorial.q
      - copied unchanged from r1667397, hive/trunk/ql/src/test/queries/clientpositive/udf_factorial.q
    hive/branches/cbo/ql/src/test/results/clientpositive/alter_table_invalidate_column_stats.q.out
      - copied unchanged from r1667397, hive/trunk/ql/src/test/results/clientpositive/alter_table_invalidate_column_stats.q.out
    hive/branches/cbo/ql/src/test/results/clientpositive/default_file_format.q.out
      - copied unchanged from r1667397, hive/trunk/ql/src/test/results/clientpositive/default_file_format.q.out
    hive/branches/cbo/ql/src/test/results/clientpositive/udf_cbrt.q.out
      - copied unchanged from r1667397, hive/trunk/ql/src/test/results/clientpositive/udf_cbrt.q.out
    hive/branches/cbo/ql/src/test/results/clientpositive/udf_factorial.q.out
      - copied unchanged from r1667397, hive/trunk/ql/src/test/results/clientpositive/udf_factorial.q.out
Modified:
    hive/branches/cbo/   (props changed)
    hive/branches/cbo/beeline/src/java/org/apache/hive/beeline/Commands.java
    hive/branches/cbo/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
    hive/branches/cbo/dev-support/jenkins-execute-hms-test.sh
    hive/branches/cbo/metastore/if/hive_metastore.thrift
    hive/branches/cbo/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
    hive/branches/cbo/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
    hive/branches/cbo/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
    hive/branches/cbo/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
    hive/branches/cbo/metastore/src/gen/thrift/gen-php/metastore/ThriftHiveMetastore.php
    hive/branches/cbo/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
    hive/branches/cbo/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
    hive/branches/cbo/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/Deadline.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreUtils.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/RawStoreProxy.java
    hive/branches/cbo/metastore/src/java/org/apache/hadoop/hive/metastore/RetryingHMSHandler.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/QueryPlan.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/DefaultUDAFEvaluatorResolver.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/DemuxOperator.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionRegistry.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/FunctionTask.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/ScriptOperator.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkUtilities.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/status/SparkJobMonitor.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezJobMonitor.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/convert/HiveSchemaConverter.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ConvertJoinMapJoin.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/ReduceSinkMapJoinProc.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/TezBucketJoinProcCtx.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/optimizer/listbucketingpruner/ListBucketingPruner.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/parse/DDLSemanticAnalyzer.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/parse/StorageFormat.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/plan/CommonMergeJoinDesc.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/plan/MapJoinDesc.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/stats/StatsUtils.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/udf/UDFJson.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDF.java
    hive/branches/cbo/ql/src/java/org/apache/hadoop/hive/ql/udf/ptf/WindowingTableFunction.java
    hive/branches/cbo/ql/src/test/results/clientpositive/show_functions.q.out
    hive/branches/cbo/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde/test/ThriftTestObj.java
    hive/branches/cbo/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/Complex.java
    hive/branches/cbo/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/MegaStruct.java
    hive/branches/cbo/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/PropValueUnion.java
    hive/branches/cbo/serde/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/serde2/thrift/test/SetIntString.java
    hive/branches/cbo/service/src/java/org/apache/hive/service/cli/operation/GetColumnsOperation.java
    hive/branches/cbo/service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java
    hive/branches/cbo/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
    hive/branches/cbo/testutils/metastore/metastore-upgrade-test.sh
    hive/branches/cbo/testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/JIRAService.java

Propchange: hive/branches/cbo/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 17 20:41:57 2015
@@ -3,4 +3,4 @@
 /hive/branches/spark:1608589-1660298
 /hive/branches/tez:1494760-1622766
 /hive/branches/vectorization:1466908-1527856
-/hive/trunk:1605012-1666019
+/hive/trunk:1605012-1667397

Modified: hive/branches/cbo/beeline/src/java/org/apache/hive/beeline/Commands.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/beeline/src/java/org/apache/hive/beeline/Commands.java?rev=1667398&r1=1667397&r2=1667398&view=diff
==============================================================================
--- hive/branches/cbo/beeline/src/java/org/apache/hive/beeline/Commands.java (original)
+++ hive/branches/cbo/beeline/src/java/org/apache/hive/beeline/Commands.java Tue Mar 17 20:41:57 2015
@@ -768,6 +768,9 @@ public class Commands {
         }
 
         String extra = beeLine.getConsoleReader().readLine(prompt.toString());
+        if (extra == null) { //it happens when using -f and the line of cmds does not end with ;
+          break;
+        }
         if (!beeLine.isComment(extra)) {
           line += "\n" + extra;
         }
@@ -776,100 +779,104 @@ public class Commands {
       beeLine.handleException(e);
     }
 
-    line = line.trim();
-    if (line.endsWith(";")) {
-      line = line.substring(0, line.length() - 1);
-    }
-
     if (!(beeLine.assertConnection())) {
       return false;
     }
 
-    String sql = line;
-
-    if (sql.startsWith(BeeLine.COMMAND_PREFIX)) {
-      sql = sql.substring(1);
-    }
-
-    String prefix = call ? "call" : "sql";
-
-    if (sql.startsWith(prefix)) {
-      sql = sql.substring(prefix.length());
-    }
-
-    // batch statements?
-    if (beeLine.getBatch() != null) {
-      beeLine.getBatch().add(sql);
-      return true;
-    }
-
-    try {
-      Statement stmnt = null;
-      boolean hasResults;
-      Thread logThread = null;
-
-      try {
-        long start = System.currentTimeMillis();
-
-        if (call) {
-          stmnt = beeLine.getDatabaseConnection().getConnection().prepareCall(sql);
-          hasResults = ((CallableStatement) stmnt).execute();
-        } else {
-          stmnt = beeLine.createStatement();
-          if (beeLine.getOpts().isSilent()) {
-            hasResults = stmnt.execute(sql);
-          } else {
-            logThread = new Thread(createLogRunnable(stmnt));
-            logThread.setDaemon(true);
-            logThread.start();
-            hasResults = stmnt.execute(sql);
-            logThread.interrupt();
-            logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT);
-          }
-        }
+    line = line.trim();
+    String[] cmds = line.split(";");
+    for (int i = 0; i < cmds.length; i++) {
+      String sql = cmds[i].trim();
+      if (sql.length() != 0) {
+        if (beeLine.isComment(sql)) {
+          //skip this and rest cmds in the line
+          break;
+        }
+        if (sql.startsWith(BeeLine.COMMAND_PREFIX)) {
+          sql = sql.substring(1);
+        }
+
+        String prefix = call ? "call" : "sql";
+
+        if (sql.startsWith(prefix)) {
+          sql = sql.substring(prefix.length());
+        }
+
+        // batch statements?
+        if (beeLine.getBatch() != null) {
+          beeLine.getBatch().add(sql);
+          continue;
+        }
+
+        try {
+          Statement stmnt = null;
+          boolean hasResults;
+          Thread logThread = null;
+
+          try {
+            long start = System.currentTimeMillis();
+
+            if (call) {
+              stmnt = beeLine.getDatabaseConnection().getConnection().prepareCall(sql);
+              hasResults = ((CallableStatement) stmnt).execute();
+            } else {
+              stmnt = beeLine.createStatement();
+              if (beeLine.getOpts().isSilent()) {
+                hasResults = stmnt.execute(sql);
+              } else {
+                logThread = new Thread(createLogRunnable(stmnt));
+                logThread.setDaemon(true);
+                logThread.start();
+                hasResults = stmnt.execute(sql);
+                logThread.interrupt();
+                logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT);
+              }
+            }
 
-        beeLine.showWarnings();
+            beeLine.showWarnings();
 
-        if (hasResults) {
-          do {
-            ResultSet rs = stmnt.getResultSet();
-            try {
-              int count = beeLine.print(rs);
+            if (hasResults) {
+              do {
+                ResultSet rs = stmnt.getResultSet();
+                try {
+                  int count = beeLine.print(rs);
+                  long end = System.currentTimeMillis();
+
+                  beeLine.info(beeLine.loc("rows-selected", count) + " "
+                      + beeLine.locElapsedTime(end - start));
+                } finally {
+                  if (logThread != null) {
+                    logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT);
+                    showRemainingLogsIfAny(stmnt);
+                    logThread = null;
+                  }
+                  rs.close();
+                }
+              } while (BeeLine.getMoreResults(stmnt));
+            } else {
+              int count = stmnt.getUpdateCount();
               long end = System.currentTimeMillis();
-
-              beeLine.info(beeLine.loc("rows-selected", count) + " "
-                  + beeLine.locElapsedTime(end - start));
-            } finally {
-              if (logThread != null) {
-                logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT);
-                showRemainingLogsIfAny(stmnt);
-                logThread = null;
+              beeLine.info(beeLine.loc("rows-affected", count)
+                  + " " + beeLine.locElapsedTime(end - start));
+            }
+          } finally {
+            if (logThread != null) {
+              if (!logThread.isInterrupted()) {
+                logThread.interrupt();
               }
-              rs.close();
+              logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT);
+              showRemainingLogsIfAny(stmnt);
+            }
+            if (stmnt != null) {
+              stmnt.close();
             }
-          } while (BeeLine.getMoreResults(stmnt));
-        } else {
-          int count = stmnt.getUpdateCount();
-          long end = System.currentTimeMillis();
-          beeLine.info(beeLine.loc("rows-affected", count)
-              + " " + beeLine.locElapsedTime(end - start));
-        }
-      } finally {
-        if (logThread != null) {
-          if (!logThread.isInterrupted()) {
-            logThread.interrupt();
           }
-          logThread.join(DEFAULT_QUERY_PROGRESS_THREAD_TIMEOUT);
-          showRemainingLogsIfAny(stmnt);
-        }
-        if (stmnt != null) {
-          stmnt.close();
+        } catch (Exception e) {
+          return beeLine.error(e);
         }
+        beeLine.showWarnings();
       }
-    } catch (Exception e) {
-      return beeLine.error(e);
     }
-    beeLine.showWarnings();
     return true;
   }
 

Modified: hive/branches/cbo/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
URL: http://svn.apache.org/viewvc/hive/branches/cbo/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java?rev=1667398&r1=1667397&r2=1667398&view=diff
==============================================================================
--- hive/branches/cbo/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java (original)
+++ hive/branches/cbo/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java Tue Mar 17 20:41:57 2015
@@ -767,6 +767,11 @@ public class HiveConf extends Configurat
 
     HIVEDEFAULTFILEFORMAT("hive.default.fileformat", "TextFile", new StringSet("TextFile", "SequenceFile", "RCfile", "ORC"),
         "Default file format for CREATE TABLE statement. Users can explicitly override it by CREATE TABLE ... STORED AS [FORMAT]"),
+    HIVEDEFAULTMANAGEDFILEFORMAT("hive.default.fileformat.managed", "none",
+	new StringSet("none", "TextFile", "SequenceFile", "RCfile", "ORC"),
+	"Default file format for CREATE TABLE statement applied to managed tables only. External tables will be \n" +
+	"created with format specified by hive.default.fileformat. Leaving this null will result in using hive.default.fileformat \n" +
+	"for all tables."),
     HIVEQUERYRESULTFILEFORMAT("hive.query.result.fileformat", "TextFile", new StringSet("TextFile", "SequenceFile", "RCfile"),
         "Default file format for storing result of the query."),
     HIVECHECKFILEFORMAT("hive.fileformat.check", true, "Whether to check file format or not when loading data files"),

Modified: hive/branches/cbo/dev-support/jenkins-execute-hms-test.sh
URL: http://svn.apache.org/viewvc/hive/branches/cbo/dev-support/jenkins-execute-hms-test.sh?rev=1667398&r1=1667397&r2=1667398&view=diff
==============================================================================
--- hive/branches/cbo/dev-support/jenkins-execute-hms-test.sh (original)
+++ hive/branches/cbo/dev-support/jenkins-execute-hms-test.sh Tue Mar 17 20:41:57 2015
@@ -30,9 +30,7 @@ test -n "$BRANCH" || fail "BRANCH must b
 test -n "$ISSUE_NUM" || fail "ISSUE_NUM must be specified"
 test -n "$SSH_HOST" || fail "SSH_HOST must be specified"
 test -n "$SSH_KEY" || fail "SSH_KEY must be specified"
-test -n "$LOG_ENDPOINT" || fail "LOG_ENDPOINT must be specified"
-test -n "$JENKINS_URL" || fail "JENKINS_URL must be specified"
-test -n "$API_PASSWORD" || fail "API_PASSWORD must be specified"
+test -n "$BUILD_TAG" || fail "BUILD_TAG must be specified"
 
 test -n "$WORKSPACE" || WORKSPACE="$HOME"
 
@@ -46,7 +44,7 @@ process_jira
 PUBLISH_VARS=(
 	BUILD_STATUS=buildStatus
 	BUILD_TAG=buildTag
-	LOG_ENDPOINT=logsURL
+	LOGS_URL=logsURL
 	JENKINS_URL=jenkinsURL
 	PATCH_URL=patchUrl
 	JIRA_NAME=jiraName
@@ -54,6 +52,7 @@ PUBLISH_VARS=(
 	BRANCH=branch
 	REPO=repository
 	REPO_NAME=repositoryName
+	REPO_TYPE=repositoryType
 	TESTS_EXECUTED=numTestsExecuted
 	FAILED_TESTS=failedTests
 	MESSAGES=messages
@@ -61,26 +60,58 @@ PUBLISH_VARS=(
 
 BUILD_STATUS=0
 PATCH_URL="${JIRA_ROOT_URL}${PATCH_URL}"
-JIRA_URL="${JIRA_ROOT_URL}/jira"
-REPO_NAME="trunk" # not used, but JIRAService asks for it
-REPO="trunk"      # not used, but JIRAService asks for it
 TESTS_EXECUTED=0
 FAILED_TESTS=()
 MESSAGES=()
 
+PROFILE_PROPERTIES_FILE="/usr/local/hiveptest/etc/public/${BUILD_PROFILE}.properties"
+[[ -f $PROFILE_PROPERTIES_FILE ]] || fail "$PROFILE_PROPERTIES_FILE file does not exist."
+
+profile_properties_get() {
+	grep "^$1 = " "$PROFILE_PROPERTIES_FILE" | awk '{print $3}'
+}
+
+REPO_TYPE=$(profile_properties_get "repositoryType")
+REPO_NAME=$(profile_properties_get "repository")
+REPO=$(profile_properties_get "repositoryName")
+JIRA_URL=$(profile_properties_get "jiraUrl")
+
+# Avoid showing this information on Jira
+set +x
+JIRA_USER=$(profile_properties_get "jiraUser")
+JIRA_PASS=$(profile_properties_get "jiraPassword")
+set -x
+
+JENKINS_URL=$(profile_properties_get "jenkinsURL")
+LOGS_URL=$(profile_properties_get "logsURL")
+
 build_ptest2() {
 	local path="$1"
 	local curpath="$PWD"
 
 	test -d $path || mkdir -p $path
 	rm -rf $path/ptest2
-	svn co http://svn.apache.org/repos/asf/hive/$BRANCH/testutils/ptest2/ $path/ptest2
+	svn co http://svn.apache.org/repos/asf/hive/$BRANCH/testutils/ptest2/ $path/ptest2 || return 1
 	cd $path/ptest2
-	mvn clean package -DskipTests -Drat.numUnapprovedLicenses=1000 -Dmaven.repo.local=$WORKSPACE/.m2
+	mvn clean package -DskipTests -Drat.numUnapprovedLicenses=1000 -Dmaven.repo.local=$WORKSPACE/.m2 || return 1
 
 	cd $curpath
 }
 
+publish_results() {
+	local file="$1"
+
+	build_ptest2 "hive/build" || return 1
+
+	# Avoid showing this information on Jira
+	set +x
+	java -cp "hive/build/ptest2/target/*:hive/build/ptest2/target/lib/*" org.apache.hive.ptest.execution.JIRAService \
+			--user "$JIRA_USER" \
+			--password "$JIRA_PASS" \
+			--file "$file"
+	set -x
+}
+
 add_json_object() {
 	echo -n "\"$2\" : \"$3\"" >> $1
 }
@@ -132,17 +163,22 @@ create_publish_file() {
 	echo $json_file
 }
 
-wget "${PATCH_URL}" -O /tmp/${JIRA_NAME}.patch
-if cat /tmp/${JIRA_NAME}.patch | grep "^diff.*metastore/scripts/upgrade/" >/dev/null; then
+patch_contains_hms_upgrade() {
+	curl -s "$1" | grep "^diff.*metastore/scripts/upgrade/" >/dev/null
+}
+
+if patch_contains_hms_upgrade "$PATCH_URL"; then
 	ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $SSH_KEY $SSH_HOST "
 		rm -rf metastore/ &&
 		svn co http://svn.apache.org/repos/asf/hive/$BRANCH/testutils/metastore metastore &&
 		sudo bash -x metastore/execute-test-on-lxc.sh --patch \"${PATCH_URL}\" --branch $BRANCH
 	"
-	ret=$?
-	if [[ $ret = 0 ]]; then
-		scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $SSH_KEY ${SSH_HOST}:/tmp/execute-test-on-lxc.sh.log /tmp || exit 1
-		TESTS_EXECUTED=$(cat /tmp/execute-test-on-lxc.sh.log  | grep "Executing sql test" | wc -l)
+	BUILD_STATUS=$?
+	if [[ $BUILD_STATUS = 0 ]]; then
+		tmp_test_log="/tmp/execute-test-on-lxc.sh.log"
+
+		scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i $SSH_KEY ${SSH_HOST}:"$tmp_test_log" "$tmp_test_log" || exit 1
+		TESTS_EXECUTED=$(cat "$tmp_test_log"  | grep "Executing sql test" | wc -l)
 
 		while read line
 		do
@@ -151,21 +187,13 @@ if cat /tmp/${JIRA_NAME}.patch | grep "^
 			fi
 
 			MESSAGES+=("$line")
-		done < /tmp/execute-test-on-lxc.sh.log
+		done < "$tmp_test_log"
 	fi
 
-	# Publish results to JIRA only if there were errors during the tests
-	BUILD_STATUS=$ret
-	if [[ $BUILD_STATUS -gt 0 ]] || [[ ${#FAILED_TESTS[@]} -gt 0 ]]; then
-		build_ptest2 "hive/build"
-
-		json_file=$(create_publish_file)
-		java -cp "hive/build/ptest2/target/hive-ptest-1.0-classes.jar:hive/build/ptest2/target/lib/*" org.apache.hive.ptest.execution.JIRAService \
-			--user "hive" \
-			--password "$API_PASSWORD" \
-			--file $json_file
-		ret=$?
-	fi
+	json_file=$(create_publish_file)
+	publish_results "$json_file"
+	ret=$?
 
+	rm "$json_file" "$tmp_test_log"
 	exit $ret
 fi

Modified: hive/branches/cbo/metastore/if/hive_metastore.thrift
URL: http://svn.apache.org/viewvc/hive/branches/cbo/metastore/if/hive_metastore.thrift?rev=1667398&r1=1667397&r2=1667398&view=diff
==============================================================================
--- hive/branches/cbo/metastore/if/hive_metastore.thrift (original)
+++ hive/branches/cbo/metastore/if/hive_metastore.thrift Tue Mar 17 20:41:57 2015
@@ -786,9 +786,11 @@ service ThriftHiveMetastore extends fb30
 
   // Gets a list of FieldSchemas describing the columns of a particular table
   list<FieldSchema> get_fields(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3),
+  list<FieldSchema> get_fields_with_environment_context(1: string db_name, 2: string table_name, 3:EnvironmentContext environment_context) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3)
 
   // Gets a list of FieldSchemas describing both the columns and the partition keys of a particular table
   list<FieldSchema> get_schema(1: string db_name, 2: string table_name) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3)
+  list<FieldSchema> get_schema_with_environment_context(1: string db_name, 2: string table_name, 3:EnvironmentContext environment_context) throws (1: MetaException o1, 2: UnknownTableException o2, 3: UnknownDBException o3)
 
   // create a Hive table. Following fields must be set
   // tableName