Skip to content

[fix][cli] Fix the pulsar-daemon parameter passthrough syntax #22905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions bin/pulsar-daemon
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ start ()
echo starting $command, logging to $logfile
echo Note: Set immediateFlush to true in conf/log4j2.yaml will guarantee the logging event is flushing to disk immediately. The default behavior is switched off due to performance considerations.
pulsar=$PULSAR_HOME/bin/pulsar
nohup $pulsar $command "$1" > "$out" 2>&1 < /dev/null &
nohup $pulsar $command "$@" > "$out" 2>&1 < /dev/null &
echo $! > $pid
sleep 1; head $out
sleep 2;
Expand Down Expand Up @@ -216,29 +216,28 @@ stop ()

case $startStop in
(start)
start "$*"
start "$@"
;;

(stop)
stop $1
;;

(restart)
forceStopFlag=$(echo "$*"|grep "\-force")
if [[ "$forceStopFlag" != "" ]]
if [[ "$1" == "-force" ]]
then
stop "-force"
stop -force
# remove "-force" from the arguments
shift
else
stop
fi
if [ "$?" == 0 ]
then
sleep 3
paramaters="$*"
startParamaters=${paramaters//-force/}
start "$startParamaters"
sleep 3
start "$@"
else
echo "WARNNING : $command failed restart, for $command is not stopped completely."
echo "WARNNING : $command failed restart, for $command is not stopped completely."
fi
;;

Expand Down
Loading