BIGTOP-3038: Add rollingupgrade option in hadoop-hdfs-namenode.svc
authorSahil Aggarwal <sahil.agg15@gmail.com>
Tue, 5 Jun 2018 13:56:21 +0000 (19:26 +0530)
committerEvans Ye <evansye@apache.org>
Tue, 5 Jun 2018 16:41:50 +0000 (00:41 +0800)
Signed-off-by: Evans Ye <evansye@apache.org>
bigtop-packages/src/common/hadoop/hadoop-hdfs-namenode.svc
bigtop-packages/src/templates/init.d.tmpl

index f17014e..9422aac 100644 (file)
@@ -29,6 +29,10 @@ cat <<'__EOT__'
       DAEMON_FLAGS="$DAEMON_FLAGS -${1}"
       start
       ;;
+    rollingupgrade)
+      DAEMON_FLAGS="$DAEMON_FLAGS -${1} ${2}"
+      start
+      ;;
     init)
       check_for_root
       checkstatusofproc
@@ -40,7 +44,7 @@ cat <<'__EOT__'
       fi
       ;;
     *)
-      echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|upgrade|rollback|init}"
+      echo $"Usage: $0 {start|stop|status|restart|try-restart|condrestart|upgrade|rollback|rollingupgrade [downgrade|rollback|started]|init}"
       exit 1
 __EOT__
 
index 35326b8..42b7758 100755 (executable)
@@ -246,7 +246,6 @@ checkstatusofproc(){
 checkstatus(){
   checkstatusofproc
   status=$?
-
   case "$status" in
     $STATUS_RUNNING)
       log_success_msg "${DESC} is running"
@@ -309,7 +308,7 @@ cat <<'__EOT__'
   esac
 }
 
-service "$1"
+service "$@"
 
 exit $RETVAL
 __EOT__