org.apache.hadoop.chukwa.inputtools.plugin
Class ExecPlugin

java.lang.Object
  extended by org.apache.hadoop.chukwa.inputtools.plugin.ExecPlugin
All Implemented Interfaces:
IPlugin
Direct Known Subclasses:
ExecAdaptor, ExecHelper, NodeActivityPlugin, PbsNodePlugin

public abstract class ExecPlugin
extends Object
implements IPlugin

Runs external command-line tools, captures output. Subclasses are responsible for implementing getCmde(), which determines the command to be invoked.


Field Summary
 int statusKO
           
 int statusOK
           
 
Constructor Summary
ExecPlugin()
           
 
Method Summary
 org.json.JSONObject execute()
           
abstract  String getCmde()
           
 org.json.JSONObject postProcess(org.json.JSONObject execResult)
           
 void stop()
           
 int waitFor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

statusOK

public final int statusOK
See Also:
Constant Field Values

statusKO

public final int statusKO
See Also:
Constant Field Values
Constructor Detail

ExecPlugin

public ExecPlugin()
Method Detail

stop

public void stop()

waitFor

public int waitFor()
            throws InterruptedException
Throws:
InterruptedException

getCmde

public abstract String getCmde()

postProcess

public org.json.JSONObject postProcess(org.json.JSONObject execResult)

execute

public org.json.JSONObject execute()
Specified by:
execute in interface IPlugin


Copyright © ${year} The Apache Software Foundation