aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/parallelai/spyglass
diff options
context:
space:
mode:
authorgalarragas <galarragas@gmail.com>2014-09-03 10:40:13 +0100
committergalarragas <galarragas@gmail.com>2014-09-03 10:40:13 +0100
commit60e2de212ee5a545e0c21d947841dc89d7199f49 (patch)
tree2b5be9427953b962e20ca929b9d5b42d9bb4ee3f /src/main/scala/parallelai/spyglass
parent0c84fc54a6b8e20be20552f63c9787e7fb9f2c6e (diff)
downloadSpyGlass-60e2de212ee5a545e0c21d947841dc89d7199f49.tar.gz
SpyGlass-60e2de212ee5a545e0c21d947841dc89d7199f49.zip
Adding support for Kerberos Authentication
Diffstat (limited to 'src/main/scala/parallelai/spyglass')
-rw-r--r--src/main/scala/parallelai/spyglass/base/JobRunner.scala10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/scala/parallelai/spyglass/base/JobRunner.scala b/src/main/scala/parallelai/spyglass/base/JobRunner.scala
index b3a9af0..632a345 100644
--- a/src/main/scala/parallelai/spyglass/base/JobRunner.scala
+++ b/src/main/scala/parallelai/spyglass/base/JobRunner.scala
@@ -3,7 +3,10 @@ package parallelai.spyglass.base
import org.apache.hadoop.conf.Configuration
import com.twitter.scalding.Tool
import org.apache.hadoop
-
+import org.apache.hadoop.hbase.security.token.TokenUtil
+import org.apache.hadoop.security.UserGroupInformation
+import org.apache.hadoop.hbase.security.User
+
object JobRunner {
def main(args : Array[String]) {
val conf: Configuration = new Configuration
@@ -17,6 +20,11 @@ object JobRunner {
}
AppConfig.jobConfig = conf
+
+ if (User.isHBaseSecurityEnabled(conf)) {
+ println("Obtaining token for HBase security.");
+ TokenUtil.obtainAndCacheToken(conf, UserGroupInformation.getCurrentUser());
+ }
hadoop.util.ToolRunner.run(conf, new Tool, args);
}