|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.chukwa.inputtools.plugin.ExecPlugin
org.apache.hadoop.chukwa.datacollection.adaptor.ExecAdaptor
public class ExecAdaptor
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
| Field Summary | |
|---|---|
protected long |
adaptorID
|
| Fields inherited from class org.apache.hadoop.chukwa.inputtools.plugin.ExecPlugin |
|---|
statusKO, statusOK |
| Constructor Summary | |
|---|---|
ExecAdaptor()
|
|
| Method Summary | |
|---|---|
String |
getCmde()
|
String |
getCurrentStatus()
Return the adaptor's state Should not include class name, datatype or byte offset, which are written by caller. |
String |
getStreamName()
Return the stream name |
String |
getType()
|
void |
hardStop()
Signals this adaptor to come to an abrupt stop, as quickly as it can. |
long |
shutdown()
Signals this adaptor to come to an orderly stop. |
void |
start(long adaptorID,
String type,
String status,
long offset,
ChunkReceiver dest)
Start this adaptor |
| Methods inherited from class org.apache.hadoop.chukwa.inputtools.plugin.ExecPlugin |
|---|
execute, postProcess, stop, waitFor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long adaptorID
| Constructor Detail |
|---|
public ExecAdaptor()
| Method Detail |
|---|
public String getCurrentStatus()
throws AdaptorException
Adaptor
getCurrentStatus in interface AdaptorAdaptorExceptionpublic String getStreamName()
Adaptor
getStreamName in interface Adaptor
public void hardStop()
throws AdaptorException
Adaptor
hardStop in interface AdaptorAdaptorException
public long shutdown()
throws AdaptorException
Adaptor
shutdown in interface AdaptorAdaptorException
public void start(long adaptorID,
String type,
String status,
long offset,
ChunkReceiver dest)
throws AdaptorException
Adaptor
start in interface Adaptortype - the application type, who is starting this adaptorstatus - the status string to use for configuration.offset - the stream offset of the first byte sent by this adaptor
AdaptorExceptionpublic String getCmde()
getCmde in class ExecPluginpublic String getType()
getType in interface Adaptor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||