hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [2/4] hbase git commit: HBASE-13282 Fix the minor issues of running Canary on kerberized environment (Srikanth Srungarapu)
Date Fri, 20 Mar 2015 21:27:39 GMT
HBASE-13282 Fix the minor issues of running Canary on kerberized environment (Srikanth Srungarapu)


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

Branch: refs/heads/branch-1.0
Commit: d38433808cd35c2abe8f31398a9e45df1eebdb15
Parents: 7e877ea
Author: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Authored: Fri Mar 20 21:22:29 2015 +0000
Committer: Matteo Bertozzi <matteo.bertozzi@cloudera.com>
Committed: Fri Mar 20 21:22:29 2015 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/AuthUtil.java        | 6 +++---
 .../src/main/java/org/apache/hadoop/hbase/tool/Canary.java     | 4 +++-
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/d3843380/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java
----------------------------------------------------------------------
diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java
index 282b5e3..05107e6 100644
--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java
+++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/AuthUtil.java
@@ -60,10 +60,10 @@ public class AuthUtil {
           conf.get("hbase.client.dns.nameserver", "default")));
       userProvider.login("hbase.client.keytab.file", "hbase.client.kerberos.principal", host);
     } catch (UnknownHostException e) {
-      LOG.error("Error resolving host name");
+      LOG.error("Error resolving host name: " + e.getMessage(), e);
       throw e;
     } catch (IOException e) {
-      LOG.error("Error while trying to perform the initial login");
+      LOG.error("Error while trying to perform the initial login: " + e.getMessage(), e);
       throw e;
     }
 
@@ -93,7 +93,7 @@ public class AuthUtil {
         try {
           ugi.checkTGTAndReloginFromKeytab();
         } catch (IOException e) {
-          LOG.info("Got exception while trying to refresh credentials ");
+          LOG.error("Got exception while trying to refresh credentials: " + e.getMessage(),
e);
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/hbase/blob/d3843380/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
index 23673b6..18ec779 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/tool/Canary.java
@@ -231,6 +231,9 @@ public final class Canary implements Tool {
       }
     }
 
+    // launches chore for refreshing kerberos ticket if security is enabled.
+    AuthUtil.launchAuthChore(conf);
+
     // Start to prepare the stuffs
     Monitor monitor = null;
     Thread monitorThread = null;
@@ -773,7 +776,6 @@ public final class Canary implements Tool {
 
   public static void main(String[] args) throws Exception {
     final Configuration conf = HBaseConfiguration.create();
-    AuthUtil.launchAuthChore(conf);
     int exitCode = ToolRunner.run(conf, new Canary(), args);
     System.exit(exitCode);
   }


Mime
View raw message