From d26a8f98f9800549c25cb454a5a57cfe4a45926d Mon Sep 17 00:00:00 2001 From: galarragas Date: Wed, 3 Sep 2014 11:22:21 +0100 Subject: Changed version number to prepare for release and added kerberos authentication support to JobRunner --- src/main/scala/parallelai/spyglass/base/JobRunner.scala | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/main/scala/parallelai/spyglass') diff --git a/src/main/scala/parallelai/spyglass/base/JobRunner.scala b/src/main/scala/parallelai/spyglass/base/JobRunner.scala index b3a9af0..3069051 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,7 +20,12 @@ 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); } } \ No newline at end of file -- cgit v1.2.3