You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by hu...@apache.org on 2017/08/24 21:53:17 UTC
hbase git commit: HBASE-18287 Remove log warning in
PartitionedMobCompactor.java#getFileStatus
Repository: hbase
Updated Branches:
refs/heads/master bd0b0afa6 -> 1a2c38b96
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/1a2c38b9
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/1a2c38b9
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/1a2c38b9
Branch: refs/heads/master
Commit: 1a2c38b9650a0b0d0da74e7db311a51b42ba859d
Parents: bd0b0af
Author: Huaxiang Sun <hu...@apache.org>
Authored: Mon Aug 21 15:05:59 2017 -0700
Committer: Huaxiang Sun <hu...@apache.org>
Committed: Thu Aug 24 14:43:44 2017 -0700
----------------------------------------------------------------------
.../compactions/PartitionedMobCompactor.java | 23 +++++++++-----------
1 file changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/1a2c38b9/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;
}
}