org.apache.hadoop.dfs
Class DFSck
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.dfs.DFSck
- All Implemented Interfaces:
- Configurable, Tool
public class DFSck
- extends Configured
- implements 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:
- detect files with under-replicated or over-replicated blocks
Additionally, the tool collects a detailed overall DFS statistics, and
optionally can print detailed statistics on block locations and replication
factors of each file.
Method Summary |
static void |
main(String[] args)
|
int |
run(String[] args)
Execute the command with the given arguments. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DFSck
public DFSck(Configuration conf)
throws Exception
- Filesystem checker.
- Parameters:
conf
- current Configuration
- Throws:
Exception
run
public int run(String[] args)
throws Exception
- Description copied from interface:
Tool
- Execute the command with the given arguments.
- Specified by:
run
in interface Tool
- Parameters:
args
-
- Returns:
- exit code.
- Throws:
Exception
main
public static void main(String[] args)
throws Exception
- Throws:
Exception
Copyright © 2006 The Apache Software Foundation