|
|
@ -50,9 +50,6 @@ import java.util.Enumeration;
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.HashSet;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.Iterator;
|
|
|
|
import java.util.NoSuchElementException;
|
|
|
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
import java.util.TreeMap;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import de.anomic.htmlFilter.htmlFilterContentScraper;
|
|
|
|
import de.anomic.htmlFilter.htmlFilterContentScraper;
|
|
|
|
import de.anomic.http.httpHeader;
|
|
|
|
import de.anomic.http.httpHeader;
|
|
|
@ -312,27 +309,20 @@ public class IndexControl_p {
|
|
|
|
//List known hosts
|
|
|
|
//List known hosts
|
|
|
|
yacySeed seed;
|
|
|
|
yacySeed seed;
|
|
|
|
int hc = 0;
|
|
|
|
int hc = 0;
|
|
|
|
if ((yacyCore.seedDB != null) && (yacyCore.seedDB.sizeConnected() > 0)) {
|
|
|
|
if ((yacyCore.seedDB != null) && (yacyCore.seedDB.sizeConnected() > 0)) {
|
|
|
|
Enumeration e = yacyCore.dhtAgent.getAcceptRemoteIndexSeeds(keyhash);
|
|
|
|
Enumeration e = yacyCore.dhtAgent.getAcceptRemoteIndexSeeds(keyhash);
|
|
|
|
TreeMap hostList = new TreeMap();
|
|
|
|
while (e.hasMoreElements()) {
|
|
|
|
while (e.hasMoreElements()) {
|
|
|
|
seed = (yacySeed) e.nextElement();
|
|
|
|
seed = (yacySeed) e.nextElement();
|
|
|
|
if (seed != null) {
|
|
|
|
if (seed != null) hostList.put(seed.get("Name", "nameless"),seed.hash);
|
|
|
|
prop.put("hosts_" + hc + "_hosthash", seed.hash);
|
|
|
|
}
|
|
|
|
prop.put("hosts_" + hc + "_hostname", /*seed.hash + " " +*/ seed.get("Name", "nameless"));
|
|
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
hc++;
|
|
|
|
hc++;
|
|
|
|
hostList.remove(hostName);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (NoSuchElementException ex) {}
|
|
|
|
}
|
|
|
|
prop.put("hosts", Integer.toString(hc));
|
|
|
|
prop.put("hosts", Integer.toString(hc));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
prop.put("hosts", "0");
|
|
|
|
prop.put("hosts", "0");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// insert constants
|
|
|
|
// insert constants
|
|
|
|
prop.put("wcount", Integer.toString(switchboard.wordIndex.size()));
|
|
|
|
prop.put("wcount", Integer.toString(switchboard.wordIndex.size()));
|
|
|
|