public class ChukwaAgent extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ChukwaAgent.AlreadyRunningException |
Constructor and Description |
---|
ChukwaAgent() |
ChukwaAgent(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
int |
adaptorCount() |
Map<Long,Adaptor> |
getAdaptorList() |
static ChukwaAgent |
getAgent() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
Connector |
getConnector() |
int |
getControllerPort() |
long |
getOffset(Adaptor a)
Returns the last offset at which a given adaptor was checkpointed
|
static void |
main(String[] args) |
long |
processCommand(String cmd) |
protected static org.apache.hadoop.conf.Configuration |
readConfig() |
void |
reportCommit(Adaptor src,
long uuid) |
boolean |
restoreFromCheckpoint()
Tries to restore from a checkpoint file in checkpointDir.
|
void |
shutdown() |
void |
shutdown(boolean exit)
Triggers agent shutdown.
|
long |
stopAdaptor(long number,
boolean gracefully)
Stop the adaptor with given ID number.
|
void |
writeCheckpoint()
Called periodically to write checkpoints
|
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()
public long processCommand(String cmd)
public boolean restoreFromCheckpoint() throws IOException
IOException
public void writeCheckpoint() throws IOException
IOException
public void reportCommit(Adaptor src, long uuid)
public long stopAdaptor(long number, boolean gracefully)
number
- the adaptor to stopgracefully
- if true, shutdown, if false, hardStoppublic org.apache.hadoop.conf.Configuration getConfiguration()
public Connector getConnector()
protected static org.apache.hadoop.conf.Configuration readConfig()
public void shutdown()
public void shutdown(boolean exit)
public long getOffset(Adaptor a)
a
- the adaptor in questionCopyright © ${year} The Apache Software Foundation