hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject hbase git commit: HBASE-13716 use HdfsConstants instead of deprecated FSConstants.
Date Wed, 27 May 2015 21:22:26 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 4cab6963b -> 6529d8833


HBASE-13716 use HdfsConstants instead of deprecated FSConstants.


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

Branch: refs/heads/master
Commit: 6529d8833d965fb201b9fe6927eed425bf31607f
Parents: 4cab696
Author: Sean Busbey <busbey@apache.org>
Authored: Wed May 20 09:09:00 2015 -0500
Committer: Sean Busbey <busbey@cloudera.com>
Committed: Wed May 27 16:15:23 2015 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/master/HMaster.java    | 2 +-
 .../src/main/java/org/apache/hadoop/hbase/util/FSUtils.java  | 8 ++++----
 .../java/org/apache/hadoop/hbase/wal/TestWALFactory.java     | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/6529d883/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
index be11aca..a8f2bca 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/HMaster.java
@@ -1539,7 +1539,7 @@ public class HMaster extends HRegionServer implements MasterServices,
Server {
           // HBASE-5680: Likely hadoop23 vs hadoop 20.x/1.x incompatibility
           if (t instanceof NoClassDefFoundError &&
               t.getMessage()
-                  .contains("org/apache/hadoop/hdfs/protocol/FSConstants$SafeModeAction"))
{
+                  .contains("org/apache/hadoop/hdfs/protocol/HdfsConstants$SafeModeAction"))
{
             // improved error message for this special case
             abort("HBase is having a problem with its Hadoop jars.  You may need to "
               + "recompile HBase against Hadoop version "

http://git-wip-us.apache.org/repos/asf/hbase/blob/6529d883/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
index 3631292..a591cf0 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
@@ -507,7 +507,7 @@ public abstract class FSUtils {
 
   /**
    * We use reflection because {@link DistributedFileSystem#setSafeMode(
-   * FSConstants.SafeModeAction action, boolean isChecked)} is not in hadoop 1.1
+   * HdfsConstants.SafeModeAction action, boolean isChecked)} is not in hadoop 1.1
    *
    * @param dfs
    * @return whether we're in safe mode
@@ -517,15 +517,15 @@ public abstract class FSUtils {
     boolean inSafeMode = false;
     try {
       Method m = DistributedFileSystem.class.getMethod("setSafeMode", new Class<?>
[]{
-          org.apache.hadoop.hdfs.protocol.FSConstants.SafeModeAction.class, boolean.class});
+          org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction.class, boolean.class});
       inSafeMode = (Boolean) m.invoke(dfs,
-        org.apache.hadoop.hdfs.protocol.FSConstants.SafeModeAction.SAFEMODE_GET, true);
+        org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction.SAFEMODE_GET, true);
     } catch (Exception e) {
       if (e instanceof IOException) throw (IOException) e;
 
       // Check whether dfs is on safemode.
       inSafeMode = dfs.setSafeMode(
-        org.apache.hadoop.hdfs.protocol.FSConstants.SafeModeAction.SAFEMODE_GET);
+        org.apache.hadoop.hdfs.protocol.HdfsConstants.SafeModeAction.SAFEMODE_GET);
     }
     return inSafeMode;
   }

http://git-wip-us.apache.org/repos/asf/hbase/blob/6529d883/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFactory.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFactory.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFactory.java
index 968c5c7..c847945 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFactory.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/wal/TestWALFactory.java
@@ -58,7 +58,7 @@ import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.hbase.util.Threads;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
-import org.apache.hadoop.hdfs.protocol.FSConstants;
+import org.apache.hadoop.hdfs.protocol.HdfsConstants;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
@@ -384,7 +384,7 @@ public class TestWALFactory {
     // Stop the cluster.  (ensure restart since we're sharing MiniDFSCluster)
     try {
       DistributedFileSystem dfs = (DistributedFileSystem) cluster.getFileSystem();
-      dfs.setSafeMode(FSConstants.SafeModeAction.SAFEMODE_ENTER);
+      dfs.setSafeMode(HdfsConstants.SafeModeAction.SAFEMODE_ENTER);
       TEST_UTIL.shutdownMiniDFSCluster();
       try {
         // wal.writer.close() will throw an exception,


Mime
View raw message