Follow these steps as shown to start HDFS (NameNode and DataNode):
- Format the filesystem:
$ ./bin/hdfs namenode -format
- Start the NameNode daemon and the DataNode daemon:
$ ./sbin/start-dfs.sh
The Hadoop daemon log output is written to the $HADOOP_LOG_DIR directory (defaults to $HADOOP_HOME/logs).
- Browse the web interface for the NameNode; by default it is available at http://localhost:9870/.
- Make the HDFS directories required to execute MapReduce jobs:
$ ./bin/hdfs dfs -mkdir /user $ ./bin/hdfs dfs -mkdir /user/<username>
- When you're done, stop the daemons with the following:
$ ./sbin/stop-dfs.sh
- Open a browser to check your local Hadoop, which can be launched in the browser as http://localhost:9870/. The following ...