// start deleting files, if we do not finish they will be cleaned
// up later
Trash trash = new Trash(fs, fs.getConf());
for (Path path : oldDatafiles) {
Path deleteFile = new Path(location + "/delete+" + compactName + "+" + path.getName());
if (!trash.moveToTrash(deleteFile))
fs.delete(deleteFile, true);
}
}
// atomically remove old files and add new file