summaryrefslogtreecommitdiff
path: root/htroot
diff options
context:
space:
mode:
authororbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2009-01-22 00:03:54 +0000
committerorbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2009-01-22 00:03:54 +0000
commitdedfc7df7f5e2be64deeed474e769e8fe9016b29 (patch)
tree484a973cedb5544242e5b594dbe276876dff8869 /htroot
parent34da04c7dd46c11a2a2df2b63a62c2506224320c (diff)
removed distinction between DHT-in and DHT-out. This is necessary to make room for the new cell data structure, which cannot use this this distinction in the first place, but will enable the same meaning with different mechanisms (segments, later)
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5511 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot')
-rw-r--r--htroot/PerformanceQueues_p.html23
-rw-r--r--htroot/PerformanceQueues_p.java15
-rw-r--r--htroot/PerformanceQueues_p.xml28
-rw-r--r--htroot/WatchCrawler_p.java21
-rwxr-xr-x[-rw-r--r--]htroot/api/queues_p.java3
-rw-r--r--htroot/api/status_p.java9
-rw-r--r--htroot/api/status_p.xml6
-rw-r--r--htroot/js/WatchCrawler.js4
-rw-r--r--htroot/yacy/transferRWI.java8
9 files changed, 52 insertions, 65 deletions
diff --git a/htroot/PerformanceQueues_p.html b/htroot/PerformanceQueues_p.html
index c34ff8eea..1f2cfcd57 100644
--- a/htroot/PerformanceQueues_p.html
+++ b/htroot/PerformanceQueues_p.html
@@ -68,14 +68,13 @@
<fieldset><legend>Cache Settings:</legend>
<table border="0" cellpadding="5" cellspacing="1">
<tr valign="top" class="TableHeader">
- <td>Cache Type</td>
- <td>DHT-Out</td>
- <td>DHT-In</td>
+ <td></td>
+ <td>RAM Cache</td>
<td>Description</td>
</tr>
<tr valign="top" class="TableCellDark">
<td>URLs in RAM buffer:</td>
- <td colspan="2" align="center">#[urlCacheSize]#</td>
+ <td align="center">#[urlCacheSize]#</td>
<td>
This is the size of the URL write buffer. Its purpose is to buffer incoming URLs
in case of search result transmission and during DHT transfer.
@@ -83,8 +82,7 @@
</tr>
<tr valign="top" class="TableCellDark">
<td>Words in RAM cache:<br />(Size in KBytes)</td>
- <td>#[wordCacheWSize]#<br />(#[wordCacheWSizeKBytes]# KB)</td>
- <td>#[wordCacheKSize]#<br />(#[wordCacheKSizeKBytes]# KB)</td>
+ <td>#[wordCacheSize]#<br />(#[wordCacheSizeKBytes]# KB)</td>
<td>
This is the current size of the word caches.
The indexing cache speeds up the indexing process, the DHT cache holds indexes temporary for approval.
@@ -93,8 +91,7 @@
</tr>
<tr valign="top" class="TableCellDark">
<td>Maximum URLs currently assigned<br />to one cached word:</td>
- <td>#[maxURLinWCache]#</td>
- <td>#[maxURLinKCache]#</td>
+ <td>#[maxURLinCache]#</td>
<td>
This is the maximum size of URLs assigned to a single word cache entry.
If this is a big number, it shows that the caching works efficiently.
@@ -102,23 +99,21 @@
</tr>
<tr valign="top" class="TableCellDark">
<td>Maximum age of a word:</td>
- <td>#[maxAgeOfWCache]#</td>
- <td>#[maxAgeOfKCache]#</td>
+ <td>#[maxAgeOfCache]#</td>
<td>
This is the maximum age of a word in an index in minutes.
</td>
</tr>
<tr valign="top" class="TableCellDark">
<td>Minimum age of a word:</td>
- <td>#[minAgeOfWCache]#</td>
- <td>#[minAgeOfKCache]#</td>
+ <td>#[minAgeOfCache]#</td>
<td>
This is the minimum age of a word in an index in minutes.
</td>
</tr>
<tr valign="top" class="TableCellDark">
<td>Maximum number of words in cache:</td>
- <td colspan="2">
+ <td>
<input name="wordCacheMaxCount" type="text" size="10" maxlength="100" value="#[wordCacheMaxCount]#" />
</td>
<td>
@@ -129,7 +124,7 @@
</tr>
<tr valign="top" class="TableCellDark">
<td>Initial space of words in cache:</td>
- <td colspan="2">
+ <td>
<input name="wordCacheInitCount" type="text" size="10" maxlength="100" value="#[wordCacheInitCount]#" />
</td>
<td>
diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java
index 762133131..76b1a16da 100644
--- a/htroot/PerformanceQueues_p.java
+++ b/htroot/PerformanceQueues_p.java
@@ -286,16 +286,11 @@ public class PerformanceQueues_p {
// table cache settings
prop.putNum("urlCacheSize", switchboard.webIndex.getURLwriteCacheSize());
- prop.putNum("wordCacheWSize", switchboard.webIndex.dhtOutCacheSize());
- prop.putNum("wordCacheKSize", switchboard.webIndex.dhtInCacheSize());
- prop.putNum("wordCacheWSizeKBytes", switchboard.webIndex.dhtCacheSizeBytes(false)/1024);
- prop.putNum("wordCacheKSizeKBytes", switchboard.webIndex.dhtCacheSizeBytes(true)/1024);
- prop.putNum("maxURLinWCache", switchboard.webIndex.maxURLinDHTOutCache());
- prop.putNum("maxURLinKCache", switchboard.webIndex.maxURLinDHTInCache());
- prop.putNum("maxAgeOfWCache", switchboard.webIndex.maxAgeOfDHTOutCache() / 1000 / 60); // minutes
- prop.putNum("maxAgeOfKCache", switchboard.webIndex.maxAgeOfDHTInCache() / 1000 / 60); // minutes
- prop.putNum("minAgeOfWCache", switchboard.webIndex.minAgeOfDHTOutCache() / 1000 / 60); // minutes
- prop.putNum("minAgeOfKCache", switchboard.webIndex.minAgeOfDHTInCache() / 1000 / 60); // minutes
+ prop.putNum("wordCacheSize", switchboard.webIndex.dhtCacheSize());
+ prop.putNum("wordCacheSizeKBytes", switchboard.webIndex.dhtCacheSizeBytes()/1024);
+ prop.putNum("maxURLinCache", switchboard.webIndex.maxURLinDHTCache());
+ prop.putNum("maxAgeOfCache", switchboard.webIndex.maxAgeOfDHTCache() / 1000 / 60); // minutes
+ prop.putNum("minAgeOfCache", switchboard.webIndex.minAgeOfDHTCache() / 1000 / 60); // minutes
prop.putNum("maxWaitingWordFlush", switchboard.getConfigLong("maxWaitingWordFlush", 180));
prop.put("wordCacheMaxCount", switchboard.getConfigLong(plasmaSwitchboardConstants.WORDCACHE_MAX_COUNT, 20000));
prop.put("wordCacheInitCount", switchboard.getConfigLong(plasmaSwitchboardConstants.WORDCACHE_INIT_COUNT, 30000));
diff --git a/htroot/PerformanceQueues_p.xml b/htroot/PerformanceQueues_p.xml
index 173a8c830..a1f95c117 100644
--- a/htroot/PerformanceQueues_p.xml
+++ b/htroot/PerformanceQueues_p.xml
@@ -24,26 +24,14 @@
</Task>
#{/table}#</Tasks>
<Cache>
- <dhtOut>
- <urlCacheSize>#[urlCacheSize]#</urlCacheSize>
- <wordCacheSize>#[wordCacheWSize]#</wordCacheSize>
- <maxURLinCache>#[maxURLinWCache]#</maxURLinCache>
- <maxAgeOfCache>#[maxAgeOfWCache]#</maxAgeOfCache>
- <minAgeOfCache>#[minAgeOfWCache]#</minAgeOfCache>
- <wordCacheMaxCount>#[wordOutCacheMaxCount]#</wordCacheMaxCount>
- <wordCacheInitCount>#[wordCacheInitCount]#</wordCacheInitCount>
- <wordFlushSize>#[wordFlushSize]#</wordFlushSize>
- </dhtOut>
- <dhtIn>
- <urlCacheSize>#[urlCacheSize]#</urlCacheSize>
- <wordCacheSize>#[wordCacheKSize]#</wordCacheSize>
- <maxURLinCache>#[maxURLinKCache]#</maxURLinCache>
- <maxAgeOfCache>#[maxAgeOfKCache]#</maxAgeOfCache>
- <minAgeOfCache>#[minAgeOfKCache]#</minAgeOfCache>
- <wordCacheMaxCount>#[wordInCacheMaxCount]#</wordCacheMaxCount>
- <wordCacheInitCount>#[wordCacheInitCount]#</wordCacheInitCount>
- <wordFlushSize>#[wordFlushSize]#</wordFlushSize>
- </dhtIn>
+ <urlCacheSize>#[urlCacheSize]#</urlCacheSize>
+ <wordCacheSize>#[wordCacheSize]#</wordCacheSize>
+ <maxURLinCache>#[maxURLinCache]#</maxURLinCache>
+ <maxAgeOfCache>#[maxAgeOfCache]#</maxAgeOfCache>
+ <minAgeOfCache>#[minAgeOfCache]#</minAgeOfCache>
+ <wordCacheMaxCount>#[wordOutCacheMaxCount]#</wordCacheMaxCount>
+ <wordCacheInitCount>#[wordCacheInitCount]#</wordCacheInitCount>
+ <wordFlushSize>#[wordFlushSize]#</wordFlushSize>
</Cache>
<ThreadPools>
#{pool}#<Pool>
diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.java
index 9a7a9f67e..78576ff8c 100644
--- a/htroot/WatchCrawler_p.java
+++ b/htroot/WatchCrawler_p.java
@@ -36,7 +36,6 @@ import java.util.Set;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
-import api.queues_p;
import de.anomic.crawler.CrawlEntry;
import de.anomic.crawler.CrawlProfile;
import de.anomic.crawler.SitemapImporter;
@@ -68,7 +67,23 @@ public class WatchCrawler_p {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// inital values for AJAX Elements (without JavaScript)
- final serverObjects prop = queues_p.respond(header, post, env);
+ final serverObjects prop = new serverObjects();
+ prop.put("rejected", 0);
+ prop.put("indexingSize", 0);
+ prop.put("indexingMax", 0);
+ prop.put("urlpublictextSize", 0);
+ prop.put("rwipublictextSize", 0);
+ prop.put("list", "0");
+ prop.put("loaderSize", 0);
+ prop.put("loaderMax", 0);
+ prop.put("list-loader", 0);
+ prop.put("localCrawlSize", 0);
+ prop.put("localCrawlState", "");
+ prop.put("limitCrawlSize", 0);
+ prop.put("limitCrawlState", "");
+ prop.put("remoteCrawlSize", 0);
+ prop.put("remoteCrawlState", "");
+ prop.put("list-remote", 0);
prop.put("forwardToCrawlStart", "0");
prop.put("info", "0");
@@ -429,7 +444,7 @@ public class WatchCrawler_p {
// return rewrite properties
return prop;
}
-
+
private static long recrawlIfOlderC(final boolean recrawlIfOlderCheck, final int recrawlIfOlderNumber, final String crawlingIfOlderUnit) {
if (!recrawlIfOlderCheck) return 0L;
if (crawlingIfOlderUnit.equals("year")) return System.currentTimeMillis() - (long) recrawlIfOlderNumber * 1000L * 60L * 60L * 24L * 365L;
diff --git a/htroot/api/queues_p.java b/htroot/api/queues_p.java
index daf0ebe3b..7c2f9a19f 100644..100755
--- a/htroot/api/queues_p.java
+++ b/htroot/api/queues_p.java
@@ -1,6 +1,3 @@
-
-package api;
-
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
diff --git a/htroot/api/status_p.java b/htroot/api/status_p.java
index ebe601031..8f794c5e8 100644
--- a/htroot/api/status_p.java
+++ b/htroot/api/status_p.java
@@ -21,15 +21,14 @@ public class status_p {
prop.setLocalized(false);
prop.put("rejected", "0");
sb.updateMySeed();
- final int cacheOutSize = sb.webIndex.dhtOutCacheSize();
+ final int cacheSize = sb.webIndex.dhtCacheSize();
final long cacheMaxSize = sb.getConfigLong(plasmaSwitchboardConstants.WORDCACHE_MAX_COUNT, 10000);
prop.putNum("ppm", sb.currentPPM());
prop.putNum("qpm", sb.webIndex.seedDB.mySeed().getQPM());
- prop.putNum("wordCacheSize", sb.webIndex.dhtOutCacheSize() + sb.webIndex.dhtInCacheSize());
- prop.putNum("wordCacheWSize", cacheOutSize);
- prop.putNum("wordCacheKSize", sb.webIndex.dhtInCacheSize());
+ prop.putNum("wordCacheSize", sb.webIndex.dhtCacheSize());
+ prop.putNum("wordCacheSize", cacheSize);
prop.putNum("wordCacheMaxSize", cacheMaxSize);
- prop.put("wordCacheWCount", cacheOutSize);
+ prop.put("wordCacheCount", cacheSize);
prop.put("wordCacheMaxCount", cacheMaxSize);
//
diff --git a/htroot/api/status_p.xml b/htroot/api/status_p.xml
index 7dced800b..550efc2dd 100644
--- a/htroot/api/status_p.xml
+++ b/htroot/api/status_p.xml
@@ -2,10 +2,8 @@
<status>
<ppm>#[ppm]#</ppm>
<wordCacheSize>#[wordCacheSize]#</wordCacheSize>
- <wordCacheWSize>#[wordCacheWSize]#</wordCacheWSize>
- <wordCacheWCount>#[wordCacheWCount]#</wordCacheWCount>
- <wordCacheKSize>#[wordCacheKSize]#</wordCacheKSize>
- <wordCacheMaxSize>#[wordCacheMaxSize]#</wordCacheMaxSize>
+ <wordCacheSize>#[wordCacheSize]#</wordCacheSize>
+ <wordCacheCount>#[wordCacheCount]#</wordCacheCount>
<wordCacheMaxCount>#[wordCacheMaxCount]#</wordCacheMaxCount>
<memory>
diff --git a/htroot/js/WatchCrawler.js b/htroot/js/WatchCrawler.js
index f4633a9af..0cca57daa 100644
--- a/htroot/js/WatchCrawler.js
+++ b/htroot/js/WatchCrawler.js
@@ -91,8 +91,8 @@ function handleStatus(){
removeAllChildren(trafCrawlerSpan);
trafCrawlerSpan.appendChild(document.createTextNode(Math.round((trafficCrawler) / 1024 / 10.24) / 100));
- var wordCache=getValue(getFirstChild(statusTag, "wordCacheWCount"));
- var wordCacheSize=getValue(getFirstChild(statusTag, "wordCacheWSize"));
+ var wordCache=getValue(getFirstChild(statusTag, "wordCacheCount"));
+ var wordCacheSize=getValue(getFirstChild(statusTag, "wordCacheSize"));
var wordCacheMax=getValue(getFirstChild(statusTag, "wordCacheMaxCount"));
var wordCacheMaxSize=getValue(getFirstChild(statusTag, "wordCacheMaxSize"));
diff --git a/htroot/yacy/transferRWI.java b/htroot/yacy/transferRWI.java
index 2cd63f09f..1c4947e73 100644
--- a/htroot/yacy/transferRWI.java
+++ b/htroot/yacy/transferRWI.java
@@ -100,9 +100,9 @@ public final class transferRWI {
sb.getLog().logInfo("Rejecting RWIs from peer " + otherPeerName + ". Not granted.");
result = "not_granted";
pause = 0;
- } else if (checkLimit && sb.webIndex.dhtInCacheSize() > cachelimit) {
+ } else if (checkLimit && sb.webIndex.dhtCacheSize() > cachelimit) {
// we are too busy to receive indexes
- sb.getLog().logInfo("Rejecting RWIs from peer " + otherPeerName + ". We are too busy (buffersize=" + sb.webIndex.dhtInCacheSize() + ").");
+ sb.getLog().logInfo("Rejecting RWIs from peer " + otherPeerName + ". We are too busy (buffersize=" + sb.webIndex.dhtCacheSize() + ").");
granted = false; // don't accept more words if there are too many words to flush
result = "busy";
pause = 60000;
@@ -163,7 +163,7 @@ public final class transferRWI {
}
// learn entry
- sb.webIndex.addEntry(wordHash, iEntry, System.currentTimeMillis(), true);
+ sb.webIndex.addEntry(wordHash, iEntry, System.currentTimeMillis());
serverCore.checkInterruption();
// check if we need to ask for the corresponding URL
@@ -200,7 +200,7 @@ public final class transferRWI {
result = "ok";
if (checkLimit) {
- pause = (sb.webIndex.dhtInCacheSize() < 500) ? 0 : sb.webIndex.dhtInCacheSize(); // estimation of necessary pause time
+ pause = (sb.webIndex.dhtCacheSize() < 500) ? 0 : sb.webIndex.dhtCacheSize(); // estimation of necessary pause time
}
}