You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2015/10/23 20:44:33 UTC

[2/2] hbase git commit: HBASE-14580 Make the HBaseMiniCluster compliant with Kerberos

HBASE-14580 Make the HBaseMiniCluster compliant with Kerberos


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

Branch: refs/heads/0.98
Commit: 602884b84098640efc04375cb4f95448358642ad
Parents: 2d68af9
Author: Nicolas Liochon <nk...@gmail.com>
Authored: Tue Oct 13 19:12:23 2015 +0200
Committer: Andrew Purtell <ap...@apache.org>
Committed: Fri Oct 23 11:42:36 2015 -0700

----------------------------------------------------------------------
 .../test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/602884b8/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
index d0aacff..9c1e42c 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java
@@ -2927,7 +2927,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
   /**
    * This method clones the passed <code>c</code> configuration setting a new
    * user into the clone.  Use it getting new instances of FileSystem.  Only
-   * works for DistributedFileSystem.
+   * works for DistributedFileSystem w/o Kerberos.
    * @param c Initial configuration
    * @param differentiatingSuffix Suffix to differentiate this user from others.
    * @return A new configuration instance with a different user set into it.
@@ -2937,7 +2937,7 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
     final String differentiatingSuffix)
   throws IOException {
     FileSystem currentfs = FileSystem.get(c);
-    if (!(currentfs instanceof DistributedFileSystem)) {
+    if (!(currentfs instanceof DistributedFileSystem) || User.isHBaseSecurityEnabled(c)) {
       return User.getCurrent();
     }
     // Else distributed filesystem.  Make a new instance per daemon.  Below