Step 10: Formatting HDFS

If you want to start your HDFS NameNode, Hadoop needs to initialize the directory where it will store or persist its data for tracking all the metadata for your file system. The formatting will destroy everything and sets up a new file system. Then it uses the values of the parameters set on dfs.namenode.name.dir in etc/hadoop/hdfs-site.xml. For doing the format, at first, move to the bin directory and execute the following commands:

$  su - hdfs
$ cd /opt/yarn/hadoop-2.7.3/bin
$ ./hdfs namenode -format

If the preceding command executed successfully, you should see the following on your Ubuntu terminal:

INFO common.Storage: Storage directory /var/data/hadoop/hdfs/nn has been successfully formatted
..................Content has been hidden....................

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