You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by am...@apache.org on 2016/03/25 22:08:22 UTC
[2/3] incubator-trafodion git commit: [TRAFODION-1617]
[TRAFODION-1617]
Add a few convenience scripts (and associated helper scripts)
Note: All the scripts with an "ilh_" prefix work if one has used install_local_hadoop
ilh_trafinit: ckillall, restarts HBase(clobbers HBase data), sqstart and initializes trafodion
ilh_traf_restart: ckillall, restarts HBase, sqstart
trafnodestatus: Prints the trafodion-status (whether Trafodion is UP or DOWN on a node)
of the nodes in the Trafodion cluster. Has a '-j' switch to print the
output in JSON format.
Note: There is another script 'sqnodestatus' with a similar output but that
prints the status of the nodes from a Linux perspective.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/b3d54111
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/b3d54111
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/b3d54111
Branch: refs/heads/master
Commit: b3d541112c98fb76ff9db5688ed0462a8a63d1d4
Parents: 79670d0
Author: Narendra Goyal <na...@esgyn.com>
Authored: Fri Mar 25 04:07:53 2016 +0000
Committer: Narendra Goyal <na...@esgyn.com>
Committed: Fri Mar 25 04:07:53 2016 +0000
----------------------------------------------------------------------
core/sqf/sql/scripts/trafnodestatus | 5 +++++
core/sqf/sql/scripts/trafnodestatus.awk | 26 ++++++++++++++++++++++++++
2 files changed, 31 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b3d54111/core/sqf/sql/scripts/trafnodestatus
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/trafnodestatus b/core/sqf/sql/scripts/trafnodestatus
index 0c9aacd..f417471 100755
--- a/core/sqf/sql/scripts/trafnodestatus
+++ b/core/sqf/sql/scripts/trafnodestatus
@@ -21,6 +21,11 @@
#
# @@@ END COPYRIGHT @@@
#
+# Script to check the trafodion-status of the nodes
+# of a trafodion cluster.
+#
+# Switch "-j" prints the output in JSON format.
+#
function traf_echo {
if [[ ${lv_jason_output} == "1" ]]; then
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/b3d54111/core/sqf/sql/scripts/trafnodestatus.awk
----------------------------------------------------------------------
diff --git a/core/sqf/sql/scripts/trafnodestatus.awk b/core/sqf/sql/scripts/trafnodestatus.awk
index 4c758a7..a1849a7 100644
--- a/core/sqf/sql/scripts/trafnodestatus.awk
+++ b/core/sqf/sql/scripts/trafnodestatus.awk
@@ -1,3 +1,29 @@
+#
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+#
+# awk script used by the trafnodestatus shell-script
+# to check the trafodion-status of the nodes
+# of a trafodion cluster.
+#
BEGIN {
lv_header_line_number = 0;
lv_lines_since_header = 0;