|
|
@ -247,30 +247,13 @@ public final class yacySeedDB implements httpdAlternativeDomainNames {
|
|
|
|
if(!parentDir.mkdirs())
|
|
|
|
if(!parentDir.mkdirs())
|
|
|
|
Log.logWarning("yacySeedDB", "could not create directories for "+ seedDBFile.getParent());
|
|
|
|
Log.logWarning("yacySeedDB", "could not create directories for "+ seedDBFile.getParent());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Class[] args;
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
args = new Class[]{"".getClass(), Class.forName("java.util.Map")};
|
|
|
|
return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, null, this);
|
|
|
|
} catch (final ClassNotFoundException e2){
|
|
|
|
|
|
|
|
e2.printStackTrace();
|
|
|
|
|
|
|
|
args = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Method initializeHandlerMethod;
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
initializeHandlerMethod = this.getClass().getMethod("initializeHandler", args);
|
|
|
|
|
|
|
|
} catch (final SecurityException e1) {
|
|
|
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
|
|
|
initializeHandlerMethod = null;
|
|
|
|
|
|
|
|
} catch (final NoSuchMethodException e1) {
|
|
|
|
|
|
|
|
e1.printStackTrace();
|
|
|
|
|
|
|
|
initializeHandlerMethod = null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, initializeHandlerMethod, this);
|
|
|
|
|
|
|
|
} catch (final Exception e) {
|
|
|
|
} catch (final Exception e) {
|
|
|
|
// try again
|
|
|
|
// try again
|
|
|
|
FileUtils.deletedelete(seedDBFile);
|
|
|
|
FileUtils.deletedelete(seedDBFile);
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, initializeHandlerMethod, this);
|
|
|
|
return new MapDataMining(new Heap(seedDBFile, commonHashLength, Base64Order.enhancedCoder, 1024 * 512), 500, sortFields, longaccFields, doubleaccFields, null, this);
|
|
|
|
} catch (IOException e1) {
|
|
|
|
} catch (IOException e1) {
|
|
|
|
e1.printStackTrace();
|
|
|
|
e1.printStackTrace();
|
|
|
|
System.exit(-1);
|
|
|
|
System.exit(-1);
|
|
|
|