Repository: hbase Updated Branches: refs/heads/branch-2 6252ae22c -> 99e84a26f
HBASE-18287 Remove log warning in PartitionedMobCompactor.java#getFileStatus Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/99e84a26 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/99e84a26 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/99e84a26 Branch: refs/heads/branch-2 Commit: 99e84a26f54814b880d03929eba8deed303613be Parents: 6252ae2 Author: Huaxiang Sun <huaxiang...@apache.org> Authored: Mon Aug 21 15:05:59 2017 -0700 Committer: Huaxiang Sun <huaxiang...@apache.org> Committed: Thu Aug 24 15:03:58 2017 -0700 ---------------------------------------------------------------------- .../compactions/PartitionedMobCompactor.java | 23 +++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/99e84a26/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java index da664cd..c378a88 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mob/compactions/PartitionedMobCompactor.java @@ -915,23 +915,20 @@ public class PartitionedMobCompactor extends MobCompactor { private FileStatus getLinkedFileStatus(HFileLink link) throws IOException { Path[] locations = link.getLocations(); + FileStatus file; for (Path location : locations) { - FileStatus file = getFileStatus(location); - if (file != null) { - return file; - } - } - return null; - } - private FileStatus getFileStatus(Path path) throws IOException { - try { - if (path != null) { - return fs.getFileStatus(path); + if (location != null) { + try { + file = fs.getFileStatus(location); + if (file != null) { + return file; + } + } 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; } }