hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ser...@apache.org
Subject [1/2] hive git commit: HIVE-12851 : Add slider security setting support to LLAP packager (Sergey Shelukhin, reviewed by Gopal V)
Date Mon, 25 Jan 2016 22:51:45 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2.0 d3954f777 -> 9bf8d00cf
  refs/heads/master f97081bd4 -> 228624b1f


HIVE-12851 : Add slider security setting support to LLAP packager (Sergey Shelukhin, reviewed
by Gopal V)


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

Branch: refs/heads/master
Commit: 228624b1f75f260c55434dbbecbd77e9224bb470
Parents: f97081b
Author: Sergey Shelukhin <sershe@apache.org>
Authored: Mon Jan 25 14:50:53 2016 -0800
Committer: Sergey Shelukhin <sershe@apache.org>
Committed: Mon Jan 25 14:50:53 2016 -0800

----------------------------------------------------------------------
 llap-server/src/main/resources/package.py   | 23 +++++++++++++++++++++--
 llap-server/src/main/resources/templates.py |  5 ++++-
 2 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/228624b1/llap-server/src/main/resources/package.py
----------------------------------------------------------------------
diff --git a/llap-server/src/main/resources/package.py b/llap-server/src/main/resources/package.py
index 20a2510..0204b7b 100644
--- a/llap-server/src/main/resources/package.py
+++ b/llap-server/src/main/resources/package.py
@@ -60,12 +60,28 @@ def main(args):
 	parser.add_argument("--args", default="")
 	parser.add_argument("--name", default="llap0")
 	parser.add_argument("--loglevel", default="INFO")
-	parser.add_argument("--chaosmonkey", type=int, default="0")
+	parser.add_argument("--chaosmonkey", type=int, default=0)
+	parser.add_argument("--slider-keytab-dir", default="")
+	parser.add_argument("--slider-keytab", default="")
+	parser.add_argument("--slider-principal", default="")
+	parser.add_argument("--slider-default-keytab", dest='slider_default_keytab', action='store_true')
+	parser.set_defaults(slider_default_keytab=False)
 	# Unneeded here for now: parser.add_argument("--hiveconf", action='append')
 	#parser.add_argument("--size") parser.add_argument("--xmx") parser.add_argument("--cache")
parser.add_argument("--executors")
 	(args, unknown_args) = parser.parse_known_args(args)
 	input = args.input
 	output = args.output
+	slider_keytab_dir = args.slider_keytab_dir
+	slider_keytab = args.slider_keytab
+	slider_principal = args.slider_principal
+	# set the defaults only if the defaults are enabled
+	if args.slider_default_keytab:
+		if not slider_keytab_dir:
+			slider_keytab_dir = ".slider/keytabs/llap"
+		if not slider_keytab:
+			slider_keytab = "llap.keytab"
+		if not slider_principal:
+			slider_principal = "llap@EXAMPLE.COM"
 	if not input:
 		print "Cannot find input files"
 		sys.exit(1)
@@ -89,7 +105,10 @@ def main(args):
 		"daemon_loglevel" : args.loglevel,
 		"monkey_interval" : args.chaosmonkey,
 		"monkey_percentage" : monkey_percentage,
-		"monkey_enabled" : args.chaosmonkey > 0
+		"monkey_enabled" : args.chaosmonkey > 0,
+		"slider_keytab_dir" : slider_keytab_dir,
+		"slider_keytab" : slider_keytab,
+		"slider_principal" : slider_principal
 	}
 	
 	if not exists(output):

http://git-wip-us.apache.org/repos/asf/hive/blob/228624b1/llap-server/src/main/resources/templates.py
----------------------------------------------------------------------
diff --git a/llap-server/src/main/resources/templates.py b/llap-server/src/main/resources/templates.py
index ed8584b..277a49c 100644
--- a/llap-server/src/main/resources/templates.py
+++ b/llap-server/src/main/resources/templates.py
@@ -88,7 +88,10 @@ appConfig = """
   },
   "components": {
     "slider-appmaster": {
-      "jvm.heapsize": "1024M"
+      "jvm.heapsize": "1024M",
+      "slider.hdfs.keytab.dir": "%(slider_keytab_dir)s",
+      "slider.am.login.keytab.name": "%(slider_keytab)s",
+      "slider.keytab.principal.name": "%(slider_principal)s"
     }
   }
 }


Mime
View raw message