停止ambari上服务的顺序

Before performing any upgrades or uninstalling software, stop all of the Hadoop services in the following order:

  • Ranger

  • Knox

  • Oozie

  • WebHCat

  • HiveServer2

  • Hive Metastore

  • HBase

  • YARN

  • HDFS

  • Zookeeper

  • Storm

  • Kafka

Instructions

  1. Stop Ranger. Execute the following commands on the Ranger host machine:

    sudo service ranger-admin stop
    sudo service ranger-usersync stop
  2. Stop Knox. Execute the following command on the Knox host machine.

    su -l knox -c "/usr/hdp/current/knox-server/bin/gateway.sh stop"
  3. Stop Oozie. Execute the following command on the Oozie host machine.

    su -l oozie -c "/usr/hdp/current/oozie-server/bin/oozied.sh stop"
  4. Stop WebHCat. On the WebHCat host machine, execute the following command:

    su -l hcat -c "/usr/hdp/current/hive-webhcat/sbin/webhcat_server.sh stop"
  5. Stop Hive. Execute this command on the Hive Metastore and Hive Server2 host machine.

    ps aux | awk '{print $1,$2}' | grep hive | awk '{print $2}' | xargs kill >/dev/null 2>&1
  6. Stop HBase

    • Execute this command on all RegionServers:

      su -l hbase -c "/usr/hdp/current/hbase-regionserver/bin/hbase-daemon.sh stop regionserver"
    • Execute this command on the HBase Master host machine:

      su -l hbase -c "/usr/hdp/current/hbase-master/bin/hbase-daemon.sh stop master"
  7. Stop YARN

    • Execute this command on all NodeManagers:

      su -l yarn -c "/usr/hdp/current/hadoop-yarn-nodemanager/sbin/yarn-daemon.sh stop nodemanager"
    • Execute this command on the History Server host machine:

      su -l yarn -c "/usr/hdp/current/hadoop-mapreduce-historyserver/sbin/mr-jobhistory-daemon.sh stop historyserver"
    • Execute this command on the ResourceManager host machine(s):

      su -l yarn -c "/usr/hdp/current/hadoop-yarn-resourcemanager/sbin/yarn-daemon.sh stop resourcemanager"
  8. Stop HDFS

    • Execute this command on all DataNodes:

      su -l hdfs -c "/usr/hdp/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh stop datanode"
    • If you are not running NameNode HA (High Availability), stop the Secondary NameNode by executing this command on the Secondary NameNode host machine:

      su -l hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop secondarynamenode"
    • Execute this command on the NameNode host machine(s):

      su -l hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop namenode"
    • If you are running NameNode HA, stop the Zookeeper Failover Controllers (ZKFC) by executing this command on the NameNode host machines:

      su -l hdfs -c "/usr/hdp/current/hadoop-hdfs-namenode/../hadoop/sbin/hadoop-daemon.sh stop zkfc"
    • If you are running NameNode HA, stop the JournalNodes by executing these commands on the JournalNode host machines:

      su $HDFS_USER 
      /usr/hdp/current/hadoop-hdfs-journalnode/../hadoop/sbin/hadoop-daemon.sh stop journalnode

      where $HDFS_USER is the HDFS user. For example, hdfs.

  9. Stop ZooKeeper. Execute this command on the ZooKeeper host machine(s):

    su - zookeeper -c "export ZOOCFGDIR=/usr/hdp/current/zookeeper-server/conf ; export ZOOCFG=zoo.cfg; source /usr/hdp/current/zookeeper-server/conf/zookeeper-env.sh ; /usr/hdp/current/zookeeper-server/bin/zkServer.sh stop"
  10. Start Storm services using a process controller, such as supervisord. See "Installing and Configuring Apache Storm" in the Manual Install Guide. For example, to stop the storm-nimbus service:

    sudo /usr/bin/supervisorctl
    storm-drpc RUNNING pid 9801, uptime 0:03:20
    storm-nimbus RUNNING pid 9802, uptime 0:03:20
    storm-ui RUNNING pid 9800, uptime 0:03:20
    supervisor> stop storm-nimbus
    storm-nimbus: stopped

    where $STORM_USER is the operating system user that installed Storm. For example, storm.

  11. Stop Kafka. Execute this command on the Kafka host machine(s):

    su $KAFKA_USER
    /usr/hdp/current/kafka-broker/bin/kafka stop

    where$KAFKA_USER is the operating system user that installed Kafka. For example,kafka.

转载于:https://www.cnblogs.com/dailidong/p/7571171.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值