From 3c6e8d201575d67aeff76a9b833a106bc51fa1b2 Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 8 Sep 2008 18:20:05 +0000 Subject: [PATCH] set default ppm when network is switched git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5127 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexControlURLs_p.java | 2 +- .../de/anomic/index/indexRepositoryReference.java | 10 ++++++++-- source/de/anomic/plasma/plasmaSwitchboard.java | 15 ++++++++++----- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java index 456a1d13c..3643f4194 100644 --- a/htroot/IndexControlURLs_p.java +++ b/htroot/IndexControlURLs_p.java @@ -263,7 +263,7 @@ public class IndexControlURLs_p { while (statsiter.hasNext() && cnt < count) { hs = statsiter.next(); prop.put("statisticslines_domains_" + cnt + "_dark", (dark) ? "1" : "0"); - prop.put("statisticslines_domains_" + cnt + "_domain", hs.hostname); + prop.put("statisticslines_domains_" + cnt + "_domain", hs.hostname + ((hs.port == 80) ? "" : ":" + hs.port)); prop.put("statisticslines_domains_" + cnt + "lines", count); prop.put("statisticslines_domains_" + cnt + "_hashpart", hs.hosthash); prop.put("statisticslines_domains_" + cnt + "_count", hs.count); diff --git a/source/de/anomic/index/indexRepositoryReference.java b/source/de/anomic/index/indexRepositoryReference.java index c9216e573..23332d5e6 100644 --- a/source/de/anomic/index/indexRepositoryReference.java +++ b/source/de/anomic/index/indexRepositoryReference.java @@ -556,13 +556,17 @@ public final class indexRepositoryReference { count += 10; // make some more to prevent that we have to do this again after deletions too soon. if (count < 0 || count > s.size()) count = s.size(); statsDump = new ArrayList(); + indexURLReference.Components comps; + yacyURL url; while (j.hasNext()) { urlhash = j.next(); if (urlhash == null) continue; urlref = this.load(urlhash, null, 0); if (urlref == null || urlref.comp() == null || urlref.comp().url() == null || urlref.comp().url().getHost() == null) continue; if (statsDump == null) return new ArrayList().iterator(); // some other operation has destroyed the object - statsDump.add(new hostStat(urlref.comp().url().getHost(), urlhash.substring(6), s.getScore(urlhash))); + comps = urlref.comp(); + url = comps.url(); + statsDump.add(new hostStat(url.getHost(), url.getPort(), urlhash.substring(6), s.getScore(urlhash))); count--; if (count == 0) break; } @@ -581,10 +585,12 @@ public final class indexRepositoryReference { public class hostStat { public String hostname, hosthash; + public int port; public int count; - public hostStat(String host, String urlhashfragment, int count) { + public hostStat(String host, int port, String urlhashfragment, int count) { assert urlhashfragment.length() == 6; this.hostname = host; + this.port = port; this.hosthash = urlhashfragment; this.count = count; } diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index d3f634e35..8e31e2b68 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -300,11 +300,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch