Browse Source

KAFKA-10272: Add IBM i support to "stop" scripts (#9023)

Reviewers: Mickael Maison <mickael.maison@gmail.com>
pull/9248/head
Jesse Gorzinski 4 years ago committed by GitHub
parent
commit
55c1ab62c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      bin/kafka-server-stop.sh
  2. 5
      bin/zookeeper-server-stop.sh

5
bin/kafka-server-stop.sh

@ -15,11 +15,14 @@ @@ -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

5
bin/zookeeper-server-stop.sh

@ -15,11 +15,14 @@ @@ -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

Loading…
Cancel
Save