public class ChukwaAgent extends Object implements AdaptorManager
The agent will start an HTTP REST interface listening on port. Configs for the agent are:
chukwaAgent.http.port
Port to listen on (default=9090).chukwaAgent.http.rest.controller.packages
Java packages to
inspect for JAX-RS annotated classes to be added as servlets to the REST
server.Modifier and Type | Class and Description |
---|---|
static class |
ChukwaAgent.AlreadyRunningException |
static class |
ChukwaAgent.Offset |
Modifier and Type | Field and Description |
---|---|
Connector |
connector |
NULL
Modifier | Constructor and Description |
---|---|
protected |
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) |
OffsetStatsManager |
getAdaptorStatsManager() |
static ChukwaAgent |
getAgent() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
Connector |
getConnector() |
int |
getControllerPort() |
static org.apache.hadoop.conf.Configuration |
getStaticConfiguration() |
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) |
public Connector connector
protected ChukwaAgent() throws ChukwaAgent.AlreadyRunningException
public ChukwaAgent(org.apache.hadoop.conf.Configuration conf) throws ChukwaAgent.AlreadyRunningException
public static ChukwaAgent getAgent()
public int getControllerPort()
public OffsetStatsManager getAdaptorStatsManager()
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
name
- the adaptor to stopshutdownMode
- if true, shutdown, if false, hardStoppublic org.apache.hadoop.conf.Configuration getConfiguration()
getConfiguration
in interface AdaptorManager
public static org.apache.hadoop.conf.Configuration getStaticConfiguration()
public Adaptor getAdaptor(String name)
getAdaptor
in interface AdaptorManager
public ChukwaAgent.Offset offset(Adaptor a)
public Connector getConnector()
public void shutdown()
public void shutdown(boolean exit)
Copyright © 2014 Apache Software Foundation. All Rights Reserved.