diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java index 8cf254a53..8afd32597 100644 --- a/htroot/IndexControlRWIs_p.java +++ b/htroot/IndexControlRWIs_p.java @@ -283,7 +283,8 @@ public class IndexControlRWIs_p { Reference iEntry; while (urlIter.hasNext()) { iEntry = urlIter.next(); - if (segment.fulltext().getLoadTime(ASCII.String(iEntry.urlhash())) < 0) { + long loadTime = segment.fulltext().getLoadTime(ASCII.String(iEntry.urlhash())); + if (loadTime < 0) { try { unknownURLEntries.put(iEntry.urlhash()); } catch (final SpaceExceededException e) { diff --git a/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java b/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java index b94784d72..671ce1bac 100644 --- a/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java +++ b/source/net/yacy/kelondro/rwi/ReferenceContainerCache.java @@ -36,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; +import net.yacy.cora.document.encoding.ASCII; import net.yacy.cora.order.ByteOrder; import net.yacy.cora.order.CloneableIterator; import net.yacy.cora.sorting.Rating; @@ -66,6 +67,7 @@ public final class ReferenceContainerCache exte private final ContainerOrder containerOrder; private ConcurrentHashMap> cache; + /** * open an existing heap file in undefined mode * after this a initialization should be made to use the heap: @@ -630,4 +632,17 @@ public final class ReferenceContainerCache exte } } + /** + * return a string with the key as a list + */ + @Override + public String toString() { + StringBuilder sb = new StringBuilder(cache.size() * 13 + 2); + sb.append('['); + for (ByteArray k: cache.keySet()) { + sb.append(ASCII.String(k.asBytes())).append(','); + } + if (sb.length() == 1) sb.append(']'); else sb.setCharAt(sb.length() - 1, ']'); + return sb.toString(); + } } diff --git a/source/net/yacy/peers/Protocol.java b/source/net/yacy/peers/Protocol.java index 832fd73bf..7790ad0bc 100644 --- a/source/net/yacy/peers/Protocol.java +++ b/source/net/yacy/peers/Protocol.java @@ -1401,14 +1401,6 @@ public final class Protocol { if ( uhss == null ) { return "no unknownURL tag in response"; } - EventChannel - .channels(EventChannel.DHTSEND) - .addMessage( - new RSSMessage( - "Sent " + indexes.size() + " RWIs to " + targetSeed.getName(), - "", - targetSeed.hash)); - uhss = uhss.trim(); if ( uhss.isEmpty() || uhss.equals(",") ) { return null; @@ -1419,6 +1411,14 @@ public final class Protocol { return null; } // all url's known + EventChannel + .channels(EventChannel.DHTSEND) + .addMessage( + new RSSMessage( + "Sent " + indexes.size() + " RWIs " + indexes.toString() + " to " + targetSeed.getName() + "/[" + targetSeed.hash + "], " + uhs.length + " URLs there unknown", + "", + targetSeed.hash)); + in = transferURL(targetSeed, uhs, urlRefs, segment, gzipBody, timeout); if ( in == null ) { @@ -1435,7 +1435,7 @@ public final class Protocol { } EventChannel.channels(EventChannel.DHTSEND).addMessage( new RSSMessage( - "Sent " + uhs.length + " URLs to peer " + targetSeed.getName(), + "Sent " + uhs.length + " URLs to peer " + targetSeed.getName()+ "/[" + targetSeed.hash + "]", "", targetSeed.hash)); diff --git a/source/net/yacy/search/index/Fulltext.java b/source/net/yacy/search/index/Fulltext.java index e1407183a..cd05bdabb 100644 --- a/source/net/yacy/search/index/Fulltext.java +++ b/source/net/yacy/search/index/Fulltext.java @@ -494,7 +494,7 @@ public final class Fulltext { if (urlHash == null) return -1l; try { SolrConnector.Metadata md = this.getDefaultConnector().getMetadata(urlHash); - if (md == null) return -1; + if (md == null) return -1l; return md.date; } catch (final Throwable e) { ConcurrentLog.logException(e);