Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Merge commit '6d4e08ed06c5cd28c45981b2ebe31c7f7ec6fd83' into quix0r

Michael Christen216a287a85bb
diff --cc source/de/anomic/crawler/CrawlQueues.java
index 5daaddad9,b9bde98e2..4d2ccab73
--- a/source/de/anomic/crawler/CrawlQueues.java
+++ b/source/de/anomic/crawler/CrawlQueues.java
@@@ -219,11 -197,8 +219,11 @@@ public class CrawlQueues
}
public boolean coreCrawlJob() {
-
++
+ final boolean robinsonPrivateCase = (this.sb.isRobinsonMode() &&
+ !this.sb.getConfig(SwitchboardConstants.CLUSTER_MODE, "").equals(SwitchboardConstants.CLUSTER_MODE_PUBLIC_CLUSTER));
- if ((robinsonPrivateCase || coreCrawlJobSize() <= 20) && limitCrawlJobSize() > 0) {
- if (coreCrawlJobSize() <= 20 && limitCrawlJobSize() > 0) {
++ if ((robinsonPrivateCase || coreCrawlJobSize() <= 20) && limitCrawlJobSize() > 0) {
// move some tasks to the core crawl job so we have something to do
final int toshift = Math.min(10, limitCrawlJobSize()); // this cannot be a big number because the balancer makes a forced waiting if it cannot balance
for (int i = 0; i < toshift; i++) {
@@@ -434,16 -394,13 +434,16 @@@
}
if (remoteTriggeredCrawlJobSize() > 200) {
- if (this.log.isFine()) this.log.logFine("remoteCrawlLoaderJob: the remote-triggered crawl job queue is filled, omitting processing");
+ if (this.log.isFine()) {
+ this.log.logFine("remoteCrawlLoaderJob: the remote-triggered crawl job queue is filled, omitting processing");
+ }
return false;
}
--
- // Determine ratio local/remote, if lower than 1000 do not do any remote jobs
- if (!isLocalRemoteRatioReached()) {
- if (this.log.isFine()) this.log.logFine("remoteCrawlLoaderJob: a local crawl is running, omitting processing");
++
+ if (coreCrawlJobSize() > 0 /*&& sb.indexingStorageProcessor.queueSize() > 0*/) {
+ if (this.log.isFine()) {
+ this.log.logFine("remoteCrawlLoaderJob: a local crawl is running, omitting processing");
- }
++ }
return false;
}
@@@ -706,5 -641,31 +706,4 @@@
}
}
-
- /**
- * To determine wether remote-crawling is omitted because of to many local crawls
- *
- * @return Wether remote-crawling is omitted
- */
- private boolean isLocalRemoteRatioReached () {
- if (remoteTriggeredCrawlJobSize() == 0) {
- // No entries in remote queue
- return true;
- }
-
- // Determine ratio
- float ratio = (coreCrawlJobSize() / remoteTriggeredCrawlJobSize());
-
- // Debug message
- Log.logInfo("CrawlQueues",
- "isLocalRemoteRatioReached: core.size() = " + coreCrawlJobSize() +
- ", limit.size() = " + limitCrawlJobSize() +
- ", remoteTriggered.size() = " + remoteTriggeredCrawlJobSize() +
- ", ratio = " + new Float(ratio).toString()
- );
-
- // Check for local/remote ratio is below 1,000
- return (ratio <= sb.getConfigLong("crawler.localRemoteRatio", 1000));
- }
--
}
diff --cc source/net/yacy/kelondro/blob/ArrayStack.java
index 72d83e51f,e72fec70f..72d83e51f
mode 100755,100644..100644
--- a/source/net/yacy/kelondro/blob/ArrayStack.java
+++ b/source/net/yacy/kelondro/blob/ArrayStack.java