hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l...@apache.org
Subject hbase git commit: HBASE-17474 Reduce frequency of NoSuchMethodException when calling setStoragePolicy()
Date Tue, 17 Jan 2017 23:33:27 GMT
Repository: hbase
Updated Branches:
  refs/heads/master faa9f735c -> 287f95a57


HBASE-17474 Reduce frequency of NoSuchMethodException when calling setStoragePolicy()


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/287f95a5
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/287f95a5
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/287f95a5

Branch: refs/heads/master
Commit: 287f95a579ee95a40e0f3a0986a246d29718ee3b
Parents: faa9f73
Author: Yu Li <liyu@apache.org>
Authored: Wed Jan 18 07:30:21 2017 +0800
Committer: Yu Li <liyu@apache.org>
Committed: Wed Jan 18 07:30:21 2017 +0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/287f95a5/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
index 6fd1764..e3d39ff 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
@@ -38,6 +38,7 @@ import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
+import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.LocatedFileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsPermission;
@@ -196,7 +197,9 @@ public class HRegionFileSystem {
     try {
       ReflectionUtils.invokeMethod(this.fs, "setStoragePolicy", storeDir, policyName);
     } catch (Exception e) {
-      LOG.warn("Failed to set storage policy of [" + storeDir + "] to [" + policyName + "]",
e);
+      if (!(this.fs instanceof LocalFileSystem)) {
+        LOG.warn("Failed to set storage policy of [" + storeDir + "] to [" + policyName +
"]", e);
+      }
     }
   }
 


Mime
View raw message