1. Starting HDP Services

Start all the Hadoop services in the following order:

  • HDFS

  • YARN

  • ZooKeeper

  • HBase

  • Hive Metastore

  • HiveServer2

  • Tez

  • WebHCat

Instructions

  1. Start HDFS

    1. Execute these commands on the NameNode host machine:

      su -l hdfs -c "/usr/lib/hadoop/bin/hadoop-daemon.sh --config /etc/hadoop/conf start namenode" 
    2. Execute these commands on the Secondary NameNode host machine:

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

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

  2. Start YARN

    1. Execute these commands on the ResourceManager host machine:

      su -l yarn 
      /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR start resourcemanager
    2. Execute these commands on the JobTracker History Server host machine:

      su -l mapred -c "/usr/lib/hadoop-mapreduce/sbin/mr-jobhistory-daemon.sh start historyserver --config $HADOOP_CONF_DIR"
    3. Execute these commands on all NodeManagers:

      su -l yarn -c "/usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config $HADOOP_CONF_DIR start nodemanager"
  3. Start ZooKeeper. Execute these commands on the ZooKeeper host machine 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"
  4. Start HBase

    1. Execute these commands 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 these commands on all RegionServers:

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

     su -l hive -c "env HADOOP_HOME=/usr nohup hive --service metastore > $HIVE_LOG_DIR /hive.out 2> $HIVE_LOG_DIR /hive.log   &"  

    where, $HIVE_LOG_DIR is the directory where Hive server logs are stored. For example, /var/logs/hive.

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

    sudo su hive -c "nohup /usr/lib/hive/bin/hiveserver2 -hiveconf hive.metastore.uris=\" \" > $HIVE_LOG_DIR /hiveServer2.out 2>$HIVE_LOG_DIR/hiveServer2.log &" 

    where $HIVE_LOG_DIR is the directory where Hive server logs are stored. For example, /var/logs/hive.

  7. Start Tez AM and/or Tez Service.

    Execute the following command on the Tez host machine:

    $TEZ_HOME/sbin/tez-daemon.sh start ampoolservice

    where, $TEZ_HOME is the location of the directory that contains all the Tez JAR files. By default, $TEZ_HOME is set to /usr/lib/tez.

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

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