org.apache.hadoop.chukwa.datacollection.sender
Class AsyncAckSender
java.lang.Object
org.apache.hadoop.chukwa.datacollection.sender.ChukwaHttpSender
org.apache.hadoop.chukwa.datacollection.sender.AsyncAckSender
- All Implemented Interfaces:
- ChukwaSender
public class AsyncAckSender
- extends ChukwaHttpSender
An enhancement to ChukwaHttpSender that handles asynchronous acknowledgment.
This class will periodically poll the collectors to find out how much data
has been committed to HDFS, and will then pass those acks on to the Agent.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.log4j.Logger log
POLLPERIOD_OPT
public static final String POLLPERIOD_OPT
- See Also:
- Constant Field Values
POLLHOSTS_OPT
public static final String POLLHOSTS_OPT
- See Also:
- Constant Field Values
adaptorReset
public AdaptorResetThread adaptorReset
AsyncAckSender
public AsyncAckSender(org.apache.hadoop.conf.Configuration conf,
ChukwaAgent a)
throws IOException
- Throws:
IOException
setCollectors
public void setCollectors(Iterator<String> collectors)
- Description copied from class:
ChukwaHttpSender
- Set up a list of connectors for this client to send
Chunk
s to
- Specified by:
setCollectors
in interface ChukwaSender
- Overrides:
setCollectors
in class ChukwaHttpSender
postAndParseResponse
public List<ChukwaHttpSender.CommitListEntry> postAndParseResponse(org.apache.commons.httpclient.methods.PostMethod method,
List<ChukwaHttpSender.CommitListEntry> expectedCommitResults)
throws IOException,
InterruptedException
- Overrides:
postAndParseResponse
in class ChukwaHttpSender
- Parameters:
method
- the data to pushexpectedCommitResults
- the list
- Returns:
- the list of committed chunks
- Throws:
IOException
InterruptedException
failedCollector
protected boolean failedCollector(String downed)
- Description copied from class:
ChukwaHttpSender
- A hook for taking action when a collector is declared failed.
Returns whether to retry current post, or junk it
- Overrides:
failedCollector
in class ChukwaHttpSender
stop
public void stop()
- Specified by:
stop
in interface ChukwaSender
- Overrides:
stop
in class ChukwaHttpSender
Copyright © ${year} The Apache Software Foundation