kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mimai...@apache.org
Subject [kafka] branch trunk updated: KAFKA-10272: Add IBM i support to "stop" scripts (#9023)
Date Wed, 02 Sep 2020 15:47:05 GMT
This is an automated email from the ASF dual-hosted git repository.

mimaison pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 55c1ab6  KAFKA-10272: Add IBM i support to "stop" scripts (#9023)
55c1ab6 is described below

commit 55c1ab62c9a05c9a5727d6229a9170bd85609791
Author: Jesse Gorzinski <jgorzinski@gmail.com>
AuthorDate: Wed Sep 2 10:46:24 2020 -0500

    KAFKA-10272: Add IBM i support to "stop" scripts (#9023)
    
    
    Reviewers: Mickael Maison <mickael.maison@gmail.com>
---
 bin/kafka-server-stop.sh     | 5 ++++-
 bin/zookeeper-server-stop.sh | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/bin/kafka-server-stop.sh b/bin/kafka-server-stop.sh
index 3584269..96f5e74 100755
--- a/bin/kafka-server-stop.sh
+++ b/bin/kafka-server-stop.sh
@@ -15,11 +15,14 @@
 # limitations under the License.
 SIGNAL=${SIGNAL:-TERM}
 
-if [[ $(uname -s) == "OS/390" ]]; then
+OSNAME=$(uname -s)
+if [[ "$OSNAME" == "OS/390" ]]; then
     if [ -z $JOBNAME ]; then
         JOBNAME="KAFKSTRT"
     fi
     PIDS=$(ps -A -o pid,jobname,comm | grep -i $JOBNAME | grep java | grep -v grep | awk
'{print $1}')
+elif [[ "$OSNAME" == "OS400" ]]; then
+    PIDS=$(ps -af | grep -i 'kafka\.Kafka' | grep java | grep -v grep | awk '{print $2}')
 else
     PIDS=$(ps ax | grep -i 'kafka\.Kafka' | grep java | grep -v grep | awk '{print $1}')
 fi
diff --git a/bin/zookeeper-server-stop.sh b/bin/zookeeper-server-stop.sh
index b6dec90..725c02d 100755
--- a/bin/zookeeper-server-stop.sh
+++ b/bin/zookeeper-server-stop.sh
@@ -15,11 +15,14 @@
 # limitations under the License.
 SIGNAL=${SIGNAL:-TERM}
 
-if [[ $(uname -s) == "OS/390" ]]; then
+OSNAME=$(uname -s)
+if [[ "$OSNAME" == "OS/390" ]]; then
     if [ -z $JOBNAME ]; then
         JOBNAME="ZKEESTRT"
     fi
     PIDS=$(ps -A -o pid,jobname,comm | grep -i $JOBNAME | grep java | grep -v grep | awk
'{print $1}')
+elif [[ "$OSNAME" == "OS400" ]]; then
+    PIDS=$(ps -af | grep java | grep -i QuorumPeerMain | grep -v grep | awk '{print $2}')
 else
     PIDS=$(ps ax | grep java | grep -i QuorumPeerMain | grep -v grep | awk '{print $1}')
 fi


Mime
View raw message