org.apache.hadoop.dfs
Class DFSck

java.lang.Object
  extended byorg.apache.hadoop.dfs.DFSck

public class DFSck
extends Object

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.

Author:
Andrzej Bialecki

Nested Class Summary
static class DFSck.Result
          Result of checking, plus overall DFS statistics.
 
Field Summary
static int FIXING_DELETE
          Delete corrupted files.
static int FIXING_MOVE
          Move corrupted files to /lost+found .
static int FIXING_NONE
          Don't attempt any fixing .
 
Constructor Summary
DFSck(Configuration conf, int fixing, boolean showFiles, boolean showBlocks, boolean showLocations)
          Filesystem checker.
 
Method Summary
 DFSck.Result fsck(String path)
          Check files on DFS, starting from the indicated path.
static void main(String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FIXING_NONE

public static final int FIXING_NONE
Don't attempt any fixing .

See Also:
Constant Field Values

FIXING_MOVE

public static final int FIXING_MOVE
Move corrupted files to /lost+found .

See Also:
Constant Field Values

FIXING_DELETE

public static final int FIXING_DELETE
Delete corrupted files.

See Also:
Constant Field Values
Constructor Detail

DFSck

public DFSck(Configuration conf,
             int fixing,
             boolean showFiles,
             boolean showBlocks,
             boolean showLocations)
      throws Exception
Filesystem checker.

Parameters:
conf - current Configuration
fixing - one of pre-defined values
showFiles - show each file being checked
showBlocks - for each file checked show its block information
showLocations - for each block in each file show block locations
Throws:
Exception
Method Detail

fsck

public DFSck.Result fsck(String path)
                  throws Exception
Check files on DFS, starting from the indicated path.

Parameters:
path - starting point
Returns:
result of checking
Throws:
Exception

main

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


Copyright © 2006 The Apache Software Foundation