Skip to content

Commit

Permalink
better look-ahead into the crawl queue: show more on crawl monitor
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6699 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
orbiter committed Feb 24, 2010
1 parent 4b6efe3 commit 46c4f8b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions source/de/anomic/crawler/Balancer.java
Expand Up @@ -512,9 +512,26 @@ public ArrayList<Request> top(int count) {
cel.add(crawlEntry);
count--;
if (count <= 0) break;
} catch (IOException e) {
}
} catch (IOException e) {}
}

int depth = 0;
loop: while (count > 0) {
// iterate over the domain stacks
for (LinkedList<String> list: this.domainStacks.values()) {
if (list.size() <= depth) continue loop;
String n = list.get(depth);
try {
Row.Entry rowEntry = urlFileIndex.get(n.getBytes());
if (rowEntry == null) continue;
final Request crawlEntry = new Request(rowEntry);
cel.add(crawlEntry);
count--;
if (count <= 0) break loop;
} catch (IOException e) {}
}
}

}
return cel;
}
Expand Down

0 comments on commit 46c4f8b

Please sign in to comment.