Get the App
SLTechnology News&Howtos  ›  Servers  › 

Example Analysis of HDFS formatting

Shulou Source: shulou.com Published: 2022-05-31 21:10:29 10月05日 Update

This article mainly introduces the example analysis of HDFS format, which has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, let the editor take you to understand it.

Anyway, let's take a look at the formatting of HDFS in the new version 2.5.1.

The compiled directory is: ~ / hadoop-2.5.1-src/hadoop-dist/target/hadoop-2.5.1

Did you see a lot of familiar documents when you went in?

For convenience, we set up a soft link as follows:

Ln-s ~ / hadoop-2.5.1-src/hadoop-dist/target/hadoop-2.5.1 hadoop-2.5.1-run

-

Root@idc100:~# cd hadoop-2.5.1-run

Root@idc100:~/hadoop-2.5.1-run# ls

Bin hadoop-2.5.1-run lib LICENSE.txt README.txt share

Etc include libexec NOTICE.txt sbin

Root@idc100:~/hadoop-2.5.1-run#

-

There is no problem with executing. / bin/hdfs namenode-format.

Then we start with the. / bin/hdfs script to look at the formatting process bit by bit.

-

After a long study of shell scripts (not for long, one night, actually)

I won't go into the details of the specific analysis. It's all tears.

Add echo to the shell script to check the value of each variable and the value of export

Anyway, in the end, it is the implementation of this sentence:

--

Through echo, we can see that the end result is execution:

/ usr/lib/jvm/jdk1.7.0_21/bin/java-Dproc_namenode-Xmx1000m-Djava.net.preferIPv4Stack=true-Dhadoop.log.dir=/root/hadoop-2.5.1-src/hadoop-dist/target/hadoop-2.5.1/logs-Dhadoop.log.file=hadoop.log-Dhadoop.home.dir=/root/hadoop-2.5.1-src/hadoop-dist/target/hadoop-2.5.1-Dhadoop.id.str=root-Dhadoop.root.logger=INFO Console-Djava.library.path=/root/hadoop-2.5.1-src/hadoop-dist/target/hadoop-2.5.1/lib/native-Dhadoop.policy.file=hadoop-policy.xml-Djava.net.preferIPv4Stack=true-Dhadoop.security.logger=INFO,RFAS-Dhdfs.audit.logger=INFO,NullAppender-Dhadoop.security.logger=INFO,NullAppender org.apache.hadoop.hdfs.server.namenode.NameNode-format

Thank you for reading this article carefully. I hope the article "sample Analysis of HDFS format" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

Tags: Formats articles analysis scripts examples that is research long value interests variables at the same time files more friends directories knowledge details results editing Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi macOS Huawei Shulou Technology OPPO Reno