You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by da...@apache.org on 2017/11/13 23:03:44 UTC

kudu git commit: MiniHms: log HMS thread stacks when startup times out

Repository: kudu
Updated Branches:
  refs/heads/master bf1fcb0df -> a0af0e224


MiniHms: log HMS thread stacks when startup times out

We're seeing instances where the HMS can take more than 60 seconds to
startup on test machines. This commit changes MiniHms to send SIGQUIT to
the HMS on timeout, in order to capture thread stack traces of the slow
process.

Change-Id: Ifefb3b16ef097412604d555d5c2118aca3d998a9
Reviewed-on: http://gerrit.cloudera.org:8080/8534
Reviewed-by: Todd Lipcon <to...@apache.org>
Tested-by: Kudu Jenkins


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

Branch: refs/heads/master
Commit: a0af0e224532b86009e6deb693739a0d570c1657
Parents: bf1fcb0
Author: Dan Burkert <da...@apache.org>
Authored: Wed Nov 8 17:10:50 2017 -0800
Committer: Dan Burkert <da...@apache.org>
Committed: Mon Nov 13 23:02:57 2017 +0000

----------------------------------------------------------------------
 src/kudu/hms/mini_hms.cc | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/a0af0e22/src/kudu/hms/mini_hms.cc
----------------------------------------------------------------------
diff --git a/src/kudu/hms/mini_hms.cc b/src/kudu/hms/mini_hms.cc
index 75ef0b7..8f706f4 100644
--- a/src/kudu/hms/mini_hms.cc
+++ b/src/kudu/hms/mini_hms.cc
@@ -98,8 +98,7 @@ Status MiniHms::Start() {
   RETURN_NOT_OK(CreateHiveSite(tmp_dir));
 
   // Comma-separated list of additional jars to add to the HMS classpath.
-  string aux_jars = Substitute("$0/hcatalog/share/hcatalog,$1/hms-plugin.jar",
-                               hive_home, bin_dir);
+  string aux_jars = Substitute("$0/hms-plugin.jar", bin_dir);
   map<string, string> env_vars {
       { "JAVA_HOME", java_home },
       { "HADOOP_HOME", hadoop_home },
@@ -120,8 +119,12 @@ Status MiniHms::Start() {
 
   // Wait for HMS to start listening on its ports and commencing operation.
   VLOG(1) << "Waiting for HMS ports";
-  return WaitForTcpBind(hms_process_->pid(), &port_,
-                        MonoDelta::FromMilliseconds(kHmsStartTimeoutMs));
+  Status wait = WaitForTcpBind(hms_process_->pid(), &port_,
+                               MonoDelta::FromMilliseconds(kHmsStartTimeoutMs));
+  if (!wait.ok()) {
+    WARN_NOT_OK(hms_process_->Kill(SIGQUIT), "failed to send SIGQUIT to HMS");
+  }
+  return wait;
 }
 
 Status MiniHms::CreateHiveSite(const string& tmp_dir) const {
@@ -163,7 +166,6 @@ Status MiniHms::CreateHiveSite(const string& tmp_dir) const {
     <name>hive.metastore.event.db.listener.timetolive</name>
     <value>$0s</value>
   </property>
-
 </configuration>
   )";