hbase git commit: HBASE-18287 Remove log warning in PartitionedMobCompactor.java#getFileStatus

2017-08-24 Thread huaxiangsun
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 
Authored: Mon Aug 21 15:05:59 2017 -0700
Committer: Huaxiang Sun 
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;
   }
 }



hbase git commit: HBASE-18287 Remove log warning in PartitionedMobCompactor.java#getFileStatus

2017-08-24 Thread huaxiangsun
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 
Authored: Mon Aug 21 15:05:59 2017 -0700
Committer: Huaxiang Sun 
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;
   }
 }