You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2017/09/14 06:30:21 UTC

[1/2] incubator-impala git commit: IMPALA-5923: Print binary ID as hex in ChildQuery::Cancel()

Repository: incubator-impala
Updated Branches:
  refs/heads/master 6596bebe0 -> 5325b1c07


IMPALA-5923: Print binary ID as hex in ChildQuery::Cancel()

ChildQuery::Cancel() prints a binary ID into the log which can show up
as random characters. One fix is to print it as a hex string.

I tested this by running test_cancellation::test_cancel_insert and
making sure the ID is printed as hex.

This change also removes PrintAsHex() which was broken and unused.

Change-Id: Ie1a9516d5c03524e2585255700bb84e8a301a7ee
Reviewed-on: http://gerrit.cloudera.org:8080/8050
Reviewed-by: Lars Volker <lv...@cloudera.com>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/cbf38dcd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/cbf38dcd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/cbf38dcd

Branch: refs/heads/master
Commit: cbf38dcd03ea5abb92d11a9d35e032e2428d299f
Parents: 6596beb
Author: Lars Volker <lv...@cloudera.com>
Authored: Tue Sep 12 21:34:21 2017 -0700
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu Sep 14 00:32:11 2017 +0000

----------------------------------------------------------------------
 be/src/service/child-query.cc | 12 ++++++++++--
 be/src/util/debug-util.cc     |  9 ---------
 be/src/util/debug-util.h      |  1 -
 3 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/cbf38dcd/be/src/service/child-query.cc
----------------------------------------------------------------------
diff --git a/be/src/service/child-query.cc b/be/src/service/child-query.cc
index 21a2b07..58a275b 100644
--- a/be/src/service/child-query.cc
+++ b/be/src/service/child-query.cc
@@ -128,9 +128,17 @@ void ChildQuery::Cancel() {
     if (!is_running_) return;
     is_running_ = false;
   }
-  VLOG_QUERY << "Cancelling and closing child query with operation id: "
-             << hs2_handle_.operationId.guid;
+  TUniqueId session_id;
+  TUniqueId secret_unused;
   // Ignore return statuses because they are not actionable.
+  Status status = ImpalaServer::THandleIdentifierToTUniqueId(hs2_handle_.operationId,
+      &session_id, &secret_unused);
+  if (status.ok()) {
+    VLOG_QUERY << "Cancelling and closing child query with operation id: " << session_id;
+  } else {
+    VLOG_QUERY << "Cancelling and closing child query. Failed to get query id: " <<
+        status;
+  }
   TCancelOperationResp cancel_resp;
   TCancelOperationReq cancel_req;
   cancel_req.operationHandle = hs2_handle_;

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/cbf38dcd/be/src/util/debug-util.cc
----------------------------------------------------------------------
diff --git a/be/src/util/debug-util.cc b/be/src/util/debug-util.cc
index 48df592..1cb61e4 100644
--- a/be/src/util/debug-util.cc
+++ b/be/src/util/debug-util.cc
@@ -113,15 +113,6 @@ string PrintId(const TUniqueId& id, const string& separator) {
   return out.str();
 }
 
-string PrintAsHex(const char* bytes, int64_t len) {
-  stringstream out;
-  out << hex << std::setfill('0');
-  for (int i = 0; i < len; ++i) {
-    out << setw(2) << static_cast<uint16_t>(bytes[i]);
-  }
-  return out.str();
-}
-
 bool ParseId(const string& s, TUniqueId* id) {
   // For backwards compatibility, this method parses two forms of query ID from text:
   //  - <hex-int64_t><colon><hex-int64_t> - this format is the standard going forward

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/cbf38dcd/be/src/util/debug-util.h
----------------------------------------------------------------------
diff --git a/be/src/util/debug-util.h b/be/src/util/debug-util.h
index 29fd6bb..27d6cee 100644
--- a/be/src/util/debug-util.h
+++ b/be/src/util/debug-util.h
@@ -69,7 +69,6 @@ std::string PrintTSessionType(const TSessionType::type& type);
 std::string PrintTStmtType(const TStmtType::type& type);
 std::string PrintQueryState(const beeswax::QueryState::type& type);
 std::string PrintEncoding(const parquet::Encoding::type& type);
-std::string PrintAsHex(const char* bytes, int64_t len);
 std::string PrintTMetricKind(const TMetricKind::type& type);
 std::string PrintTUnit(const TUnit::type& type);
 std::string PrintTImpalaQueryOptions(const TImpalaQueryOptions::type& type);


[2/2] incubator-impala git commit: IMPALA-5905: build-all-flag-combinations addendum

Posted by ta...@apache.org.
IMPALA-5905: build-all-flag-combinations addendum

Running the script under Jenkins revealed a couple of issues that I'd
missed

Change-Id: Iaa97a981846a2397ecabb90b9039ba61c2c7af4e
Reviewed-on: http://gerrit.cloudera.org:8080/8061
Reviewed-by: Philip Zeyliger <ph...@cloudera.com>
Reviewed-by: Matthew Jacobs <mj...@cloudera.com>
Tested-by: Tim Armstrong <ta...@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/5325b1c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/5325b1c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/5325b1c0

Branch: refs/heads/master
Commit: 5325b1c07f4d215b9e5502076b925f05cea7c2b9
Parents: cbf38dc
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Wed Sep 13 12:05:27 2017 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Thu Sep 14 06:29:53 2017 +0000

----------------------------------------------------------------------
 bin/jenkins/build-all-flag-combinations.sh | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/5325b1c0/bin/jenkins/build-all-flag-combinations.sh
----------------------------------------------------------------------
diff --git a/bin/jenkins/build-all-flag-combinations.sh b/bin/jenkins/build-all-flag-combinations.sh
index cfd6fde..ef1a89e 100755
--- a/bin/jenkins/build-all-flag-combinations.sh
+++ b/bin/jenkins/build-all-flag-combinations.sh
@@ -25,6 +25,7 @@
 set -euo pipefail
 trap 'echo Error in $0 at line $LINENO: $(cd "'$PWD'" && awk "NR == $LINENO" $0)' ERR
 
+. bin/impala-config.sh
 OPTIONS=("-skiptests" "-noclean")
 FAILED_OPTIONS=""
 for BUILD_TYPE in "" -asan -release -ubsan -tsan
@@ -53,6 +54,7 @@ do
 done
 
 if [[ "$FAILED_OPTIONS" != "" ]]
+then
   echo "Builds with the following options failed:"
   echo "$FAILED_OPTIONS"
   exit 1