org.apache.hadoop.hdfs.tools
Class DFSck

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.hdfs.tools.DFSck
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

@InterfaceAudience.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:

Additionally, the tool collects a detailed overall DFS statistics, and optionally can print detailed statistics on block locations and replication factors of each file. The tool also provides and option to filter open files during the scan.


Constructor Summary
DFSck(org.apache.hadoop.conf.Configuration conf)
          Filesystem checker.
 
Method Summary
static void main(String[] args)
           
 int run(String[] args)
           
 
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.hadoop.conf.Configurable
getConf, setConf
 

Constructor Detail

DFSck

public DFSck(org.apache.hadoop.conf.Configuration conf)
      throws IOException
Filesystem checker.

Parameters:
conf - current Configuration
Throws:
IOException
Method Detail

run

public int run(String[] args)
        throws IOException
Specified by:
run in interface org.apache.hadoop.util.Tool
Parameters:
args -
Throws:
IOException

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception


Copyright © 2009 The Apache Software Foundation