int maxFetchersToRun = numFetchers - numRunningFetchers.get();
int count = 0;
while (pendingHosts.peek() != null) {
InputHost inputHost = pendingHosts.take();
if (LOG.isDebugEnabled()) {
LOG.debug("Processing pending host: " + inputHost.toDetailedString());
}
if (inputHost.getNumPendingInputs() > 0) {
LOG.info("Scheduling fetch for inputHost: " + inputHost.getHost());
Fetcher fetcher = constructFetcherForHost(inputHost);
numRunningFetchers.incrementAndGet();