Q & A-What is hadoop doing in security mode?

Source: Internet
Author: User
Tags exit in safety mode hadoop fs

I wanted to collect and organize my own data from the Internet, but I found that Wu Chao wrote a lot of data, so I directly reprinted it (the image is invalid and I used my own image)

Http://www.superwu.cn/2013/08/23/548/

When running a hadoop cluster, the cluster runs in safety mode. Automatically exits after running for a period of time in safe mode.

So what does the system do in security mode?

When the cluster is started, it enters the security mode first. The system checks the integrity of data blocks in safe mode. Suppose we set the number of replicas (that is, the parameter DFS. replication) is 5, so there should be five copies on datanode. If there are only three copies, the ratio is 3/5 = 0.6. Defines a minimum replica rate in the profile hdfs-default.xml

Our copy rate is 0.6, which is significantly less than 0.999, so the system will automatically copy the copy to other datanode, strive for a minimum copy rate> = 0.999. If the system has eight replicas and more than five replicas, the system also deletes more than three replicas.

What is the impact of security mode on us?

At this time, the client is not allowed to modify any files, including uploading, deleting, renaming, and creating folders. For example, when creating a file, the security mode is determined in the source code.

When we modify a file in safe mode, an error is reported.

Under normal circumstances, the security mode automatically exits after a period of time. You only need to wait a moment. How long will it take? We can view the remaining time of exit in security mode through port 50070.

Although you cannot modify a file, you can browse the directory structure and view the file content.

Can we control whether to enter or exit the security mode?

You can control the entry, exit, and view of security mode in the command line,

Run hadoop FS-safemode get to view the Security Mode status.

Run hadoop FS-safemode enter to enter safe mode.

Run hadoop FS-safemode leave to Exit security mode.

 

 

Security mode is a protection mechanism for hadoop clusters. When starting, it is best to wait for the cluster to exit automatically and then perform file operations.

 

Q & A-What is hadoop doing in security mode?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.