forgot to re-rename commonsPath

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5316 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 22989d0d8a
commit 38e6ba5d00

@ -59,7 +59,7 @@ public class kelondroCollectionIndex {
private final int keylength;
private final File path;
private final String filenameStub;
private final File commonsPath1;
private final File commonsPath;
private final int loadfactor;
private Map<String, kelondroFixedWidthArray> arrays; // Map of (partitionNumber"-"chunksize)/kelondroFixedWidthArray - Objects
private final kelondroRow payloadrow; // definition of the payload (chunks inside the collections)
@ -123,11 +123,11 @@ public class kelondroCollectionIndex {
this.loadfactor = loadfactor;
this.maxPartitions = maxpartitions;
File cop = new File(path, filenameStub + "." + fillZ(Integer.toHexString(rowdef.objectsize).toUpperCase(), 4) + ".commons");
this.commonsPath1 = (useCommons) ? cop : null;
if (this.commonsPath1 == null) {
this.commonsPath = (useCommons) ? cop : null;
if (this.commonsPath == null) {
serverFileUtils.deleteDirectory(cop);
} else {
this.commonsPath1.mkdirs();
this.commonsPath.mkdirs();
}
final File f = new File(path, filenameStub + ".index");
@ -645,12 +645,12 @@ public class kelondroCollectionIndex {
serverLog.logInfo("kelondroCollectionIndex", "shrinked common word " + new String(key) + "; old size = " + oldsize + ", new size = " + collection.size() + ", maximum size = " + targetSize + ", newcommon size = " + newcommon.size() + ", first newcommon = " + firstnewcommon);
// finally dump the removed entries to a file
if (commonsPath1 != null) {
if (commonsPath != null) {
newcommon.sort();
final SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMddHHmmss");
formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
final String filename = serverCodings.encodeHex(kelondroBase64Order.enhancedCoder.decode(new String(key), "de.anomic.kelondro.kelondroCollectionIndex.shrinkCollection(...)")) + "_" + formatter.format(new Date()) + ".collection";
final File storagePath = new File(commonsPath1, filename.substring(0, 2)); // make a subpath
final File storagePath = new File(commonsPath, filename.substring(0, 2)); // make a subpath
storagePath.mkdirs();
final File file = new File(storagePath, filename);
try {

Loading…
Cancel
Save