org.apache.hadoop.dfs
Class DFSAdmin

java.lang.Object
  extended by org.apache.hadoop.util.ToolBase
      extended by org.apache.hadoop.dfs.DFSShell
          extended by org.apache.hadoop.dfs.DFSAdmin
All Implemented Interfaces:
Configurable, Tool

public class DFSAdmin
extends DFSShell

This class provides some DFS administrative access.

Author:
Dhruba Borthakur

Field Summary
 
Fields inherited from class org.apache.hadoop.util.ToolBase
conf
 
Constructor Summary
DFSAdmin()
          Construct a DFSAdmin object.
 
Method Summary
static void main(String[] argv)
          main() has some simple utility methods.
 void printUsage(String cmd)
          Displays format of commands.
 void report()
          Gives a report on how the FileSystem is doing.
 int run(String[] argv)
          run
 void setSafeMode(String[] argv, int idx)
          Safe mode maintenance command.
 
Methods inherited from class org.apache.hadoop.dfs.DFSShell
copy, delete, du, init, ls, mkdir, rename, setReplication
 
Methods inherited from class org.apache.hadoop.util.ToolBase
doMain, getConf, setConf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DFSAdmin

public DFSAdmin()
Construct a DFSAdmin object.

Method Detail

report

public void report()
            throws IOException
Gives a report on how the FileSystem is doing.

Throws:
IOException - if the filesystem does not exist.

setSafeMode

public void setSafeMode(String[] argv,
                        int idx)
                 throws IOException
Safe mode maintenance command. Usage: java DFSAdmin -safemode [enter | leave | get]

Parameters:
argv - List of of command line parameters.
idx - The index of the command that is being processed.
Throws:
IOException - if the filesystem does not exist.

printUsage

public void printUsage(String cmd)
Displays format of commands.

Overrides:
printUsage in class DFSShell
Parameters:
cmd - The command that is being executed.

run

public int run(String[] argv)
        throws Exception
Description copied from class: DFSShell
run

Specified by:
run in interface Tool
Overrides:
run in class DFSShell
Parameters:
argv - The parameters passed to this program.
Returns:
0 on success, non zero on error.
Throws:
Exception - if the filesystem does not exist.

main

public static void main(String[] argv)
                 throws Exception
main() has some simple utility methods.

Parameters:
argv - Command line parameters.
Throws:
Exception - if the filesystem does not exist.


Copyright © 2006 The Apache Software Foundation