public class ChukwaHttpSender extends Object implements ChukwaSender
On error, tries the list of available collectors, pauses for a minute, and then repeats.
Will wait forever for collectors to come up.
| Modifier and Type | Class and Description |
|---|---|
static class |
ChukwaHttpSender.CommitListEntry |
| Modifier and Type | Field and Description |
|---|---|
static String |
COLLECTOR_TIMEOUT_OPT |
| Constructor and Description |
|---|
ChukwaHttpSender(org.apache.hadoop.conf.Configuration c) |
| Modifier and Type | Method and Description |
|---|---|
List<ChukwaHttpSender.CommitListEntry> |
postAndParseResponse(org.apache.commons.httpclient.methods.PostMethod method,
List<ChukwaHttpSender.CommitListEntry> expectedCommitResults) |
List<ChukwaHttpSender.CommitListEntry> |
send(List<Chunk> toSend)
grab all of the chunks currently in the chunkQueue, stores a copy of them
locally, calculates their size, sets them up
|
void |
setCollectors(Iterator<String> collectors)
Set up a list of connectors for this client to send
Chunks to |
void |
stop() |
public static final String COLLECTOR_TIMEOUT_OPT
public void setCollectors(Iterator<String> collectors)
Chunks tosetCollectors in interface ChukwaSendercollectors - is a list of collectorspublic List<ChukwaHttpSender.CommitListEntry> send(List<Chunk> toSend) throws InterruptedException, IOException
send in interface ChukwaSendertoSend - a list of chunks to commitInterruptedException - if interrupted while trying to sendIOException - when writing failspublic List<ChukwaHttpSender.CommitListEntry> postAndParseResponse(org.apache.commons.httpclient.methods.PostMethod method, List<ChukwaHttpSender.CommitListEntry> expectedCommitResults) throws IOException, InterruptedException
method - the data to pushexpectedCommitResults - the listIOException - if error writingInterruptedException - if shutdown has been initiatedpublic void stop()
stop in interface ChukwaSenderCopyright © 2016 Apache Software Foundation. All Rights Reserved.