org.apache.hadoop.chukwa.datacollection.adaptor
Class ExecAdaptor
java.lang.Object
org.apache.hadoop.chukwa.datacollection.adaptor.AbstractAdaptor
org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor
- All Implemented Interfaces:
- Adaptor
public class ExecAdaptor
- extends AbstractAdaptor
Runs a command inside chukwa. Takes as params the interval in seconds at
which to run the command, and the path and args to execute.
Interval is optional, and defaults to 5 seconds.
Example usage: add
org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor Ps 2 /bin/ps aux
0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FULL_PATHS
public static final boolean FULL_PATHS
- See Also:
- Constant Field Values
ExecAdaptor
public ExecAdaptor()
getCurrentStatus
public String getCurrentStatus()
- Description copied from interface:
Adaptor
- Return the adaptor's state Should not include class name or byte
offset, which are written by caller. The datatype should, however,
be written by this method.
- Returns:
- the adaptor state as a string
shutdown
public long shutdown(AdaptorShutdownPolicy shutdownPolicy)
throws AdaptorException
- Description copied from interface:
Adaptor
- Signals this adaptor to come to an orderly stop. The adaptor ought to push
out all the data it can before exiting depending of the shutdown policy
- Returns:
- the logical offset at which the adaptor was when the method return
- Throws:
AdaptorException
start
public void start(long offset)
throws AdaptorException
- Specified by:
start
in class AbstractAdaptor
- Throws:
AdaptorException
parseArgs
public String parseArgs(String status)
- Specified by:
parseArgs
in class AbstractAdaptor
Copyright © ${year} The Apache Software Foundation