bugfix for minimizeurldb and urldbcleanup

see http://www.yacy-forum.de/viewtopic.php?p=25539#25539

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2580 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 5c2f30eaca
commit 40965e183e

@ -702,10 +702,10 @@ public final class yacy {
// db containing all currently loades urls // db containing all currently loades urls
int cache = dbcache * 1024; // in KB int cache = dbcache * 1024; // in KB
log.logFine("URLDB-Caches: "+cache+" bytes"); log.logFine("URLDB-Caches: "+cache+" bytes");
plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(new File(dbroot, "urlHash.db"), cache, 10000, false); plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(dbroot, cache, 10000, false);
// db used to hold all neede urls // db used to hold all neede urls
plasmaCrawlLURL minimizedUrlDB = new plasmaCrawlLURL(new File(dbroot, "urlHash.temp.db"), cache, 10000, false); plasmaCrawlLURL minimizedUrlDB = new plasmaCrawlLURL(new File(dbroot, "minimized"), cache, 10000, false);
Runtime rt = Runtime.getRuntime(); Runtime rt = Runtime.getRuntime();
int cacheMem = (int)((serverMemory.max-rt.totalMemory())/1024)-(2*cache + 8*1024); int cacheMem = (int)((serverMemory.max-rt.totalMemory())/1024)-(2*cache + 8*1024);
@ -772,7 +772,7 @@ public final class yacy {
// TODO: rename the mimimized UrlDB to the name of the previous UrlDB // TODO: rename the mimimized UrlDB to the name of the previous UrlDB
log.logInfo("FINISHED URL CLEANUP, WAIT FOR DUMP"); log.logInfo("FINISHED URL CLEANUP, WAIT FOR DUMP");
log.logInfo("You can now backup your old URL DB and rename urlHash.temp.db to urlHash.db"); log.logInfo("You can now backup your old URL DB and rename minimized/urlHash.db to urlHash.db");
log.logInfo("TERMINATED URL CLEANUP"); log.logInfo("TERMINATED URL CLEANUP");
} catch (Exception e) { } catch (Exception e) {
@ -1134,7 +1134,7 @@ public final class yacy {
serverLog log = new serverLog("URLDBCLEANUP"); serverLog log = new serverLog("URLDBCLEANUP");
try {serverLog.configureLogging(new File(homePath, "DATA/LOG/yacy.logging"));} catch (Exception e) {} try {serverLog.configureLogging(new File(homePath, "DATA/LOG/yacy.logging"));} catch (Exception e) {}
try { try {
plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(new File(dbroot, "urlHash.db"), 4194304, 10000, false); plasmaCrawlLURL currentUrlDB = new plasmaCrawlLURL(dbroot, 4194304, 10000, false);
currentUrlDB.urldbcleanup(); currentUrlDB.urldbcleanup();
currentUrlDB.close(); currentUrlDB.close();
} catch (IOException e) { } catch (IOException e) {

Loading…
Cancel
Save