empiredan commented on code in PR #1370: URL: https://github.com/apache/incubator-pegasus/pull/1370#discussion_r1132251837
########## scripts/migrate_node.sh: ########## @@ -20,37 +20,49 @@ set -e PID=$$ -if [ $# -ne 4 ] +if [ $# -ne 4 -a $# -ne 5 ] then echo "This tool is for migrating primary replicas out of specified node." - echo "USAGE: $0 <cluster-meta-list> <migrate-node> <app-name> <run|test>" - echo " app-name = * means migrate all apps" + echo "USAGE1: $0 <cluster-meta-list> <migrate-node> <app-name> <run|test>" + echo "USAGE2: $0 <shell-config-path> <migrate-node> <app-name> <run|test> -f" + echo "app-name = * means migrate all apps" exit 1 fi pwd="$( cd "$( dirname "$0" )" && pwd )" shell_dir="$( cd $pwd/.. && pwd )" cd $shell_dir -cluster=$1 +CONFIG_SPECIFIED=0 +if [ $# -eq 4 ]; then + cluster=$1 +else + CONFIG_SPECIFIED=1 Review Comment: If it is necessary to check whether option is `-f` ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
