From 99e84a26f54814b880d03929eba8deed303613be Mon Sep 17 00:00:00 2001 From: Huaxiang Sun Date: Mon, 21 Aug 2017 15:05:59 -0700 Subject: [PATCH] HBASE-18287 Remove log warning in PartitionedMobCompactor.java#getFileStatus --- .../compactions/PartitionedMobCompactor.java | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) 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 da664cdbe4d..c378a884cde 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; } }