Package org.apache.hadoop.hdfs.tools
Class DFSck
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hdfs.tools.DFSck
- All Implemented Interfaces:
org.apache.hadoop.conf.Configurable,org.apache.hadoop.util.Tool
@Private
public class DFSck
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
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. 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
(
NamenodeFsck.doMove). Remaining data blocks are saved as a block chains, representing longest consecutive series of valid blocks. - delete corrupted files
(
NamenodeFsck.doDelete)
- move corrupted files to /lost+found directory on DFS
(
- detect files with under-replicated or over-replicated blocks
-
Constructor Summary
ConstructorsConstructorDescriptionDFSck(org.apache.hadoop.conf.Configuration conf) Filesystem checker.DFSck(org.apache.hadoop.conf.Configuration conf, PrintStream out) -
Method Summary
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
-
Constructor Details
-
DFSck
Filesystem checker.- Parameters:
conf- current Configuration- Throws:
IOException
-
DFSck
- Throws:
IOException
-
-
Method Details
-
run
- Specified by:
runin interfaceorg.apache.hadoop.util.Tool- Throws:
IOException
-
main
- Throws:
Exception
-