Hadoop start up steps

Let's get started with Hadoop using the following steps:

  1. Format NameNode.

    Before starting up the Hadoop daemons, we need to format NameNode. This is like formatting a new disk. We know that just as we bring a new disk drive and format it to a file system (FAT, NTFS, ExtFS), we format NameNode. This process creates a logical layer of HDFS on top of the file system.

    Note

    <hadoop directory path> can be added to the system path to call the hadoop command directly. Follow http://www.cyberciti.biz/faq/unix-linux-adding-path/ for various options.

    The following line will format NameNode and make it available to read and write files from HDFS. This command prepares the HDFS file system:

    <hadoop directory path>/bin/hdfsnamenode –format <cluster name>
    
  2. Once NameNode is formatted successfully without any errors, let's start the Hadoop daemons:
    sbin/hadoop-daemon.sh start namenode
    sbin/hadoop-daemons.sh start datanode
    sbin/yarn-daemon.sh start resourcemanager
    sbin/yarn-daemons.sh start nodemanager
    sbin/yarn-daemon.sh start historyserver
    
  3. Once all the processes start, we can check it using the following command:
    ps –ef|grep Java
    

    Use the following command found in <Java home>/bin/jps:

    Jps
    
  4. For easy access of jps, we can create an alias and just type jps. It will display the Java process running; jps stands for Java process. As all Hadoop daemons are Java processes, jps displays the daemons running:
    alias jps=<Java path>/bin/jps
    

    Now, we can directly access the jps command.

  5. To stop the Hadoop cluster, we can use:
    sbin/hadoop-daemon.sh stop namenode
    sbin/hadoop-daemons.sh stop datanode
    sbin/yarn-daemon.sh stop resourcemanager
    sbin/yarn-daemons.sh stop nodemanager
    sbin/yarn-daemon.sh stop historyserver
    

Now, let's move forward and configure HBase.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.250.203