You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by du...@apache.org on 2022/03/22 01:39:44 UTC

[rocketmq] branch develop updated: add shutdown script for batchproducer.sh (#4015)

This is an automated email from the ASF dual-hosted git repository.

duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new e283dcc  add shutdown script for batchproducer.sh (#4015)
e283dcc is described below

commit e283dccd060bd4163b649a27ebca8fed893bb19a
Author: humkum <50...@users.noreply.github.com>
AuthorDate: Tue Mar 22 09:39:36 2022 +0800

    add shutdown script for batchproducer.sh (#4015)
    
    Co-authored-by: hankunming <ha...@xiaomi.com>
---
 distribution/benchmark/shutdown.sh | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/distribution/benchmark/shutdown.sh b/distribution/benchmark/shutdown.sh
index 9ecd326..2af7ef7 100644
--- a/distribution/benchmark/shutdown.sh
+++ b/distribution/benchmark/shutdown.sh
@@ -24,7 +24,7 @@ case $1 in
             exit -1;
     fi
 
-    echo "The benchmkar producer(${pid}) is running..."
+    echo "The benchmark producer(${pid}) is running..."
 
     kill ${pid}
 
@@ -52,12 +52,26 @@ case $1 in
             exit -1;
     fi
 
-    echo "The benchmkar transaction producer(${pid}) is running..."
+    echo "The benchmark transaction producer(${pid}) is running..."
 
     kill ${pid}
 
     echo "Send shutdown request to benchmark transaction producer(${pid}) OK"
     ;;
+    bproducer)
+
+    pid=`ps ax | grep -i 'org.apache.rocketmq.example.benchmark.BatchProducer' |grep java | grep -v grep | awk '{print $1}'`
+    if [ -z "$pid" ] ; then
+            echo "No benchmark batch producer running."
+            exit -1;
+    fi
+
+    echo "The benchmark batch producer(${pid}) is running..."
+
+    kill ${pid}
+
+    echo "Send shutdown request to benchmark batch producer(${pid}) OK"
+    ;;
     *)
-    echo "Useage: shutdown producer | consumer | tproducer"
+    echo "Usage: shutdown producer | consumer | tproducer | bproducer"
 esac