|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.chukwa.datacollection.agent.ChukwaAgent
public class ChukwaAgent
The local agent daemon that runs on each machine. This class is designed to be embeddable, for use in testing.
Nested Class Summary | |
---|---|
static class |
ChukwaAgent.AlreadyRunningException
|
static class |
ChukwaAgent.Offset
|
Field Summary |
---|
Fields inherited from interface org.apache.hadoop.chukwa.datacollection.agent.AdaptorManager |
---|
NULL |
Constructor Summary | |
---|---|
ChukwaAgent()
|
|
ChukwaAgent(org.apache.hadoop.conf.Configuration conf)
|
Method Summary | |
---|---|
int |
adaptorCount()
|
Adaptor |
getAdaptor(String name)
|
Map<String,String> |
getAdaptorList()
Expose the adaptor list. |
String |
getAdaptorName(Adaptor initiator)
|
static ChukwaAgent |
getAgent()
|
org.apache.hadoop.conf.Configuration |
getConfiguration()
|
int |
getControllerPort()
|
static void |
main(String[] args)
|
ChukwaAgent.Offset |
offset(Adaptor a)
|
String |
processAddCommand(String cmd)
Most of the Chukwa wire protocol is implemented in @link{AgentControlSocketListener} Unlike the rest of the chukwa wire protocol, add commands can appear in initial_adaptors and checkpoint files. |
String |
processAddCommandE(String cmd)
|
String |
reportCommit(Adaptor src,
long uuid)
Called to update the Agent status table. |
void |
shutdown()
|
void |
shutdown(boolean exit)
Triggers agent shutdown. |
long |
stopAdaptor(String name,
AdaptorShutdownPolicy shutdownMode)
Stop the adaptor with given ID number. |
long |
stopAdaptor(String name,
boolean gracefully)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ChukwaAgent() throws ChukwaAgent.AlreadyRunningException
ChukwaAgent.AlreadyRunningException
public ChukwaAgent(org.apache.hadoop.conf.Configuration conf) throws ChukwaAgent.AlreadyRunningException
ChukwaAgent.AlreadyRunningException
Method Detail |
---|
public static ChukwaAgent getAgent()
public int getControllerPort()
public static void main(String[] args) throws AdaptorException
args
-
AdaptorException
public int adaptorCount()
adaptorCount
in interface AdaptorManager
public String processAddCommand(String cmd)
processAddCommand
in interface AdaptorManager
public String processAddCommandE(String cmd) throws AdaptorException
AdaptorException
public String reportCommit(Adaptor src, long uuid)
AdaptorManager
reportCommit
in interface AdaptorManager
src
- the adaptor in questionuuid
- the number to record as checkpoint. Must be monotonically increasing.
public Map<String,String> getAdaptorList()
getAdaptorList
in interface AdaptorManager
public long stopAdaptor(String name, boolean gracefully)
stopAdaptor
in interface AdaptorManager
public long stopAdaptor(String name, AdaptorShutdownPolicy shutdownMode)
stopAdaptor
in interface AdaptorManager
number
- the adaptor to stopgracefully
- if true, shutdown, if false, hardStop
public org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration
in interface AdaptorManager
public Adaptor getAdaptor(String name)
getAdaptor
in interface AdaptorManager
public ChukwaAgent.Offset offset(Adaptor a)
public void shutdown()
public void shutdown(boolean exit)
public String getAdaptorName(Adaptor initiator)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |