org.apache.hadoop.fs
Class FsShell

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.hadoop.fs.FsShell
All Implemented Interfaces:
Configurable, Tool

public class FsShell
extends Configured
implements Tool

Provide command line access to a FileSystem.


Field Summary
static SimpleDateFormat dateForm
           
protected  FileSystem fs
           
protected static SimpleDateFormat modifFmt
           
 
Constructor Summary
FsShell()
           
FsShell(Configuration conf)
           
 
Method Summary
static String byteDesc(long len)
          Deprecated. Consider using StringUtils.byteDesc(long) instead.
 void close()
           
 Path getCurrentTrashDir()
          Returns the Trash object associated with this shell.
protected  void init()
           
static String limitDecimalTo2(double d)
          Deprecated. Consider using StringUtils.limitDecimalTo2(double) instead.
static void main(String[] argv)
          main() has some simple utility methods
 int run(String[] argv)
          run
 
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
 

Field Detail

fs

protected FileSystem fs

dateForm

public static final SimpleDateFormat dateForm

modifFmt

protected static final SimpleDateFormat modifFmt
Constructor Detail

FsShell

public FsShell()

FsShell

public FsShell(Configuration conf)
Method Detail

init

protected void init()
             throws IOException
Throws:
IOException

getCurrentTrashDir

public Path getCurrentTrashDir()
Returns the Trash object associated with this shell.


byteDesc

@Deprecated
public static String byteDesc(long len)
Deprecated. Consider using StringUtils.byteDesc(long) instead.

Return an abbreviated English-language desc of the byte length


limitDecimalTo2

@Deprecated
public static String limitDecimalTo2(double d)
Deprecated. Consider using StringUtils.limitDecimalTo2(double) instead.


run

public int run(String[] argv)
        throws Exception
run

Specified by:
run in interface Tool
Parameters:
argv - command specific arguments.
Returns:
exit code.
Throws:
Exception

close

public void close()
           throws IOException
Throws:
IOException

main

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

Throws:
Exception


Copyright © 2009 The Apache Software Foundation