Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
better logging for robinson selection according to peer tag
orbitera47bdc405b42
diff --git a/source/de/anomic/yacy/dht/PeerSelection.java b/source/de/anomic/yacy/dht/PeerSelection.javaindex 819e6cd89..76afc443c 100755--- a/source/de/anomic/yacy/dht/PeerSelection.java+++ b/source/de/anomic/yacy/dht/PeerSelection.java@@ -122,8 +122,9 @@ public class PeerSelection {while (dhtEnum.hasNext()) {seed = dhtEnum.next();if (seed == null) continue;+ if (seed.getFlagAcceptRemoteIndex()) continue;if (seed.isLastSeenTimeout(3600000)) continue;- if (!seed.getFlagAcceptRemoteIndex()) robinson.add(seed);+ robinson.add(seed);}// add robinson peers according to robinson burst rate@@ -150,7 +151,11 @@ public class PeerSelection {if (seed.matchPeerTags(wordhashes)) {// peer tags matchString specialized = seed.getPeerTags().toString();- if (!specialized.equals("[*]")) Log.logInfo("DHT", "selectPeers/PeerTags: " + seed.hash + ":" + seed.getName() + ", is specialized peer for " + specialized);+ if (specialized.equals("[*]")) {+ Log.logInfo("DHT", "selectPeers/RobinsonTag: " + seed.hash + ":" + seed.getName() + " grants search for all");+ } else {+ Log.logInfo("DHT", "selectPeers/RobinsonTag " + seed.hash + ":" + seed.getName() + " is specialized peer for " + specialized);+ }regularSeeds.put(seed.hash, seed);}}diff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.javaindex 7f28dda5b..417c26856 100644--- a/source/de/anomic/yacy/yacySeed.java+++ b/source/de/anomic/yacy/yacySeed.java@@ -553,7 +553,8 @@ public class yacySeed implements Cloneable, Comparable<yacySeed>, Comparator<yac* @return true, if the time between the last-seen time and now is greater then the given time-out*/public final boolean isLastSeenTimeout(long milliseconds) {- return Math.abs(System.currentTimeMillis() - this.getLastSeenUTC()) > milliseconds;+ long d = Math.abs(System.currentTimeMillis() - this.getLastSeenUTC());+ return d > milliseconds;}/** @return the age of the seed in number of days */