1. Starting HDP Services

Start the Hadoop services in the following order:

  • Knox

  • ZooKeeper

  • HDFS

  • YARN

  • HBase

  • Hive Metastore

  • HiveServer2

  • WebHCat

  • Oozie

Instructions

  1. Start Knox. When starting the gateway with the script below, the process runs in the background. The log output is written to /var/log/knox and a PID (process ID) is written to /var/run/knox. Execute this command on the Knox host machine.

    cd $GATEWAY_HOME su -l knox -c "bin/gateway.sh start"

    where $GATEWAY_HOME is the is the directory where Knox is installed. For example, /usr/lib/knox.

    [Note]Note

    If Knox has been stopped without using gateway.sh stop, you must start the service using gateway.sh clean. The clean option removes all log files in /var/log/knox.

  2. Start ZooKeeper. Execute this command on the ZooKeeper host machine(s):

    su - zookeeper -c "export  ZOOCFGDIR=/etc/zookeeper/conf ; export ZOOCFG=zoo.cfg ; source /etc/zookeeper/conf/zookeeper-env.sh ; /usr/lib/zookeeper/bin/zkServer.sh start"
  3. Start HDFS

    1. If you are running NameNode HA (High Availability), start the JournalNodes by executing these commands on the JournalNode host machines:

      su $HDFS_USER
      /usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start journalnode

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

    2. Execute this command on the NameNode host machine(s):

      su -l hdfs -c "/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start namenode" 
    3. If you are running NameNode HA, start the Zookeeper Failover Controller (ZKFC) by executing the following command on all NameNode machines. The starting sequence of the ZKFCs determines which NameNode will become Active.

      su -l hdfs -c "/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start zkfc"
    4. If you are not running NameNode HA, execute the following command on the Secondary NameNode host machine. If you are running NameNode HA, the Standby NameNode takes on the role of the Secondary NameNode.

      su -l hdfs -c "/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start secondarynamenode” 
    5. Execute these commands on all DataNodes:

      su -l hdfs -c "/usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start datanode"

  4. Start YARN

    1. Execute this command on the ResourceManager host machine(s):

      su -l yarn -c "export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config /etc/hadoop/conf start resourcemanager"
    2. Execute this command on the History Server host machine:

      su -l mapred -c "export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop-mapreduce/sbin/mr-jobhistory-daemon.sh --config /etc/hadoop/conf start historyserver"
    3. Execute this command on all NodeManagers:

      su -l yarn -c "export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec && /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config /etc/hadoop/conf start nodemanager"
  5. Start HBase

    1. Execute this command on the HBase Master host machine:

      su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf start master; sleep 25"
    2. Execute this command on all RegionServers:

      su -l hbase -c "/usr/lib/hbase/bin/hbase-daemon.sh --config /etc/hbase/conf start regionserver" 
  6. Start the Hive Metastore. On the Hive Metastore host machine, execute the following command:

    su $HIVE_USER
    nohup hive --service metastore>/var/log/hive/hive.out 2>/var/log/hive/hive.log &

    where, $HIVE_USER is the Hive user. For example, hive.

  7. Start HiveServer2. On the Hive Server2 host machine, execute the following command:

    su $HIVE_USER
    nohup /usr/lib/hive/bin/hiveserver2 -hiveconf hive.metastore.uris=" " >>/tmp/hiveserver2HD.out 2>> /tmp/hiveserver2HD.log &

    where, $HIVE_USER is the Hive user. For example, hive.

  8. Start WebHCat. On the WebHCat host machine, execute the following command:

    su -l hcat -c "/usr/lib/hcatalog/sbin/webhcat_server.sh start"

  9. Start Oozie. Execute these commands on the Oozie host machine.

    su $OOZIE_USER
    /usr/lib/oozie/bin/oozie-start.sh

    where $OOZIE_USER is the Oozie user. For example, oozie.


loading table of contents...