org.apache.hadoop.chukwa.datacollection.sender
Class RetryListOfCollectors
java.lang.Object
org.apache.hadoop.chukwa.datacollection.sender.RetryListOfCollectors
- All Implemented Interfaces:
- Cloneable, Iterator<String>
public class RetryListOfCollectors
- extends Object
- implements Iterator<String>, Cloneable
An iterator returning a list of Collectors to try. This class is
nondeterministic, since it puts collectors back on the list after some
period.
No node will be polled more than once per maxRetryRateMs milliseconds.
hasNext() will continue return true if you have not called it recently.
RETRY_RATE_OPT
public static final String RETRY_RATE_OPT
- See Also:
- Constant Field Values
RetryListOfCollectors
public RetryListOfCollectors(File collectorFile,
org.apache.hadoop.conf.Configuration conf)
throws IOException
- Throws:
IOException
RetryListOfCollectors
public RetryListOfCollectors(List<String> collectors,
org.apache.hadoop.conf.Configuration conf)
- This is only used for debugging. Possibly it should sanitize urls the same way the other
constructor does.
- Parameters:
collectors - maxRetryRateMs -
RetryListOfCollectors
public RetryListOfCollectors(org.apache.hadoop.conf.Configuration conf)
shuffleList
public void shuffleList()
hasNext
public boolean hasNext()
- Specified by:
hasNext in interface Iterator<String>
next
public String next()
- Specified by:
next in interface Iterator<String>
add
public void add(String collector)
remove
public void remove()
- Specified by:
remove in interface Iterator<String>
clone
public RetryListOfCollectors clone()
- Overrides:
clone in class Object
Copyright © 2011 Apache Software Foundation. All Rights Reserved.