trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sure...@apache.org
Subject [2/7] incubator-trafodion git commit: [TRAFODION-2663] Add re-check in hbcheck
Date Mon, 03 Jul 2017 17:09:23 GMT
[TRAFODION-2663] Add re-check in hbcheck

Simplifying the HBase config seems to have changed the timing of
HBase start-up on HDP nodes. We are trying to talk to HBase while
master is still initializing. I have added re-tries in hbcheck
to compensate.


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

Branch: refs/heads/master
Commit: 98620b76e7625f8ec9c73b64a0d64e6d9f5eb66b
Parents: aaa5abf
Author: Steve Varnau <steve.varnau@esgyn.com>
Authored: Tue Jun 27 18:55:17 2017 +0000
Committer: Steve Varnau <steve.varnau@esgyn.com>
Committed: Tue Jun 27 18:55:17 2017 +0000

----------------------------------------------------------------------
 core/sqf/sql/scripts/hbcheck | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98620b76/core/sqf/sql/scripts/hbcheck
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/hbcheck b/core/sqf/sql/scripts/hbcheck
index ed50d5c..79dbd97 100755
--- a/core/sqf/sql/scripts/hbcheck
+++ b/core/sqf/sql/scripts/hbcheck
@@ -32,4 +32,15 @@ fi
 mkdir -p $TRAF_HOME/logs
 lv_stderr_file="$TRAF_HOME/logs/hbcheck.log"
 echo "Stderr being written to the file: ${lv_stderr_file}"
-$JAVA_HOME/bin/java -Xmx512m org.trafodion.dtm.hbstatus $* 2>${lv_stderr_file}
+for interval in 5 10 15 30
+do
+  $JAVA_HOME/bin/java -Xmx512m org.trafodion.dtm.hbstatus $* 2>>${lv_stderr_file}
+  if [[ $? == 0 ]]
+  then
+    exit 0
+  fi
+  echo "HBase not available. Waiting $interval seconds."
+  sleep $interval
+done
+$JAVA_HOME/bin/java -Xmx512m org.trafodion.dtm.hbstatus $* 2>>${lv_stderr_file}
+exit $?


Mime
View raw message