Non-Ambari Cluster Installation Guide
Also available as:
PDF
loading table of contents...

Format and Start HDFS

  1. Modify the JAVA_HOME value in the hadoop-env.sh file:

    export JAVA_HOME=/usr/java/default
  2. Execute the following commands on the NameNode host machine:

    su - $HDFS_USER
    /usr/hdp/current/hadoop-hdfs-namenode/bin/hdfs namenode -format
    /usr/hdp/current/hadoop-client/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start namenode
  3. Execute the following commands on the SecondaryNameNode:

    su - $HDFS_USER
    /usr/hdp/current/hadoop-client/sbin
/hadoop-daemon.sh --config $HADOOP_CONF_DIR start secondarynamenode
  4. Execute the following commands on all DataNodes:

    su - $HDFS_USER
    /usr/hdp/current/hadoop-hdfs-datanode/../hadoop/sbin/hadoop-daemon.sh --config $HADOOP_CONF_DIR start datanode

    Where $HADOOP_CONF_DIR is the directory for storing the Hadoop configuration files. For example, /etc/hadoop/conf.

    Where $HDFS_USER is the HDFS user, for example, hdfs.