mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
removed unused code
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2820 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
06854988da
commit
8b56887676
|
@ -40,8 +40,6 @@
|
||||||
|
|
||||||
package de.anomic.http;
|
package de.anomic.http;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
|
@ -1121,57 +1121,6 @@ public final class yacy {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
private static void migratelurls(String homePath) {
|
|
||||||
File root = new File(homePath);
|
|
||||||
try {
|
|
||||||
plasmaURLPool pool = new plasmaURLPool(new File(root, "DATA/PLASMADB"), new File(root, "DATA/INDEX"), 16000, false, 1000, false, 1000, false, 10000);
|
|
||||||
kelondroFlexSplitTable fsp = new kelondroFlexSplitTable(new File(root, "DATA/INDEX/PUBLIC/TEXT"), "urls", 1000, -1, plasmaCrawlLURLNewEntry.rowdef, kelondroBase64Order.enhancedCoder);
|
|
||||||
|
|
||||||
long start = System.currentTimeMillis();
|
|
||||||
long last = start;
|
|
||||||
int tc = pool.loadedURL.size(), c = 0;
|
|
||||||
Iterator eiter = pool.loadedURL.entries(true, false, null);
|
|
||||||
plasmaCrawlLURLEntry oldentry;
|
|
||||||
kelondroRow.Entry newentry;
|
|
||||||
while (eiter.hasNext()) {
|
|
||||||
oldentry = (plasmaCrawlLURLEntry) eiter.next();
|
|
||||||
if (oldentry != null) {
|
|
||||||
plasmaCrawlLURLEntry.Components comp = oldentry.comp();
|
|
||||||
newentry = plasmaCrawlLURLNewEntry.rowdef.newEntry();
|
|
||||||
newentry.setCol("hash", indexURL.urlHash(comp.url()), null);
|
|
||||||
newentry.setCol("comp", plasmaCrawlLURLNewEntry.encodeComp(comp.url(), comp.descr(), "", "", ""));
|
|
||||||
newentry.setCol("mod", plasmaCrawlLURLNewEntry.encodeDate(oldentry.moddate()));
|
|
||||||
newentry.setCol("load", plasmaCrawlLURLNewEntry.encodeDate(oldentry.loaddate()));
|
|
||||||
newentry.setCol("referrer", oldentry.referrerHash().getBytes());
|
|
||||||
newentry.setCol("md5", new byte[0]);
|
|
||||||
newentry.setCol("size", oldentry.size());
|
|
||||||
newentry.setCol("wc", oldentry.wordCount());
|
|
||||||
newentry.setCol("dt", oldentry.doctype());
|
|
||||||
newentry.setCol("flags", new bitfield(4).getBytes());
|
|
||||||
newentry.setCol("lang", oldentry.language().getBytes());
|
|
||||||
newentry.setCol("llocal", 0);
|
|
||||||
newentry.setCol("lother", 0);
|
|
||||||
newentry.setCol("limage", 0);
|
|
||||||
newentry.setCol("laudio", 0);
|
|
||||||
newentry.setCol("lvideo", 0);
|
|
||||||
newentry.setCol("lapp", 0);
|
|
||||||
fsp.put(newentry, oldentry.loaddate());
|
|
||||||
}
|
|
||||||
c++;
|
|
||||||
if (System.currentTimeMillis() - last > 60000) {
|
|
||||||
System.out.println("Migrated " + c + " from " + tc + " urls. Estimated remaining time: " + ((System.currentTimeMillis() - start) * (tc - c) / c / 60000) + " minutes");
|
|
||||||
last = System.currentTimeMillis();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
System.out.println("MIGRATION OF " + c + " URLs FINISHED");
|
|
||||||
pool.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
private static void migratelurls(File root, File urlHash) {
|
private static void migratelurls(File root, File urlHash) {
|
||||||
try {
|
try {
|
||||||
plasmaURLPool pool = new plasmaURLPool(new File(root, "DATA/PLASMADB"), new File(root, "DATA/INDEX"), 16000, true, 1000, true, 1000, true, 10000);
|
plasmaURLPool pool = new plasmaURLPool(new File(root, "DATA/PLASMADB"), new File(root, "DATA/INDEX"), 16000, true, 1000, true, 1000, true, 10000);
|
||||||
|
@ -1212,7 +1161,7 @@ public final class yacy {
|
||||||
}
|
}
|
||||||
c++;
|
c++;
|
||||||
if (System.currentTimeMillis() - last > 60000) {
|
if (System.currentTimeMillis() - last > 60000) {
|
||||||
System.out.println("Migrated " + c + " from " + tc + " urls. Estimated remaining time: " + ((System.currentTimeMillis() - start) * (tc - c) * Math.sqrt(Math.sqrt(tc - c)) / c / 60000) + " minutes");
|
System.out.println("Migrated " + c + " from " + tc + " urls. Estimated remaining time: " + ((System.currentTimeMillis() - start) * (tc - c) / c / 60000) + " minutes");
|
||||||
last = System.currentTimeMillis();
|
last = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user