mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
*)Undoing peername sorting
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@716 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
61d3b23ada
commit
7638b4181b
|
@ -50,9 +50,6 @@ import java.util.Enumeration;
|
|||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Set;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import de.anomic.htmlFilter.htmlFilterContentScraper;
|
||||
import de.anomic.http.httpHeader;
|
||||
|
@ -314,21 +311,14 @@ public class IndexControl_p {
|
|||
int hc = 0;
|
||||
if ((yacyCore.seedDB != null) && (yacyCore.seedDB.sizeConnected() > 0)) {
|
||||
Enumeration e = yacyCore.dhtAgent.getAcceptRemoteIndexSeeds(keyhash);
|
||||
TreeMap hostList = new TreeMap();
|
||||
while (e.hasMoreElements()) {
|
||||
seed = (yacySeed) e.nextElement();
|
||||
if (seed != null) hostList.put(seed.get("Name", "nameless"),seed.hash);
|
||||
}
|
||||
|
||||
String hostName = null;
|
||||
try {
|
||||
while ((hostName = (String) hostList.firstKey()) != null) {
|
||||
prop.put("hosts_" + hc + "_hosthash", hostList.get(hostName));
|
||||
prop.put("hosts_" + hc + "_hostname", /*seed.hash + " " +*/ hostName);
|
||||
if (seed != null) {
|
||||
prop.put("hosts_" + hc + "_hosthash", seed.hash);
|
||||
prop.put("hosts_" + hc + "_hostname", /*seed.hash + " " +*/ seed.get("Name", "nameless"));
|
||||
hc++;
|
||||
hostList.remove(hostName);
|
||||
}
|
||||
} catch (NoSuchElementException ex) {}
|
||||
}
|
||||
prop.put("hosts", Integer.toString(hc));
|
||||
} else {
|
||||
prop.put("hosts", "0");
|
||||
|
|
Loading…
Reference in New Issue
Block a user