</BUG>
UnderFileSystem ufs = UnderFileSystem.get(path);
String folder = path.substring(0, path.lastIndexOf("/")) + "/completed";
try {
<BUG>if (ufs.exists(folder)) {
LOG.info("Deleting folder " + folder);

ufs.delete(folder, true);
</BUG>
}

UFS = null;
OS = null;
DOS = null;
}
}
public static void deleteCompletedLogs(String path, int upTo) {
UnderFileSystem ufs = UnderFileSystem.get(path);
String folder = path.substring(0, path.lastIndexOf("/")) + "/completed";
try {
for (int i = 0; i < upTo; i ++) {
String toDelete = folder + "/" + i + ".editLog";
LOG.info("Deleting editlog " + toDelete);
ufs.delete(toDelete, true);
}
