Let's get started with Hadoop using the following steps:
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.
<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>
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
ps –ef|grep Java
Use the following command found in <Java home>/bin/jps
:
Jps
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.
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.
3.142.250.203