Hadoop cluster boot sequence and partial command grooming

Source: Internet
Author: User
Tags safe mode
hadoop cluster boot sequenceZookeepeer->hadoop->hbase

Hadoop cluster shutdown sequenceHbase->hadoop->zookeepeer
Hadoop Primary and Standby node Status View and manual switchover$HADOOP _home/bin/hdfs haadmin-getservicestate nn1
Note: The nn1 here is the name of the Namenode service configured in Hdfs-site.xml.

$HADOOP _home/bin/hdfs haadmin-failover--forcefence--forceactive nn2 nn1
Note: The order of "Nn2 nn1" here indicates that the active state is converted from NN2 to NN1 (although NN2 can also be standby before conversion).

Safe ModeDfsadmin-safemode value to operate the Safe mode, the parameter value is described as follows:
Enter-Enter Safe mode
Leave-Force Namenode to leave Safe mode
Get-Returns information about whether Safe mode is turned on
Wait-waits until the end of safe mode.
Block Loss RepairFiles damaged by using Hadoop fsck/list corrupted files cannot be recovered, only corrupted files can be deleted Hadoop fsck-delete
Slow when Namenode file information is large and affects Hadoop performance usage:hadoop fsck <path> [-list-corruptfileblocks | [-move |-delete |-openforwrite] [-files [-blocks [-locations |-racks]]
<path> Check the starting directory
-move to move corrupted files to/lost+found
-delete Deleting corrupted files
-files Print out all the checked files
-openforwrite print out files that are being written
-list-corruptfileblocks print out list of missing blocks and files they belong to
-blocks Print out the Block report
-locations print out the location of each block
-racks Print out the Data-node network topology
By default, fsck ignores files that are being written, and uses-openforwrite to report such files


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.