Class NamenodeFsck
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.NamenodeFsck
- All Implemented Interfaces:
org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory
@Private
public class NamenodeFsck
extends Object
implements org.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory
This class provides rudimentary checking of DFS volumes for errors and
sub-optimal conditions.
The tool scans all files and directories, starting from an indicated root path and its descendants. The following abnormal conditions are detected and handled:
- files with blocks that are completely missing from all datanodes.
In this case the tool can perform one of the following actions:- move corrupted files to /lost+found directory on DFS
(
doMove). Remaining data blocks are saved as a block chains, representing longest consecutive series of valid blocks. - delete corrupted files (
doDelete)
- move corrupted files to /lost+found directory on DFS
(
- detect files with under-replicated or over-replicated blocks
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidCheck block information given a blockId numbervoidfsck()Check files on DFS, starting from the indicated path.org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
CORRUPT_STATUS
- See Also:
-
HEALTHY_STATUS
- See Also:
-
DECOMMISSIONING_STATUS
- See Also:
-
DECOMMISSIONED_STATUS
- See Also:
-
ENTERING_MAINTENANCE_STATUS
- See Also:
-
IN_MAINTENANCE_STATUS
- See Also:
-
STALE_STATUS
- See Also:
-
EXCESS_STATUS
- See Also:
-
NONEXISTENT_STATUS
- See Also:
-
FAILURE_STATUS
- See Also:
-
UNDEFINED
- See Also:
-
-
Method Details
-
getAuditSource
-
blockIdCK
Check block information given a blockId number -
fsck
public void fsck() throws org.apache.hadoop.security.AccessControlExceptionCheck files on DFS, starting from the indicated path.- Throws:
org.apache.hadoop.security.AccessControlException
-
newDataEncryptionKey
public org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey newDataEncryptionKey() throws IOException- Specified by:
newDataEncryptionKeyin interfaceorg.apache.hadoop.hdfs.protocol.datatransfer.sasl.DataEncryptionKeyFactory- Throws:
IOException
-