This is an automated email from the ASF dual-hosted git repository.
kturner pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/fluo-uno.git
The following commit(s) were added to refs/heads/master by this push:
new b846945 Fixes:#195 Added command to check uno status (#226)
b846945 is described below
commit b846945bb5b387d4bb3691d79c983c8a836a8578
Author: Russell Carter <[email protected]>
AuthorDate: Wed Jun 12 10:25:32 2019 -0400
Fixes:#195 Added command to check uno status (#226)
---
bin/impl/fetch.sh | 16 ----------------
bin/impl/kill.sh | 16 ----------------
bin/impl/status.sh | 43 +++++++++++++++++++++++++++++++++++++++++++
bin/uno | 6 ++++++
4 files changed, 49 insertions(+), 32 deletions(-)
diff --git a/bin/impl/fetch.sh b/bin/impl/fetch.sh
index 006567e..5c0e70b 100755
--- a/bin/impl/fetch.sh
+++ b/bin/impl/fetch.sh
@@ -15,22 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-# 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.
-
source "$UNO_HOME"/bin/impl/util.sh
function fetch_hadoop() {
diff --git a/bin/impl/kill.sh b/bin/impl/kill.sh
index 633d4f1..cbb9d32 100755
--- a/bin/impl/kill.sh
+++ b/bin/impl/kill.sh
@@ -15,22 +15,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-
-# 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.
-
pkill -f fluo\\.yarn
pkill -f MiniFluo
pkill -f accumulo\\.start
diff --git a/bin/impl/status.sh b/bin/impl/status.sh
new file mode 100755
index 0000000..538b461
--- /dev/null
+++ b/bin/impl/status.sh
@@ -0,0 +1,43 @@
+#! /usr/bin/env bash
+
+# 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.
+
+
+
+atmp="$(ps -ef | grep accumulo\\.start | awk '{print $NF "(" $2 ")"}' | tr
'\n' ' ')"
+htmp="$(ps -ef | grep -e hadoop\\.hdfs -e hadoop\\.yarn | tr '.' ' ' | awk
'{print $NF "(" $2 ")"}' | tr '\n' ' ')"
+ztmp="$(pgrep -f QuorumPeerMain | awk '{print "zoo(" $1 ")"}' | tr '\n' ' ')"
+
+if [[ "$atmp" || "$ztmp" || "$htmp" ]]; then
+ if [[ "$atmp" ]]; then
+ echo "Accumulo processes running: $atmp"
+ fi
+
+ if [[ "$ztmp" ]]; then
+ echo "Zookeeper processes running: $ztmp "
+ fi
+
+ if [[ "$htmp" ]]; then
+ echo "Hadoop processes running: $htmp"
+ fi
+
+else
+ echo "No components runnning."
+fi
+
+
+
+
diff --git a/bin/uno b/bin/uno
index 8882286..095d091 100755
--- a/bin/uno
+++ b/bin/uno
@@ -70,6 +70,11 @@ case "$1" in
version)
"$bin"/impl/version.sh "${@:2}"
;;
+
+ status)
+ "$bin"/impl/status.sh "${@:2}"
+ ;;
+
wipe)
"$bin"/impl/kill.sh
if [[ -d "$INSTALL" ]]; then
@@ -87,6 +92,7 @@ case "$1" in
echo " setup <component> Installs and runs component and its
dependencies (clearing any existing data)"
echo " start <component> Start ZooKeeper, Hadoop, Accumulo, if not
running."
echo " stop <component> Stop Accumulo, Hadoop, ZooKeeper, if
running."
+ echo " status Check if Accumulo, Hadoop, or Zookeeper are
running."
echo " kill Kills all processes"
echo " ashell Runs the Accumulo shell"
echo " zk Connects to ZooKeeper CLI"