org.apache.hadoop.util
Class ToolBase

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

Deprecated. This class is depracated. Classes extending ToolBase should rather implement Tool interface, and use ToolRunner for execution functionality. Alternatively, GenericOptionsParser can be used to parse generic arguments related to hadoop framework.

@Deprecated
public abstract class ToolBase
extends Object
implements Tool


Field Summary
 Configuration conf
          Deprecated.  
 
Constructor Summary
ToolBase()
          Deprecated.  
 
Method Summary
 int doMain(Configuration conf, String[] args)
          Deprecated. Work as a main program: execute a command and handle exception if any
 Configuration getConf()
          Deprecated. Return the configuration used by this object.
 void setConf(Configuration conf)
          Deprecated. Set the configuration to be used by this object.
 
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.util.Tool
run
 

Field Detail

conf

public Configuration conf
Deprecated. 
Constructor Detail

ToolBase

public ToolBase()
Deprecated. 
Method Detail

setConf

public void setConf(Configuration conf)
Deprecated. 
Description copied from interface: Configurable
Set the configuration to be used by this object.

Specified by:
setConf in interface Configurable

getConf

public Configuration getConf()
Deprecated. 
Description copied from interface: Configurable
Return the configuration used by this object.

Specified by:
getConf in interface Configurable

doMain

public final int doMain(Configuration conf,
                        String[] args)
                 throws Exception
Deprecated. 
Work as a main program: execute a command and handle exception if any

Parameters:
conf - Application default configuration
args - User-specified arguments
Returns:
exit code to be passed to a caller. General contract is that code equal zero signifies a normal return, negative values signify errors, and positive non-zero values can be used to return application-specific codes.
Throws:
Exception


Copyright © 2006 The Apache Software Foundation