HBASE-18287 Remove log warning in PartitionedMobCompactor.java#getFileStatus

This commit is contained in:
Huaxiang Sun 2017-08-21 15:05:59 -07:00
parent bd0b0afa61
commit 1a2c38b965
1 changed files with 10 additions and 13 deletions

View File

@ -915,23 +915,20 @@ public class PartitionedMobCompactor extends MobCompactor {
private FileStatus getLinkedFileStatus(HFileLink link) throws IOException { private FileStatus getLinkedFileStatus(HFileLink link) throws IOException {
Path[] locations = link.getLocations(); Path[] locations = link.getLocations();
FileStatus file;
for (Path location : locations) { for (Path location : locations) {
FileStatus file = getFileStatus(location);
if (location != null) {
try {
file = fs.getFileStatus(location);
if (file != null) { if (file != null) {
return file; return file;
} }
}
return null;
}
private FileStatus getFileStatus(Path path) throws IOException {
try {
if (path != null) {
return fs.getFileStatus(path);
}
} catch (FileNotFoundException e) { } catch (FileNotFoundException e) {
LOG.warn("The file " + path + " can not be found", e);
} }
}
}
LOG.warn("The file " + link + " links to can not be found");
return null; return null;
} }
} }