Author: orbiter
Date: 2008-03-01 10:44:33 +0100 (Sat, 01 Mar 2008)
New Revision: 4520
Modified:
trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
trunk/source/de/anomic/server/serverMemory.java
Log:
removing the error-db upon each time a start-up is made.
This is necessary because the table uses a lot of RAM and the content is never
re-used after Start-Up.
Modified: trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
===================================================================
--- trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
2008-02-27 23:12:43 UTC (rev 4519)
+++ trunk/source/de/anomic/plasma/crawler/plasmaCrawlQueues.java
2008-03-01 09:44:33 UTC (rev 4520)
@@ -38,6 +38,7 @@
import java.util.Map;
import de.anomic.data.robotsParser;
+import de.anomic.kelondro.kelondroFlexTable;
import de.anomic.plasma.plasmaCrawlEntry;
import de.anomic.plasma.plasmaCrawlNURL;
import de.anomic.plasma.plasmaCrawlProfile;
@@ -75,9 +76,14 @@
log.logConfig("Starting Crawling Management");
noticeURL = new plasmaCrawlNURL(plasmaPath);
//errorURL = new plasmaCrawlZURL(); // fresh error DB each startup;
can be hold in RAM and reduces IO;
+ File errorDBFile = new File(plasmaPath, "urlError2.db");
+ if (errorDBFile.exists()) {
+ // delete the error db to get a fresh each time on startup
+ // this is useful because there is currently no re-use of the data
in this table.
+ if (errorDBFile.isDirectory())
kelondroFlexTable.delete(plasmaPath, "urlError2.db"); else errorDBFile.delete();
+ }
errorURL = new plasmaCrawlZURL(plasmaPath, "urlError2.db", false);
delegatedURL = new plasmaCrawlZURL(plasmaPath, "urlDelegated2.db",
true);
-
}
public String urlExists(String hash) {
Modified: trunk/source/de/anomic/server/serverMemory.java
===================================================================
--- trunk/source/de/anomic/server/serverMemory.java 2008-02-27 23:12:43 UTC
(rev 4519)
+++ trunk/source/de/anomic/server/serverMemory.java 2008-03-01 09:44:33 UTC
(rev 4520)
@@ -95,7 +95,7 @@
* a Full GC to free enough RAM
* @return whether enough RAM is available
*/
- public static long available() {
+ public static final long available() {
// memory that is available including increasing total memory up to
maximum
return runtime.maxMemory() - runtime.totalMemory() +
runtime.freeMemory();
}
_______________________________________________
YaCy-svn mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/yacy-svn