String fileName = parts[0] + "." + parts[1] + ".cluster";
Path from = dbFolder.resolve(readDirName).resolve(fileName);
Path to = baseline.resolve(fileName);
- System.err.println("purge copies " + from + " => " + to);
+ LOGGER.info("purge copies " + from + " => " + to);
Files.copy(from, to, StandardCopyOption.COPY_ATTRIBUTES);
long first = new BigInteger(parts[0], 16).longValue();
long second = new BigInteger(parts[1], 16).longValue();
String fileName = parts[0] + ".extFile";
Path from = dbFolder.resolve(readDirName).resolve(fileName);
Path to = baseline.resolve(fileName);
- System.err.println("purge copies " + from + " => " + to);
+ LOGGER.info("purge copies " + from + " => " + to);
Files.copy(from, to, StandardCopyOption.COPY_ATTRIBUTES);
FileInfo info = fileLRU.getWithoutMutex(parts[0]);
info.moveTo(baseline);
String readDirName = parts[1];
if(!readDirName.equals(currentDir)) {
ClusterStreamChunk chunk = streamLRU.purge(parts[0]);
- System.err.println("purge removes " + chunk);
+ LOGGER.info("purge removes " + chunk);
}
}
if(!readDirName.equals(currentDir)) {
Long revisionId = Long.parseLong(parts[0]);
ChangeSetInfo info = csLRU.purge(revisionId);
- System.err.println("purge removes " + info);
+ LOGGER.info("purge removes " + info);
}
// Path readDir = dbFolder.resolve(parts[1]);
// Long revisionId = Long.parseLong(parts[0]);
void tryPurgeDirectory(Path f) {
- System.err.println("purge deletes " + f);
+ LOGGER.info("purge deletes " + f);
String currentDir = f.getFileName().toString();
if(currentDir.endsWith("db"))
int ordinal = Integer.parseInt(currentDir);
if(ordinal < mainState.headDir - 1) {
- System.err.println("purge deletes " + f);
+ LOGGER.info("purge deletes " + f);
FileUtils.deleteDir(f.toFile());
}
throw cause;
// Maximum autosave frequency is per 60s
if(!fullSave && System.nanoTime() - lastSnapshot < 10*1000000000L) {
- // System.err.println("lastSnapshot too early");
+ // LOGGER.info("lastSnapshot too early");
return false;
}
}
workingDirectory = dbFolder.resolve(Integer.toString(mainState.headDir));
- if (!Files.exists(workingDirectory)) {
- Files.createDirectories(workingDirectory);
- }
+ Files.createDirectories(workingDirectory);
cssi.updateWriteDirectory(workingDirectory);
// e.printStackTrace();
// }
- // System.err.println("-- load statistics --");
+ // LOGGER.info("-- load statistics --");
// for(Pair<ClusterUID, Integer> entry :
// CollectionUtils.valueSortedEntries(histogram)) {
- // System.err.println(" " + entry.second + " " + entry.first);
+ // LOGGER.info(" " + entry.second + " " + entry.first);
// }
// }
}
// Files
for (String fileKey : state.files) {
- // System.err.println("loadFile: " + fileKey);
+ // LOGGER.info("loadFile: " + fileKey);
String[] parts = fileKey.split("#");
Path readDir = dbFolder.resolve(parts[1]);
int offset = Integer.parseInt(parts[2]);
}
// Update chunks
for (String fileKey : state.stream) {
- // System.err.println("loadStream: " + fileKey);
+ // LOGGER.info("loadStream: " + fileKey);
String[] parts = fileKey.split("#");
Path readDir = dbFolder.resolve(parts[1]);
int offset = Integer.parseInt(parts[2]);