logging cleanup

This commit is contained in:
Maxim.Mossienko
2016-05-04 14:43:23 +02:00
parent 669c1114df
commit 2afb1ceb4f
2 changed files with 10 additions and 6 deletions
@@ -509,10 +509,12 @@ public class StubIndexImpl extends StubIndex implements ApplicationComponent, Pe
indicesToDrop.remove(key.toString());
}
LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
if (!indicesToDrop.isEmpty()) {
LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
for (String s : indicesToDrop) {
FileUtil.delete(IndexInfrastructure.getIndexRootDir(StubIndexKey.createIndexKey(s)));
for (String s : indicesToDrop) {
FileUtil.delete(IndexInfrastructure.getIndexRootDir(StubIndexKey.createIndexKey(s)));
}
}
}
@@ -442,9 +442,11 @@ public class FileBasedIndexImpl extends FileBasedIndex {
for (ID<?, ?> key : ids) {
indicesToDrop.remove(key.toString());
}
LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
for (String s : indicesToDrop) {
FileUtil.deleteWithRenaming(IndexInfrastructure.getIndexRootDir(ID.create(s)));
if (!indicesToDrop.isEmpty()) {
LOG.info("Dropping indices:" + StringUtil.join(indicesToDrop, ","));
for (String s : indicesToDrop) {
FileUtil.deleteWithRenaming(IndexInfrastructure.getIndexRootDir(ID.create(s)));
}
}
try {