public class ChukwaAgent extends Object implements AdaptorManager
Modifier and Type | Class and Description |
---|---|
static class |
ChukwaAgent.AlreadyRunningException |
static class |
ChukwaAgent.Offset |
NULL
Constructor and Description |
---|
ChukwaAgent() |
ChukwaAgent(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
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 |
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,
boolean gracefully)
Stop the adaptor with given ID number.
|
public ChukwaAgent() throws ChukwaAgent.AlreadyRunningException
public ChukwaAgent(org.apache.hadoop.conf.Configuration conf) throws ChukwaAgent.AlreadyRunningException
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 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
number
- the adaptor to stopgracefully
- if true, shutdown, if false, hardStoppublic 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)
Copyright © ${year} The Apache Software Foundation