[3/5] ambari git commit: AMBARI-20563. Zeppelin : livy2 interpreter is not getting created by default.(Renjith Kamath via gauravn7)

2017-04-04 Thread rkamath
AMBARI-20563. Zeppelin : livy2 interpreter is not getting created by 
default.(Renjith Kamath via gauravn7)


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

Branch: refs/heads/branch-2.5
Commit: 83e738fe408dc5d6420d7e14a0936288ad9a816f
Parents: af55ef7
Author: Gaurav Nagar 
Authored: Sun Mar 26 01:08:07 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Apr 4 12:20:43 2017 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/83e738fe/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 143d618..ee693b6 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -311,7 +311,7 @@ class Master(Script):
   config_id = spark2_config["id"]
   interpreter_settings[config_id] = spark2_config
 
-if 'livy2-defaults' in params.config['configurations']:
+if params.livy2_livyserver_host:
   livy2_config = self.get_livy2_interpreter_config()
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config



[2/5] ambari git commit: AMBARI-20539. Interpreters that are not listed under zeppelin.interpreter.group.order in zeppelin-site.xml should not get installed. (Prabhjyot Singh via gauravn7)

2017-04-04 Thread rkamath
AMBARI-20539. Interpreters that are not listed under 
zeppelin.interpreter.group.order in zeppelin-site.xml should not get installed. 
(Prabhjyot Singh via gauravn7)


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

Branch: refs/heads/branch-2.5
Commit: af55ef7a8e5fe986660a7c741c18ab9e9d1cabd4
Parents: f6030f5
Author: Gaurav Nagar 
Authored: Fri Mar 24 19:49:38 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Apr 4 12:20:38 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml  | 7 +++
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 5 +
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py  | 1 +
 ambari-server/src/test/python/stacks/2.6/configs/default.json | 3 ++-
 4 files changed, 15 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
index 039c701..85f1859 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-config.xml
@@ -93,6 +93,13 @@
 
   
   
+zeppelin.interpreter.group.order
+spark,angular,jdbc,livy,md,sh
+Comma separated interpreter configurations. First interpreter 
become default
+
+
+  
+  
 zeppelin.interpreter.connect.timeout
 3
 Interpreter process connect timeout in msec.

http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index be2f96c..143d618 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -301,6 +301,11 @@ class Master(Script):
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 
+for setting_key in interpreter_settings.keys():
+  interpreter = interpreter_settings[setting_key]
+  if not (interpreter['group'] in params.zeppelin_interpreter):
+del interpreter_settings[setting_key]
+
 if 'spark2-defaults' in params.config['configurations']:
   spark2_config = self.get_spark2_interpreter_config()
   config_id = spark2_config["id"]

http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 9dfdea6..8ba1528 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -84,6 +84,7 @@ stack_name = default("/hostLevelParams/stack_name", None)
 
 # params from zeppelin-config
 zeppelin_port = 
str(config['configurations']['zeppelin-config']['zeppelin.server.port'])
+zeppelin_interpreter = 
str(config['configurations']['zeppelin-config']['zeppelin.interpreter.group.order']).split(",")
 
 # params from zeppelin-env
 zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']

http://git-wip-us.apache.org/repos/asf/ambari/blob/af55ef7a/ambari-server/src/test/python/stacks/2.6/configs/default.json
--
diff --git a/ambari-server/src/test/python/stacks/2.6/configs/default.json 
b/ambari-server/src/test/python/stacks/2.6/configs/default.json
index a1f89ce..54000e6 100644
--- a/ambari-server/src/test/python/stacks/2.6/configs/default.json
+++ 

[1/5] ambari git commit: AMBARI-20538: zeppelin spark/spark2 failing due to failure to initialize spark context (Prabhjyot Singh via r-kamath)

2017-04-04 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 fb05bc7ed -> c8e937afe


AMBARI-20538: zeppelin spark/spark2 failing due to failure to initialize spark 
context (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: f6030f57671ddf80ee7149e269396342860149ec
Parents: fb05bc7
Author: Renjith Kamath 
Authored: Fri Mar 24 09:48:35 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Apr 4 12:20:32 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f6030f57/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 65c7f2b..be2f96c 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -162,14 +162,6 @@ class Master(Script):
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
 self.create_zeppelin_hdfs_conf_dir(env)
-# copy hive-site.xml only if Spark 1.x is installed
-if 'spark-defaults' in params.config['configurations'] and 
params.is_hive_installed:
-  XmlConfig("hive-site.xml",
-  conf_dir=params.external_dependency_conf,
-  configurations=params.spark_hive_properties,
-  owner=params.zeppelin_user,
-  group=params.zeppelin_group,
-  mode=0644)
 
 if len(params.hbase_master_hosts) > 0 and params.is_hbase_installed:
   # copy hbase-site.xml



[4/5] ambari git commit: AMBARI-20564: configuring Zeppelin's JDBC-phoenix interpreter requires hdfs-site.xml, core-site.xml as well (Prabhjyot Singh via r-kamath)

2017-04-04 Thread rkamath
AMBARI-20564: configuring Zeppelin's JDBC-phoenix interpreter requires 
hdfs-site.xml, core-site.xml as well (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: c486a4a4671caffa17c5e155bc7290cc78b8d6ee
Parents: 83e738f
Author: Renjith Kamath 
Authored: Mon Mar 27 11:09:53 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Apr 4 12:20:48 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c486a4a4/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index ee693b6..82b67fb 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -171,8 +171,23 @@ class Master(Script):
   
configuration_attributes=params.config['configuration_attributes']['hbase-site'],
   owner=params.zeppelin_user,
   group=params.zeppelin_group,
-  mode=0644
-  )
+  mode=0644)
+
+  XmlConfig("hdfs-site.xml",
+conf_dir=params.external_dependency_conf,
+configurations=params.config['configurations']['hdfs-site'],
+
configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+owner=params.zeppelin_user,
+group=params.zeppelin_group,
+mode=0644)
+
+  XmlConfig("core-site.xml",
+conf_dir=params.external_dependency_conf,
+configurations=params.config['configurations']['core-site'],
+
configuration_attributes=params.config['configuration_attributes']['core-site'],
+owner=params.zeppelin_user,
+group=params.zeppelin_group,
+mode=0644)
 
   def stop(self, env, upgrade_type=None):
 import params



[5/5] ambari git commit: AMBARI-20539. Interpreters that are not listed under "zeppelin.interpreter.group.order" in zeppelin-site.xml should not get installed. (Prabhjyot Singh via r-kamath)

2017-04-04 Thread rkamath
AMBARI-20539. Interpreters that are not listed under 
"zeppelin.interpreter.group.order" in zeppelin-site.xml should not get 
installed. (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: c8e937afef980c4f879969f3b8339bb11de2083b
Parents: c486a4a
Author: Renjith Kamath 
Authored: Mon Mar 27 15:16:00 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Apr 4 12:20:54 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py| 16 ++--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py|  5 -
 2 files changed, 14 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c8e937af/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 82b67fb..fbf2246 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -81,7 +81,7 @@ class Master(Script):
 )
 
 spark_deps_full_path = self.get_zeppelin_spark_dependencies()[0]
-spark_dep_file_name = os.path.basename(spark_deps_full_path);
+spark_dep_file_name = os.path.basename(spark_deps_full_path)
 
 params.HdfsResource(params.spark_jar_dir + "/" + spark_dep_file_name,
 type="file",
@@ -316,11 +316,6 @@ class Master(Script):
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 
-for setting_key in interpreter_settings.keys():
-  interpreter = interpreter_settings[setting_key]
-  if not (interpreter['group'] in params.zeppelin_interpreter):
-del interpreter_settings[setting_key]
-
 if 'spark2-defaults' in params.config['configurations']:
   spark2_config = self.get_spark2_interpreter_config()
   config_id = spark2_config["id"]
@@ -331,6 +326,15 @@ class Master(Script):
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config
 
+if params.zeppelin_interpreter:
+  settings_to_delete = []
+  for settings_key, interpreter in interpreter_settings.items():
+if interpreter['group'] not in params.zeppelin_interpreter:
+  settings_to_delete.append(settings_key)
+
+  for key in settings_to_delete:
+del interpreter_settings[key]
+
 hive_interactive_properties_key = 'hive_interactive'
 for setting_key in interpreter_settings.keys():
   interpreter = interpreter_settings[setting_key]

http://git-wip-us.apache.org/repos/asf/ambari/blob/c8e937af/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 8ba1528..fe3bbfb 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -84,7 +84,10 @@ stack_name = default("/hostLevelParams/stack_name", None)
 
 # params from zeppelin-config
 zeppelin_port = 
str(config['configurations']['zeppelin-config']['zeppelin.server.port'])
-zeppelin_interpreter = 
str(config['configurations']['zeppelin-config']['zeppelin.interpreter.group.order']).split(",")
+zeppelin_interpreter = None
+if 'zeppelin.interpreter.group.order' in 
config['configurations']['zeppelin-config']:
+  zeppelin_interpreter = str(config['configurations']['zeppelin-config']
+ ['zeppelin.interpreter.group.order']).split(",")
 
 # params from zeppelin-env
 zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']



[1/2] ambari git commit: AMBARI-20643: Remove configuring JDBC dependencies that are getting configured for Zeppelin interpreter as it causes more confusion than the resolution. (Prabhjyot Singh via r

2017-03-31 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 adbc4e848 -> 52fdbb9d0
  refs/heads/trunk f615c6760 -> d245d1ee3


AMBARI-20643: Remove configuring JDBC dependencies that are getting configured 
for Zeppelin interpreter as it causes more confusion than the resolution. 
(Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: d245d1ee3f992a64cb086a6e3692ad8712814845
Parents: f615c67
Author: Renjith Kamath 
Authored: Fri Mar 31 20:07:09 2017 +0530
Committer: Renjith Kamath 
Committed: Fri Mar 31 20:07:09 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d245d1ee/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 2b21f8f..fbf2246 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -371,13 +371,6 @@ class Master(Script):
 
params.hive_server_interactive_hosts + \
 ':' + 
params.hive_server_port
 
-if params.hive_server_host or params.hive_server_interactive_hosts:
-  interpreter['dependencies'].append(
-{"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", 
"local": "false"})
-  interpreter['dependencies'].append(
-{"groupArtifactVersion": "org.apache.hadoop:hadoop-common:2.7.2", 
"local": "false"})
-  interpreter['dependencies'].append(
-{"groupArtifactVersion": 
"org.apache.hive.shims:hive-shims-0.23:2.1.0", "local": "false"})
 
 if params.zookeeper_znode_parent \
 and params.hbase_zookeeper_quorum:
@@ -388,8 +381,7 @@ class Master(Script):
 interpreter['properties']['phoenix.url'] = "jdbc:phoenix:" + \
 
params.hbase_zookeeper_quorum + ':' + \
 
params.zookeeper_znode_parent
-interpreter['dependencies'].append(
-{"groupArtifactVersion": 
"org.apache.phoenix:phoenix-core:4.7.0-HBase-1.1", "local": "false"})
+
   elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy':
 if params.livy_livyserver_host:
   interpreter['properties']['zeppelin.livy.url'] = "http://; + 
params.livy_livyserver_host + \



[2/2] ambari git commit: AMBARI-20643: Remove configuring JDBC dependencies that are getting configured for Zeppelin interpreter as it causes more confusion than the resolution. (Prabhjyot Singh via r

2017-03-31 Thread rkamath
AMBARI-20643: Remove configuring JDBC dependencies that are getting configured 
for Zeppelin interpreter as it causes more confusion than the resolution. 
(Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 52fdbb9d03a7af8f3db5f61ee7266868a03d65e0
Parents: adbc4e8
Author: Renjith Kamath 
Authored: Fri Mar 31 20:07:09 2017 +0530
Committer: Renjith Kamath 
Committed: Fri Mar 31 20:08:54 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/52fdbb9d/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 38bfeb4..65c7f2b 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -355,13 +355,6 @@ class Master(Script):
 
params.hive_server_interactive_hosts + \
 ':' + 
params.hive_server_port
 
-if params.hive_server_host or params.hive_server_interactive_hosts:
-  interpreter['dependencies'].append(
-{"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", 
"local": "false"})
-  interpreter['dependencies'].append(
-{"groupArtifactVersion": "org.apache.hadoop:hadoop-common:2.7.2", 
"local": "false"})
-  interpreter['dependencies'].append(
-{"groupArtifactVersion": 
"org.apache.hive.shims:hive-shims-0.23:2.1.0", "local": "false"})
 
 if params.zookeeper_znode_parent \
 and params.hbase_zookeeper_quorum:
@@ -372,8 +365,7 @@ class Master(Script):
 interpreter['properties']['phoenix.url'] = "jdbc:phoenix:" + \
 
params.hbase_zookeeper_quorum + ':' + \
 
params.zookeeper_znode_parent
-interpreter['dependencies'].append(
-{"groupArtifactVersion": 
"org.apache.phoenix:phoenix-core:4.7.0-HBase-1.1", "local": "false"})
+
   elif interpreter['group'] == 'livy' and interpreter['name'] == 'livy':
 if params.livy_livyserver_host:
   interpreter['properties']['zeppelin.livy.url'] = "http://; + 
params.livy_livyserver_host + \



ambari git commit: AMBARI-20539. Interpreters that are not listed under "zeppelin.interpreter.group.order" in zeppelin-site.xml should not get installed. (Prabhjyot Singh via r-kamath)

2017-03-27 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk d8693986a -> b7d5ef70a


AMBARI-20539. Interpreters that are not listed under 
"zeppelin.interpreter.group.order" in zeppelin-site.xml should not get 
installed. (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: b7d5ef70afec253f4269ac8a6073c1d5a4164968
Parents: d869398
Author: Renjith Kamath 
Authored: Mon Mar 27 15:16:00 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Mar 27 15:16:00 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py| 16 ++--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/params.py|  5 -
 2 files changed, 14 insertions(+), 7 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d5ef70/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index c3521c5..2b21f8f 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -81,7 +81,7 @@ class Master(Script):
 )
 
 spark_deps_full_path = self.get_zeppelin_spark_dependencies()[0]
-spark_dep_file_name = os.path.basename(spark_deps_full_path);
+spark_dep_file_name = os.path.basename(spark_deps_full_path)
 
 params.HdfsResource(params.spark_jar_dir + "/" + spark_dep_file_name,
 type="file",
@@ -316,11 +316,6 @@ class Master(Script):
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 
-for setting_key in interpreter_settings.keys():
-  interpreter = interpreter_settings[setting_key]
-  if not (interpreter['group'] in params.zeppelin_interpreter):
-del interpreter_settings[setting_key]
-
 if 'spark2-defaults' in params.config['configurations']:
   spark2_config = self.get_spark2_interpreter_config()
   config_id = spark2_config["id"]
@@ -331,6 +326,15 @@ class Master(Script):
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config
 
+if params.zeppelin_interpreter:
+  settings_to_delete = []
+  for settings_key, interpreter in interpreter_settings.items():
+if interpreter['group'] not in params.zeppelin_interpreter:
+  settings_to_delete.append(settings_key)
+
+  for key in settings_to_delete:
+del interpreter_settings[key]
+
 hive_interactive_properties_key = 'hive_interactive'
 for setting_key in interpreter_settings.keys():
   interpreter = interpreter_settings[setting_key]

http://git-wip-us.apache.org/repos/asf/ambari/blob/b7d5ef70/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 6ba2a87..2340df9 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -84,7 +84,10 @@ stack_name = default("/hostLevelParams/stack_name", None)
 
 # params from zeppelin-config
 zeppelin_port = 
str(config['configurations']['zeppelin-config']['zeppelin.server.port'])
-zeppelin_interpreter = 
str(config['configurations']['zeppelin-config']['zeppelin.interpreter.group.order']).split(",")
+zeppelin_interpreter = None
+if 'zeppelin.interpreter.group.order' in 
config['configurations']['zeppelin-config']:
+  zeppelin_interpreter = str(config['configurations']['zeppelin-config']
+ ['zeppelin.interpreter.group.order']).split(",")
 
 # params from zeppelin-env
 zeppelin_user = config['configurations']['zeppelin-env']['zeppelin_user']



ambari git commit: AMBARI-20564: configuring Zeppelin's JDBC-phoenix interpreter requires hdfs-site.xml, core-site.xml as well (Prabhjyot Singh via r-kamath)

2017-03-26 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 55fdd7d98 -> 3cfc047e6


AMBARI-20564: configuring Zeppelin's JDBC-phoenix interpreter requires 
hdfs-site.xml, core-site.xml as well (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: 3cfc047e65ab2d23d5ffd59d9da521bdfd71f963
Parents: 55fdd7d
Author: Renjith Kamath 
Authored: Mon Mar 27 11:09:53 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Mar 27 11:09:53 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 19 +--
 1 file changed, 17 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3cfc047e/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index db601d2..c3521c5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -171,8 +171,23 @@ class Master(Script):
   
configuration_attributes=params.config['configuration_attributes']['hbase-site'],
   owner=params.zeppelin_user,
   group=params.zeppelin_group,
-  mode=0644
-  )
+  mode=0644)
+
+  XmlConfig("hdfs-site.xml",
+conf_dir=params.external_dependency_conf,
+configurations=params.config['configurations']['hdfs-site'],
+
configuration_attributes=params.config['configuration_attributes']['hdfs-site'],
+owner=params.zeppelin_user,
+group=params.zeppelin_group,
+mode=0644)
+
+  XmlConfig("core-site.xml",
+conf_dir=params.external_dependency_conf,
+configurations=params.config['configurations']['core-site'],
+
configuration_attributes=params.config['configuration_attributes']['core-site'],
+owner=params.zeppelin_user,
+group=params.zeppelin_group,
+mode=0644)
 
   def stop(self, env, upgrade_type=None):
 import params



ambari git commit: AMBARI-20538: zeppelin spark/spark2 failing due to failure to initialize spark context (Prabhjyot Singh via r-kamath)

2017-03-23 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk bbe591825 -> e5bb3afba


AMBARI-20538: zeppelin spark/spark2 failing due to failure to initialize spark 
context (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: e5bb3afbac724dcbdb4306a4cc256b8baf473985
Parents: bbe5918
Author: Renjith Kamath 
Authored: Fri Mar 24 09:48:35 2017 +0530
Committer: Renjith Kamath 
Committed: Fri Mar 24 09:48:35 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e5bb3afb/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 38bfeb4..575f7bc 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -162,14 +162,6 @@ class Master(Script):
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
 self.create_zeppelin_hdfs_conf_dir(env)
-# copy hive-site.xml only if Spark 1.x is installed
-if 'spark-defaults' in params.config['configurations'] and 
params.is_hive_installed:
-  XmlConfig("hive-site.xml",
-  conf_dir=params.external_dependency_conf,
-  configurations=params.spark_hive_properties,
-  owner=params.zeppelin_user,
-  group=params.zeppelin_group,
-  mode=0644)
 
 if len(params.hbase_master_hosts) > 0 and params.is_hbase_installed:
   # copy hbase-site.xml



[2/2] ambari git commit: AMBARI-20439 Zeppelin: service def not using the correct value from hive.server2.support.dynamic.service.discovery for Hive interpreter config (r-kamath)

2017-03-16 Thread rkamath
AMBARI-20439 Zeppelin: service def not using the correct value from 
hive.server2.support.dynamic.service.discovery for Hive interpreter config 
(r-kamath)


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

Branch: refs/heads/trunk
Commit: 96009189cbc5b21d4279c9d7d59a110315b688fd
Parents: 167e111
Author: Renjith Kamath 
Authored: Thu Mar 16 15:07:01 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 16 15:08:15 2017 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py   | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/96009189/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 8f06a17..0a0acdb 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -145,6 +145,8 @@ if 'hive_server_interactive_hosts' in master_configs and 
len(master_configs['hiv
 hive_server_interactive_hosts = 
str(master_configs['hive_server_interactive_hosts'][0])
 hive_interactive_zookeeper_namespace = 
config['configurations']['hive-interactive-site']['hive.server2.zookeeper.namespace']
 hive_server_port = 
str(config['configurations']['hive-site']['hive.server2.thrift.http.port'])
+hive_zookeeper_quorum = 
config['configurations']['hive-site']['hive.zookeeper.quorum']
+hive_server2_support_dynamic_service_discovery = 
config['configurations']['hive-site']['hive.server2.support.dynamic.service.discovery']
 
 # detect hbase details if installed
 zookeeper_znode_parent = None



[1/2] ambari git commit: AMBARI-20439 Zeppelin: service def not using the correct value from hive.server2.support.dynamic.service.discovery for Hive interpreter config (r-kamath)

2017-03-16 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 cd6f14872 -> df0ef09d6
  refs/heads/trunk 167e111bd -> 96009189c


AMBARI-20439 Zeppelin: service def not using the correct value from 
hive.server2.support.dynamic.service.discovery for Hive interpreter config 
(r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: df0ef09d692bb23986c1bd3c892addb30b4de9f5
Parents: cd6f148
Author: Renjith Kamath 
Authored: Thu Mar 16 15:07:01 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 16 15:07:01 2017 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py   | 2 ++
 1 file changed, 2 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/df0ef09d/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index fdc96db..9dfdea6 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -145,6 +145,8 @@ if 'hive_server_interactive_hosts' in master_configs and 
len(master_configs['hiv
 hive_server_interactive_hosts = 
str(master_configs['hive_server_interactive_hosts'][0])
 hive_interactive_zookeeper_namespace = 
config['configurations']['hive-interactive-site']['hive.server2.zookeeper.namespace']
 hive_server_port = 
str(config['configurations']['hive-site']['hive.server2.thrift.http.port'])
+hive_zookeeper_quorum = 
config['configurations']['hive-site']['hive.zookeeper.quorum']
+hive_server2_support_dynamic_service_discovery = 
config['configurations']['hive-site']['hive.server2.support.dynamic.service.discovery']
 
 # detect hbase details if installed
 zookeeper_znode_parent = None



[1/2] ambari git commit: AMBARI-20200 hive-site.xml, hbase-site.xml, etc. are not found in class path for Zeppelin (Prabhjyot Singh via r-kamath)

2017-03-15 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 85bf4a077 -> a558e978d
  refs/heads/trunk 5fb35c94b -> 5d20ccd23


AMBARI-20200 hive-site.xml, hbase-site.xml, etc. are not found in class path 
for Zeppelin (Prabhjyot Singh via r-kamath)

- adding condition for stack upgrade


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

Branch: refs/heads/branch-2.5
Commit: a558e978dc70875c405b27c8d7e30cae5ccc9c5f
Parents: 85bf4a0
Author: Renjith Kamath 
Authored: Wed Mar 15 16:55:35 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Mar 15 16:55:35 2017 +0530

--
 .../stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a558e978/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
index 1f65fac..94b1d57 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
@@ -89,6 +89,7 @@ export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
 # export ZEPPELIN_NOTEBOOK_STORAGE# Refers to pluggable notebook 
storage class, can have two classes simultaneously with a sync between them 
(e.g. local and remote).
 # export ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC   # If there are multiple notebook 
storages, should we treat the first one as the only source of truth?
 # export ZEPPELIN_NOTEBOOK_PUBLIC # Make notebook public by 
default when created, private otherwise
+export ZEPPELIN_INTP_CLASSPATH_OVERRIDES="{{external_dependency_conf}}"
 
  Spark interpreter configuration 
 



[2/2] ambari git commit: AMBARI-20200 hive-site.xml, hbase-site.xml, etc. are not found in class path for Zeppelin (Prabhjyot Singh via r-kamath)

2017-03-15 Thread rkamath
AMBARI-20200 hive-site.xml, hbase-site.xml, etc. are not found in class path 
for Zeppelin (Prabhjyot Singh via r-kamath)

- adding condition for stack upgrade


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

Branch: refs/heads/trunk
Commit: 5d20ccd2392798c6f2b772b569606723b2342f8b
Parents: 5fb35c9
Author: Renjith Kamath 
Authored: Wed Mar 15 16:55:35 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Mar 15 16:58:05 2017 +0530

--
 .../stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml | 1 +
 1 file changed, 1 insertion(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5d20ccd2/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
index 1f65fac..94b1d57 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/configuration/zeppelin-env.xml
@@ -89,6 +89,7 @@ export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
 # export ZEPPELIN_NOTEBOOK_STORAGE# Refers to pluggable notebook 
storage class, can have two classes simultaneously with a sync between them 
(e.g. local and remote).
 # export ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC   # If there are multiple notebook 
storages, should we treat the first one as the only source of truth?
 # export ZEPPELIN_NOTEBOOK_PUBLIC # Make notebook public by 
default when created, private otherwise
+export ZEPPELIN_INTP_CLASSPATH_OVERRIDES="{{external_dependency_conf}}"
 
  Spark interpreter configuration 
 



[2/2] ambari git commit: AMBARI-20397 Zeppelin: Spark2 and Livy2 interpreter config disappear during stack upgrade (r-kamath)

2017-03-14 Thread rkamath
AMBARI-20397 Zeppelin: Spark2 and Livy2 interpreter config disappear during 
stack upgrade (r-kamath)


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

Branch: refs/heads/trunk
Commit: 645407b65558110a5fa6306c034d73c09ba2bfe6
Parents: efd3b58
Author: Renjith Kamath 
Authored: Tue Mar 14 14:36:12 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Mar 14 14:37:15 2017 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/645407b6/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index a460aec..38bfeb4 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -309,12 +309,12 @@ class Master(Script):
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 
-if 'spark2-env' in params.config['configurations']:
+if 'spark2-defaults' in params.config['configurations']:
   spark2_config = self.get_spark2_interpreter_config()
   config_id = spark2_config["id"]
   interpreter_settings[config_id] = spark2_config
 
-if 'livy2-env' in params.config['configurations']:
+if 'livy2-defaults' in params.config['configurations']:
   livy2_config = self.get_livy2_interpreter_config()
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config



[1/2] ambari git commit: AMBARI-20397 Zeppelin: Spark2 and Livy2 interpreter config disappear during stack upgrade (r-kamath)

2017-03-14 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 b6b8e1c7a -> bf03c8ee2
  refs/heads/trunk efd3b5847 -> 645407b65


AMBARI-20397 Zeppelin: Spark2 and Livy2 interpreter config disappear during 
stack upgrade (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: bf03c8ee2ce1e678d2f8241244aba8e54bf6b807
Parents: b6b8e1c
Author: Renjith Kamath 
Authored: Tue Mar 14 14:36:12 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Mar 14 14:36:12 2017 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/bf03c8ee/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index a460aec..38bfeb4 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -309,12 +309,12 @@ class Master(Script):
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
 
-if 'spark2-env' in params.config['configurations']:
+if 'spark2-defaults' in params.config['configurations']:
   spark2_config = self.get_spark2_interpreter_config()
   config_id = spark2_config["id"]
   interpreter_settings[config_id] = spark2_config
 
-if 'livy2-env' in params.config['configurations']:
+if 'livy2-defaults' in params.config['configurations']:
   livy2_config = self.get_livy2_interpreter_config()
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config



ambari git commit: AMBARI-20362: Enable Authentication in Zeppelin out of Box (Prabhjyot Singh via r-kamath)

2017-03-09 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 7ff9bd429 -> 3db5addb9


AMBARI-20362: Enable Authentication in Zeppelin out of Box (Prabhjyot Singh via 
r-kamath)


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

Branch: refs/heads/trunk
Commit: 3db5addb9322b944ed8cc33264ffb505241ba281
Parents: 7ff9bd4
Author: Renjith Kamath 
Authored: Thu Mar 9 20:40:19 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 9 20:42:28 2017 +0530

--
 .../configuration/zeppelin-shiro-ini.xml| 71 ++--
 1 file changed, 49 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3db5addb/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
index 3e2da1e..971e4af 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
@@ -24,39 +24,66 @@
 [users]
 # List of users with their password allowed to access Zeppelin.
 # To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
-#admin = password1
-#user1 = password2, role1, role2
-#user2 = password3, role3
-#user3 = password4, role2
+admin = admin, admin
+user1 = user1, role1, role2
+user2 = user2, role3
+user3 = user3, role2
 
 # Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
 [main]
-#activeDirectoryRealm = org.apache.zeppelin.server.ActiveDirectoryGroupRealm
-#activeDirectoryRealm.systemUsername = 
CN=Administrator,CN=Users,DC=HW,DC=EXAMPLE,DC=COM
-#activeDirectoryRealm.systemPassword = Password1!
-#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://user/zeppelin/zeppelin.jceks
-#activeDirectoryRealm.searchBase = CN=Users,DC=HW,DC=TEST,DC=COM
-#activeDirectoryRealm.url = ldap://ad-nano.test.example.com:389
-#activeDirectoryRealm.groupRolesMap = ""
-#activeDirectoryRealm.authorizationCachingEnabled = true
-
-#ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
-#ldapRealm.userDnTemplate = uid={0},cn=users,cn=accounts,dc=example,dc=com
-#ldapRealm.contextFactory.url = ldap://ldaphost:389
+### A sample for configuring Active Directory Realm
+#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
+#activeDirectoryRealm.systemUsername = userNameA
+
+#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
+#activeDirectoryRealm.systemPassword = passwordA
+#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
+#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
+#activeDirectoryRealm.url = ldap://ldap.test.com:389
+#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
+#activeDirectoryRealm.authorizationCachingEnabled = false
+
+### A sample for configuring LDAP Directory Realm
+#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
+## search base for ldap groups (only relevant for LdapGroupRealm):
+#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
+#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
+#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
 #ldapRealm.contextFactory.authenticationMechanism = SIMPLE
-#sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
-#securityManager.sessionManager = $sessionManager
+
+### A sample PAM configuration
+#pamRealm=org.apache.zeppelin.realm.PamRealm
+#pamRealm.service=sshd
+
+
+sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
+### If caching of user is required then uncomment below lines
+cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
+securityManager.cacheManager = $cacheManager
+
+securityManager.sessionManager = $sessionManager
 # 86,400,000 milliseconds = 24 hour
-#securityManager.sessionManager.globalSessionTimeout = 8640
+securityManager.sessionManager.globalSessionTimeout 

ambari git commit: AMBARI-20362: Enable Authentication in Zeppelin out of Box (Prabhjyot Singh via r-kamath)

2017-03-09 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 c47662934 -> 47f924334


AMBARI-20362: Enable Authentication in Zeppelin out of Box (Prabhjyot Singh via 
r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 47f924334b850e572298fbd8700a993cdb19065c
Parents: c476629
Author: Renjith Kamath 
Authored: Thu Mar 9 20:40:19 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 9 20:40:19 2017 +0530

--
 .../configuration/zeppelin-shiro-ini.xml| 71 ++--
 1 file changed, 49 insertions(+), 22 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/47f92433/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
index 3e2da1e..971e4af 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-shiro-ini.xml
@@ -24,39 +24,66 @@
 [users]
 # List of users with their password allowed to access Zeppelin.
 # To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
-#admin = password1
-#user1 = password2, role1, role2
-#user2 = password3, role3
-#user3 = password4, role2
+admin = admin, admin
+user1 = user1, role1, role2
+user2 = user2, role3
+user3 = user3, role2
 
 # Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
 [main]
-#activeDirectoryRealm = org.apache.zeppelin.server.ActiveDirectoryGroupRealm
-#activeDirectoryRealm.systemUsername = 
CN=Administrator,CN=Users,DC=HW,DC=EXAMPLE,DC=COM
-#activeDirectoryRealm.systemPassword = Password1!
-#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://user/zeppelin/zeppelin.jceks
-#activeDirectoryRealm.searchBase = CN=Users,DC=HW,DC=TEST,DC=COM
-#activeDirectoryRealm.url = ldap://ad-nano.test.example.com:389
-#activeDirectoryRealm.groupRolesMap = ""
-#activeDirectoryRealm.authorizationCachingEnabled = true
-
-#ldapRealm = org.apache.shiro.realm.ldap.JndiLdapRealm
-#ldapRealm.userDnTemplate = uid={0},cn=users,cn=accounts,dc=example,dc=com
-#ldapRealm.contextFactory.url = ldap://ldaphost:389
+### A sample for configuring Active Directory Realm
+#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
+#activeDirectoryRealm.systemUsername = userNameA
+
+#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
+#activeDirectoryRealm.systemPassword = passwordA
+#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
+#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
+#activeDirectoryRealm.url = ldap://ldap.test.com:389
+#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
+#activeDirectoryRealm.authorizationCachingEnabled = false
+
+### A sample for configuring LDAP Directory Realm
+#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
+## search base for ldap groups (only relevant for LdapGroupRealm):
+#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
+#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
+#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
 #ldapRealm.contextFactory.authenticationMechanism = SIMPLE
-#sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
-#securityManager.sessionManager = $sessionManager
+
+### A sample PAM configuration
+#pamRealm=org.apache.zeppelin.realm.PamRealm
+#pamRealm.service=sshd
+
+
+sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
+### If caching of user is required then uncomment below lines
+cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
+securityManager.cacheManager = $cacheManager
+
+securityManager.sessionManager = $sessionManager
 # 86,400,000 milliseconds = 24 hour
-#securityManager.sessionManager.globalSessionTimeout = 8640

ambari git commit: AMBARI-20367: Update Zeppelin version on Ambari-2.5 from 0.6.2 to 0.7.0 (Prabhjyot Singh via r-kamath)

2017-03-09 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 4534e0a5a -> e1cdfe449


AMBARI-20367: Update Zeppelin version on Ambari-2.5 from 0.6.2 to 0.7.0 
(Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: e1cdfe4492c9bd8d9aa1a4151af5badfd93e6d95
Parents: 4534e0a
Author: Renjith Kamath 
Authored: Thu Mar 9 19:57:06 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 9 19:59:28 2017 +0530

--
 .../main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e1cdfe44/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
index 59a0ae8..2e2996b 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
@@ -21,7 +21,7 @@
   
 
   ZEPPELIN
-  0.6.2
+  0.7.0
 
   
 



ambari git commit: AMBARI-20367: Update Zeppelin version on Ambari-2.5 from 0.6.2 to 0.7.0 (Prabhjyot Singh via r-kamath)

2017-03-09 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 0ca474786 -> 573907754


AMBARI-20367: Update Zeppelin version on Ambari-2.5 from 0.6.2 to 0.7.0 
(Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: 573907754e6743729f4788187850ef844a95aaf7
Parents: 0ca4747
Author: Renjith Kamath 
Authored: Thu Mar 9 19:57:06 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 9 19:58:23 2017 +0530

--
 .../main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/57390775/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
index 59a0ae8..2e2996b 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
@@ -21,7 +21,7 @@
   
 
   ZEPPELIN
-  0.6.2
+  0.7.0
 
   
 



[2/2] ambari git commit: AMBARI-20343 Zeppelin: Configure both Hive and Hive interactive interpreters whenever required (r-kamath)

2017-03-08 Thread rkamath
AMBARI-20343 Zeppelin: Configure both Hive and Hive interactive interpreters 
whenever required (r-kamath)


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

Branch: refs/heads/trunk
Commit: 47c0c582b2fb59d567257d7c6784793fd0d0c06f
Parents: 011df34
Author: Renjith Kamath 
Authored: Thu Mar 9 12:44:31 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 9 12:48:53 2017 +0530

--
 .../0.6.0.2.5/package/scripts/master.py | 29 +---
 .../0.6.0.2.5/package/scripts/params.py | 10 +++
 2 files changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/47c0c582/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index fc24918..a460aec 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -319,10 +319,15 @@ class Master(Script):
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config
 
+hive_interactive_properties_key = 'hive_interactive'
 for setting_key in interpreter_settings.keys():
   interpreter = interpreter_settings[setting_key]
   if interpreter['group'] == 'jdbc':
 interpreter['dependencies'] = []
+
+if not params.hive_server_host and 
params.hive_server_interactive_hosts:
+  hive_interactive_properties_key = 'hive'
+
 if params.hive_server_host:
   interpreter['properties']['hive.driver'] = 
'org.apache.hive.jdbc.HiveDriver'
   interpreter['properties']['hive.user'] = 'hive'
@@ -330,17 +335,33 @@ class Master(Script):
   if params.hive_server2_support_dynamic_service_discovery:
 interpreter['properties']['hive.url'] = 'jdbc:hive2://' + \
  params.hive_zookeeper_quorum 
+ \
- '/;' + 
'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2'
+ '/;' + 
'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=' + \
+
params.hive_zookeeper_namespace
   else:
 interpreter['properties']['hive.url'] = 'jdbc:hive2://' + \
  params.hive_server_host + \
  ':' + 
params.hive_server_port
+if params.hive_server_interactive_hosts:
+  interpreter['properties'][hive_interactive_properties_key + 
'.driver'] = 'org.apache.hive.jdbc.HiveDriver'
+  interpreter['properties'][hive_interactive_properties_key + '.user'] 
= 'hive'
+  interpreter['properties'][hive_interactive_properties_key + 
'.password'] = ''
+  if params.hive_server2_support_dynamic_service_discovery:
+interpreter['properties'][hive_interactive_properties_key + 
'.url'] = 'jdbc:hive2://' + \
+
params.hive_zookeeper_quorum + \
+'/;' + 
'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=' + \
+
params.hive_interactive_zookeeper_namespace
+  else:
+interpreter['properties'][hive_interactive_properties_key + 
'.url'] = 'jdbc:hive2://' + \
+
params.hive_server_interactive_hosts + \
+':' + 
params.hive_server_port
+
+if params.hive_server_host or params.hive_server_interactive_hosts:
   interpreter['dependencies'].append(
-  {"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", 
"local": "false"})
+{"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", 
"local": "false"})
   interpreter['dependencies'].append(
-  {"groupArtifactVersion": 
"org.apache.hadoop:hadoop-common:2.7.2", "local": "false"})
+{"groupArtifactVersion": "org.apache.hadoop:hadoop-common:2.7.2", 
"local": "false"})
   interpreter['dependencies'].append(
-  {"groupArtifactVersion": 

[1/2] ambari git commit: AMBARI-20343 Zeppelin: Configure both Hive and Hive interactive interpreters whenever required (r-kamath)

2017-03-08 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ec33f228a -> c7086b11b
  refs/heads/trunk 011df3482 -> 47c0c582b


AMBARI-20343 Zeppelin: Configure both Hive and Hive interactive interpreters 
whenever required (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: c7086b11b7e5536e0c8b56130774e728aa3363f6
Parents: ec33f22
Author: Renjith Kamath 
Authored: Thu Mar 9 12:44:31 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Mar 9 12:44:31 2017 +0530

--
 .../0.6.0.2.5/package/scripts/master.py | 29 +---
 .../0.6.0.2.5/package/scripts/params.py | 10 +++
 2 files changed, 35 insertions(+), 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c7086b11/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index fc24918..a460aec 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -319,10 +319,15 @@ class Master(Script):
   config_id = livy2_config["id"]
   interpreter_settings[config_id] = livy2_config
 
+hive_interactive_properties_key = 'hive_interactive'
 for setting_key in interpreter_settings.keys():
   interpreter = interpreter_settings[setting_key]
   if interpreter['group'] == 'jdbc':
 interpreter['dependencies'] = []
+
+if not params.hive_server_host and 
params.hive_server_interactive_hosts:
+  hive_interactive_properties_key = 'hive'
+
 if params.hive_server_host:
   interpreter['properties']['hive.driver'] = 
'org.apache.hive.jdbc.HiveDriver'
   interpreter['properties']['hive.user'] = 'hive'
@@ -330,17 +335,33 @@ class Master(Script):
   if params.hive_server2_support_dynamic_service_discovery:
 interpreter['properties']['hive.url'] = 'jdbc:hive2://' + \
  params.hive_zookeeper_quorum 
+ \
- '/;' + 
'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2'
+ '/;' + 
'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=' + \
+
params.hive_zookeeper_namespace
   else:
 interpreter['properties']['hive.url'] = 'jdbc:hive2://' + \
  params.hive_server_host + \
  ':' + 
params.hive_server_port
+if params.hive_server_interactive_hosts:
+  interpreter['properties'][hive_interactive_properties_key + 
'.driver'] = 'org.apache.hive.jdbc.HiveDriver'
+  interpreter['properties'][hive_interactive_properties_key + '.user'] 
= 'hive'
+  interpreter['properties'][hive_interactive_properties_key + 
'.password'] = ''
+  if params.hive_server2_support_dynamic_service_discovery:
+interpreter['properties'][hive_interactive_properties_key + 
'.url'] = 'jdbc:hive2://' + \
+
params.hive_zookeeper_quorum + \
+'/;' + 
'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=' + \
+
params.hive_interactive_zookeeper_namespace
+  else:
+interpreter['properties'][hive_interactive_properties_key + 
'.url'] = 'jdbc:hive2://' + \
+
params.hive_server_interactive_hosts + \
+':' + 
params.hive_server_port
+
+if params.hive_server_host or params.hive_server_interactive_hosts:
   interpreter['dependencies'].append(
-  {"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", 
"local": "false"})
+{"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", 
"local": "false"})
   interpreter['dependencies'].append(
-  {"groupArtifactVersion": 
"org.apache.hadoop:hadoop-common:2.7.2", "local": "false"})
+{"groupArtifactVersion": 

[2/2] ambari git commit: AMBARI-20200: hive-site.xml, hbase-site.xml, etc. are not found in class path for Zeppelin (Prabhjyot Singh via r-kamath)

2017-03-06 Thread rkamath
AMBARI-20200: hive-site.xml, hbase-site.xml, etc. are not found in class path 
for Zeppelin (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: 6025d413da204a4cf5cf69fe90a413b905ac9344
Parents: 109bba1
Author: Renjith Kamath 
Authored: Mon Mar 6 15:56:19 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Mar 6 15:56:19 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  2 +-
 .../0.6.0.2.5/package/scripts/master.py | 36 +++-
 .../0.6.0.2.5/package/scripts/params.py |  8 +
 .../stacks/2.5/ZEPPELIN/test_zeppelin_master.py | 26 +++---
 4 files changed, 49 insertions(+), 23 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/6025d413/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 677158c..bdef319 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -89,7 +89,7 @@ export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
 # export ZEPPELIN_NOTEBOOK_STORAGE# Refers to pluggable notebook 
storage class, can have two classes simultaneously with a sync between them 
(e.g. local and remote).
 # export ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC   # If there are multiple notebook 
storages, should we treat the first one as the only source of truth?
 # export ZEPPELIN_NOTEBOOK_PUBLIC # Make notebook public by 
default when created, private otherwise
-
+export ZEPPELIN_INTP_CLASSPATH_OVERRIDES="{{external_dependency_conf}}"
  Spark interpreter configuration 
 
 ## Use provided spark installation ##

http://git-wip-us.apache.org/repos/asf/ambari/blob/6025d413/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 8a1fad6..fc24918 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -106,6 +106,17 @@ class Master(Script):
   mode=0755
   )
 
+  def create_zeppelin_hdfs_conf_dir(self, env):
+import params
+env.set_params(params)
+Directory([params.external_dependency_conf],
+  owner=params.zeppelin_user,
+  group=params.zeppelin_group,
+  cd_access="a",
+  create_parents=True,
+  mode=0755
+  )
+
   def chown_zeppelin_pid_dir(self, env):
 import params
 env.set_params(params)
@@ -150,17 +161,26 @@ class Master(Script):
 File(format("{params.conf_dir}/log4j.properties"), 
content=params.log4j_properties_content,
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
+self.create_zeppelin_hdfs_conf_dir(env)
 # copy hive-site.xml only if Spark 1.x is installed
-if 'spark-defaults' in params.config['configurations'] and \
-os.path.exists("/etc/spark/conf/hive-site.xml"):
-File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
- owner=params.zeppelin_user, group=params.zeppelin_group)
+if 'spark-defaults' in params.config['configurations'] and 
params.is_hive_installed:
+  XmlConfig("hive-site.xml",
+  conf_dir=params.external_dependency_conf,
+  configurations=params.spark_hive_properties,
+  owner=params.zeppelin_user,
+  group=params.zeppelin_group,
+  mode=0644)
 
-if len(params.hbase_master_hosts) > 0 and \
-os.path.exists("/etc/hbase/conf/hbase-site.xml"):
+if len(params.hbase_master_hosts) > 0 and params.is_hbase_installed:
   # copy hbase-site.xml
-  File(format("{params.conf_dir}/hbase-site.xml"), 
content=StaticFile("/etc/hbase/conf/hbase-site.xml"),
-   owner=params.zeppelin_user, 

[1/2] ambari git commit: AMBARI-20200: hive-site.xml, hbase-site.xml, etc. are not found in class path for Zeppelin (Prabhjyot Singh via r-kamath)

2017-03-06 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0bbd5455a -> b2f560adf
  refs/heads/trunk 109bba17e -> 6025d413d


AMBARI-20200: hive-site.xml, hbase-site.xml, etc. are not found in class path 
for Zeppelin (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: b2f560adff7bf8c70e24c75e8e5c36da24ad97cc
Parents: 0bbd545
Author: Renjith Kamath 
Authored: Mon Mar 6 15:49:12 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Mar 6 15:49:12 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  2 +-
 .../0.6.0.2.5/package/scripts/master.py | 36 +++-
 .../0.6.0.2.5/package/scripts/params.py |  8 +
 3 files changed, 37 insertions(+), 9 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b2f560ad/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 677158c..bdef319 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -89,7 +89,7 @@ export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
 # export ZEPPELIN_NOTEBOOK_STORAGE# Refers to pluggable notebook 
storage class, can have two classes simultaneously with a sync between them 
(e.g. local and remote).
 # export ZEPPELIN_NOTEBOOK_ONE_WAY_SYNC   # If there are multiple notebook 
storages, should we treat the first one as the only source of truth?
 # export ZEPPELIN_NOTEBOOK_PUBLIC # Make notebook public by 
default when created, private otherwise
-
+export ZEPPELIN_INTP_CLASSPATH_OVERRIDES="{{external_dependency_conf}}"
  Spark interpreter configuration 
 
 ## Use provided spark installation ##

http://git-wip-us.apache.org/repos/asf/ambari/blob/b2f560ad/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 8a1fad6..fc24918 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -106,6 +106,17 @@ class Master(Script):
   mode=0755
   )
 
+  def create_zeppelin_hdfs_conf_dir(self, env):
+import params
+env.set_params(params)
+Directory([params.external_dependency_conf],
+  owner=params.zeppelin_user,
+  group=params.zeppelin_group,
+  cd_access="a",
+  create_parents=True,
+  mode=0755
+  )
+
   def chown_zeppelin_pid_dir(self, env):
 import params
 env.set_params(params)
@@ -150,17 +161,26 @@ class Master(Script):
 File(format("{params.conf_dir}/log4j.properties"), 
content=params.log4j_properties_content,
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
+self.create_zeppelin_hdfs_conf_dir(env)
 # copy hive-site.xml only if Spark 1.x is installed
-if 'spark-defaults' in params.config['configurations'] and \
-os.path.exists("/etc/spark/conf/hive-site.xml"):
-File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
- owner=params.zeppelin_user, group=params.zeppelin_group)
+if 'spark-defaults' in params.config['configurations'] and 
params.is_hive_installed:
+  XmlConfig("hive-site.xml",
+  conf_dir=params.external_dependency_conf,
+  configurations=params.spark_hive_properties,
+  owner=params.zeppelin_user,
+  group=params.zeppelin_group,
+  mode=0644)
 
-if len(params.hbase_master_hosts) > 0 and \
-os.path.exists("/etc/hbase/conf/hbase-site.xml"):
+if len(params.hbase_master_hosts) > 0 and params.is_hbase_installed:
   # copy hbase-site.xml
-  File(format("{params.conf_dir}/hbase-site.xml"), 

[1/2] ambari git commit: AMBARI-20094: Zeppelin should configure hadoop.proxyuser in HDFS core-site.xml (Prabhjyot Singh vi r-kamath)

2017-02-28 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ad94fcc2e -> 3bcc30a51
  refs/heads/trunk 04039a654 -> df60905a5


AMBARI-20094: Zeppelin should configure hadoop.proxyuser in HDFS core-site.xml 
(Prabhjyot Singh vi r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 3bcc30a516088a75a6618126f8e88cfa1a06129a
Parents: ad94fcc
Author: Renjith Kamath 
Authored: Wed Mar 1 12:34:07 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Mar 1 12:34:07 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/kerberos.json|  8 +++
 .../HDP/2.5/services/ZEPPELIN/kerberos.json | 53 
 .../HDP/2.6/services/ZEPPELIN/kerberos.json | 53 
 3 files changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3bcc30a5/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
index 5625681..925215b 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
@@ -38,6 +38,14 @@
   "zeppelin-env": {
 "zeppelin.kerberos.enabled": "true"
   }
+},
+{
+  "core-site": {
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.groups": "*",
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.hosts": "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.groups":
 "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.hosts":
 "*"
+  }
 }
   ]
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3bcc30a5/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
new file mode 100644
index 000..925215b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
@@ -0,0 +1,53 @@
+{
+  "services": [
+{
+  "name": "ZEPPELIN",
+  "identities": [
+{
+  "name": "/smokeuser"
+},
+{
+  "name": "zeppelin_user",
+  "principal": {
+"value": 
"${zeppelin-env/zeppelin_user}${principal_suffix}@${realm}",
+"type" : "user",
+"configuration": "zeppelin-env/zeppelin.server.kerberos.principal",
+"local_username" : "${zeppelin-env/zeppelin_user}"
+  },
+  "keytab": {
+"file": "${keytab_dir}/zeppelin.server.kerberos.keytab",
+"owner": {
+  "name": "${zeppelin-env/zeppelin_user}",
+  "access": "r"
+},
+"group": {
+  "name": "${cluster-env/user_group}",
+  "access": ""
+},
+"configuration": "zeppelin-env/zeppelin.server.kerberos.keytab"
+  }
+}
+  ],
+  "components": [
+{
+  "name": "ZEPPELIN_MASTER"
+}
+  ],
+  "configurations": [
+{
+  "zeppelin-env": {
+"zeppelin.kerberos.enabled": "true"
+  }
+},
+{
+  "core-site": {
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.groups": "*",
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.hosts": "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.groups":
 "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.hosts":
 "*"
+  }
+}
+  ]
+}
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3bcc30a5/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
new file mode 100644
index 000..925215b
--- /dev/null
+++ 

[2/2] ambari git commit: AMBARI-20094: Zeppelin should configure hadoop.proxyuser in HDFS core-site.xml (Prabhjyot Singh vi r-kamath)

2017-02-28 Thread rkamath
AMBARI-20094: Zeppelin should configure hadoop.proxyuser in HDFS core-site.xml 
(Prabhjyot Singh vi r-kamath)


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

Branch: refs/heads/trunk
Commit: df60905a5508036e821deab4b6cd96a038a042ae
Parents: 04039a6
Author: Renjith Kamath 
Authored: Wed Mar 1 12:34:07 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Mar 1 12:34:57 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/kerberos.json|  8 +++
 .../HDP/2.5/services/ZEPPELIN/kerberos.json | 53 
 .../HDP/2.6/services/ZEPPELIN/kerberos.json | 53 
 3 files changed, 114 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/df60905a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
index 5625681..925215b 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/kerberos.json
@@ -38,6 +38,14 @@
   "zeppelin-env": {
 "zeppelin.kerberos.enabled": "true"
   }
+},
+{
+  "core-site": {
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.groups": "*",
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.hosts": "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.groups":
 "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.hosts":
 "*"
+  }
 }
   ]
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/df60905a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
new file mode 100644
index 000..925215b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.5/services/ZEPPELIN/kerberos.json
@@ -0,0 +1,53 @@
+{
+  "services": [
+{
+  "name": "ZEPPELIN",
+  "identities": [
+{
+  "name": "/smokeuser"
+},
+{
+  "name": "zeppelin_user",
+  "principal": {
+"value": 
"${zeppelin-env/zeppelin_user}${principal_suffix}@${realm}",
+"type" : "user",
+"configuration": "zeppelin-env/zeppelin.server.kerberos.principal",
+"local_username" : "${zeppelin-env/zeppelin_user}"
+  },
+  "keytab": {
+"file": "${keytab_dir}/zeppelin.server.kerberos.keytab",
+"owner": {
+  "name": "${zeppelin-env/zeppelin_user}",
+  "access": "r"
+},
+"group": {
+  "name": "${cluster-env/user_group}",
+  "access": ""
+},
+"configuration": "zeppelin-env/zeppelin.server.kerberos.keytab"
+  }
+}
+  ],
+  "components": [
+{
+  "name": "ZEPPELIN_MASTER"
+}
+  ],
+  "configurations": [
+{
+  "zeppelin-env": {
+"zeppelin.kerberos.enabled": "true"
+  }
+},
+{
+  "core-site": {
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.groups": "*",
+"hadoop.proxyuser.${zeppelin-env/zeppelin_user}.hosts": "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.groups":
 "*",
+
"hadoop.proxyuser.${zeppelin-env/zeppelin_user}-${cluster_name|toLower()}.hosts":
 "*"
+  }
+}
+  ]
+}
+  ]
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/df60905a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
new file mode 100644
index 000..925215b
--- /dev/null
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/kerberos.json
@@ -0,0 +1,53 @@
+{
+  "services": [
+{
+  "name": "ZEPPELIN",
+  "identities": [
+{
+  

[2/2] ambari git commit: AMBARI-20176 Zeppelin Notebook fails to start without HDFS via Ambari service (r-kamath)

2017-02-27 Thread rkamath
AMBARI-20176 Zeppelin Notebook fails to start without HDFS via Ambari service 
(r-kamath)


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

Branch: refs/heads/trunk
Commit: 4b75171643ac5690c582edbf8a3123b8635f8644
Parents: 3a7e5a2
Author: Renjith Kamath 
Authored: Mon Feb 27 16:05:04 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Feb 27 16:05:47 2017 +0530

--
 .../resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4b751716/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
index 78fbb1b..e29eae3 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
@@ -80,6 +80,10 @@ limitations under the License.
 300
   
 
+  
+HDFS
+  
+
   
 zeppelin-config
 zeppelin-env



[1/2] ambari git commit: AMBARI-20176 Zeppelin Notebook fails to start without HDFS via Ambari service (r-kamath)

2017-02-27 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d4ce989f0 -> 1822f0ec4
  refs/heads/trunk 3a7e5a2f6 -> 4b7517164


AMBARI-20176 Zeppelin Notebook fails to start without HDFS via Ambari service 
(r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 1822f0ec45247948e2644fff13a09479555b6534
Parents: d4ce989
Author: Renjith Kamath 
Authored: Mon Feb 27 16:05:04 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Feb 27 16:05:04 2017 +0530

--
 .../resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml| 4 
 1 file changed, 4 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/1822f0ec/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
index 78fbb1b..e29eae3 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
@@ -80,6 +80,10 @@ limitations under the License.
 300
   
 
+  
+HDFS
+  
+
   
 zeppelin-config
 zeppelin-env



[1/2] ambari git commit: AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box (Prabhjyot Singh via r-kamath)

2017-02-21 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ef0cf9c4e -> 70ef0d04c
  refs/heads/trunk 299b05033 -> f1c96e5d0


AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box 
(Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 70ef0d04c937108438ca601ff7f22ab98cd580d4
Parents: ef0cf9c
Author: Renjith Kamath 
Authored: Tue Feb 21 18:01:36 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Feb 21 18:01:36 2017 +0530

--
 .../KNOX/0.5.0.2.2/configuration/gateway-site.xml|  6 ++
 .../KNOX/0.5.0.2.2/package/scripts/params_linux.py   | 11 +++
 .../HDP/2.6/services/KNOX/configuration/topology.xml | 10 ++
 3 files changed, 27 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/70ef0d04/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
index 3837019..ad599e0 100644
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
@@ -62,4 +62,10 @@ limitations under the License.
 Boolean flag indicating whether to enable debug messages for 
krb5 authentication
 
   
+  
+gateway.websocket.feature.enabled
+{{websocket_support}}
+Enable this if you want websocket support
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/70ef0d04/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index febede3..ce87d1c 100644
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -438,3 +438,14 @@ if "druid-router" in config['configurations']:
   port = config['configurations']['druid-router']['druid.port']
   for host in config['clusterHostInfo']['druid_router_hosts']:
 druid_router_urls += buildUrlElement("http", host, port, "")
+
+zeppelin_ui_urls = ""
+zeppelin_ws_urls = ""
+websocket_support = "false"
+if "zeppelin-config" in config['configurations']:
+  port = config['configurations']['zeppelin-config']['zeppelin.server.port']
+  protocol = "https" if 
config['configurations']['zeppelin-config']['zeppelin.ssl'] else "http"
+  host = config['clusterHostInfo']['zeppelin_master_hosts'][0]
+  zeppelin_ui_urls += buildUrlElement(protocol, host, port, "")
+  zeppelin_ws_urls += buildUrlElement("ws", host, port, "/ws")
+  websocket_support = "true"

http://git-wip-us.apache.org/repos/asf/ambari/blob/70ef0d04/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
index 6862e4d..df4c1b4 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
@@ -143,6 +143,16 @@
 {{druid_broker_urls}}
 /service
 
+service
+roleZEPPELINUI/role
+{{zeppelin_ui_urls}}
+/service
+
+service
+roleZEPPELINWS/role
+{{zeppelin_ws_urls}}
+/service
+
 /topology
 
 



[2/2] ambari git commit: AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box (Prabhjyot Singh via r-kamath)

2017-02-21 Thread rkamath
AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box 
(Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: f1c96e5d095580183519afe04e42af6ad8c7c897
Parents: 299b050
Author: Renjith Kamath 
Authored: Tue Feb 21 18:01:36 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Feb 21 18:05:42 2017 +0530

--
 .../KNOX/0.5.0.2.2/configuration/gateway-site.xml|  6 ++
 .../KNOX/0.5.0.2.2/package/scripts/params_linux.py   | 11 +++
 .../HDP/2.6/services/KNOX/configuration/topology.xml | 10 ++
 3 files changed, 27 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c96e5d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
index 3837019..ad599e0 100644
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
@@ -62,4 +62,10 @@ limitations under the License.
 Boolean flag indicating whether to enable debug messages for 
krb5 authentication
 
   
+  
+gateway.websocket.feature.enabled
+{{websocket_support}}
+Enable this if you want websocket support
+
+  
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c96e5d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index 9b61a5f..8beb2c0 100644
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -437,3 +437,14 @@ if "druid-router" in config['configurations']:
   port = config['configurations']['druid-router']['druid.port']
   for host in config['clusterHostInfo']['druid_router_hosts']:
 druid_router_urls += buildUrlElement("http", host, port, "")
+
+zeppelin_ui_urls = ""
+zeppelin_ws_urls = ""
+websocket_support = "false"
+if "zeppelin-config" in config['configurations']:
+  port = config['configurations']['zeppelin-config']['zeppelin.server.port']
+  protocol = "https" if 
config['configurations']['zeppelin-config']['zeppelin.ssl'] else "http"
+  host = config['clusterHostInfo']['zeppelin_master_hosts'][0]
+  zeppelin_ui_urls += buildUrlElement(protocol, host, port, "")
+  zeppelin_ws_urls += buildUrlElement("ws", host, port, "/ws")
+  websocket_support = "true"

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c96e5d/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
index 6862e4d..df4c1b4 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
@@ -143,6 +143,16 @@
 {{druid_broker_urls}}
 /service
 
+service
+roleZEPPELINUI/role
+{{zeppelin_ui_urls}}
+/service
+
+service
+roleZEPPELINWS/role
+{{zeppelin_ws_urls}}
+/service
+
 /topology
 
 



[2/2] ambari git commit: AMBARI-19919: spark/livy (1.x) should not be configured in Zeppelin's interpreter if they are not installed (Prabhjyot Singh via r-kamath)

2017-02-13 Thread rkamath
AMBARI-19919: spark/livy (1.x) should not be configured in Zeppelin's 
interpreter if they are not installed (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: a9060614ffe9cd6812eb8ff9cbb6fd81572f66e2
Parents: b695bf2
Author: Renjith Kamath 
Authored: Mon Feb 13 13:27:06 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Feb 13 13:29:00 2017 +0530

--
 .../package/scripts/livy2_config_template.py| 107 +++
 .../0.6.0.2.5/package/scripts/master.py |  42 ++--
 .../0.6.0.2.5/package/scripts/params.py |   8 ++
 3 files changed, 147 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a9060614/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
new file mode 100644
index 000..71d3817
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+template = '''
+{
+  "id": "2C8A4SZ9T_livy2",
+  "status": "READY",
+  "group": "livy",
+  "name": "livy2",
+  "properties": {
+"zeppelin.livy.keytab": "",
+"zeppelin.livy.spark.sql.maxResult": "1000",
+"livy.spark.executor.instances": "",
+"livy.spark.executor.memory": "",
+"livy.spark.dynamicAllocation.enabled": "",
+"livy.spark.dynamicAllocation.cachedExecutorIdleTimeout": "",
+"livy.spark.dynamicAllocation.initialExecutors": "",
+"zeppelin.livy.session.create_timeout": "120",
+"livy.spark.driver.memory": "",
+"zeppelin.livy.displayAppInfo": "false",
+"livy.spark.jars.packages": "",
+"livy.spark.dynamicAllocation.maxExecutors": "",
+"zeppelin.livy.concurrentSQL": "false",
+"zeppelin.livy.principal": "",
+"livy.spark.executor.cores": "",
+"zeppelin.livy.url": "http://localhost:8998;,
+"zeppelin.livy.pull_status.interval.millis": "1000",
+"livy.spark.driver.cores": "",
+"livy.spark.dynamicAllocation.minExecutors": ""
+  },
+  "interpreterGroup": [
+{
+  "class": "org.apache.zeppelin.livy.LivySparkInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "scala"
+  },
+  "name": "spark",
+  "defaultInterpreter": false
+},
+{
+  "class": "org.apache.zeppelin.livy.LivySparkSQLInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "sql"
+  },
+  "name": "sql",
+  "defaultInterpreter": false
+},
+{
+  "class": "org.apache.zeppelin.livy.LivyPySparkInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "python"
+  },
+  "name": "pyspark",
+  "defaultInterpreter": false
+  },
+{
+  "class": "org.apache.zeppelin.livy.LivyPySpark3Interpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "python"
+  },
+  "name": "pyspark3",
+  "defaultInterpreter": false
+},
+{
+  "class": "org.apache.zeppelin.livy.LivySparkRInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "r"
+  },
+  "name": "sparkr",
+  "defaultInterpreter": false
+}
+  ],
+  "dependencies": [],
+  "option": {
+"setPermission": false,
+"remote": true,
+"users": [],
+"isExistingProcess": false,
+"perUser": "scoped",
+"isUserImpersonate": false,
+"perNote": "shared",
+  

[1/2] ambari git commit: AMBARI-19919: spark/livy (1.x) should not be configured in Zeppelin's interpreter if they are not installed (Prabhjyot Singh via r-kamath)

2017-02-13 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 5b2c13024 -> ddf2c3f5a
  refs/heads/trunk b695bf2bf -> a9060614f


AMBARI-19919: spark/livy (1.x) should not be configured in Zeppelin's 
interpreter if they are not installed (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: ddf2c3f5a0d2fcb0cf7cf1f9e4f0cbc39817d8f3
Parents: 5b2c130
Author: Renjith Kamath 
Authored: Mon Feb 13 13:27:06 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Feb 13 13:27:06 2017 +0530

--
 .../package/scripts/livy2_config_template.py| 107 +++
 .../0.6.0.2.5/package/scripts/master.py |  42 ++--
 .../0.6.0.2.5/package/scripts/params.py |   8 ++
 3 files changed, 147 insertions(+), 10 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ddf2c3f5/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
new file mode 100644
index 000..71d3817
--- /dev/null
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/livy2_config_template.py
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
+template = '''
+{
+  "id": "2C8A4SZ9T_livy2",
+  "status": "READY",
+  "group": "livy",
+  "name": "livy2",
+  "properties": {
+"zeppelin.livy.keytab": "",
+"zeppelin.livy.spark.sql.maxResult": "1000",
+"livy.spark.executor.instances": "",
+"livy.spark.executor.memory": "",
+"livy.spark.dynamicAllocation.enabled": "",
+"livy.spark.dynamicAllocation.cachedExecutorIdleTimeout": "",
+"livy.spark.dynamicAllocation.initialExecutors": "",
+"zeppelin.livy.session.create_timeout": "120",
+"livy.spark.driver.memory": "",
+"zeppelin.livy.displayAppInfo": "false",
+"livy.spark.jars.packages": "",
+"livy.spark.dynamicAllocation.maxExecutors": "",
+"zeppelin.livy.concurrentSQL": "false",
+"zeppelin.livy.principal": "",
+"livy.spark.executor.cores": "",
+"zeppelin.livy.url": "http://localhost:8998;,
+"zeppelin.livy.pull_status.interval.millis": "1000",
+"livy.spark.driver.cores": "",
+"livy.spark.dynamicAllocation.minExecutors": ""
+  },
+  "interpreterGroup": [
+{
+  "class": "org.apache.zeppelin.livy.LivySparkInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "scala"
+  },
+  "name": "spark",
+  "defaultInterpreter": false
+},
+{
+  "class": "org.apache.zeppelin.livy.LivySparkSQLInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "sql"
+  },
+  "name": "sql",
+  "defaultInterpreter": false
+},
+{
+  "class": "org.apache.zeppelin.livy.LivyPySparkInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "python"
+  },
+  "name": "pyspark",
+  "defaultInterpreter": false
+  },
+{
+  "class": "org.apache.zeppelin.livy.LivyPySpark3Interpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "python"
+  },
+  "name": "pyspark3",
+  "defaultInterpreter": false
+},
+{
+  "class": "org.apache.zeppelin.livy.LivySparkRInterpreter",
+  "editor": {
+"editOnDblClick": false,
+"language": "r"
+  },
+  "name": "sparkr",
+  "defaultInterpreter": false
+}
+  ],
+  "dependencies": [],
+  "option": {
+"setPermission": false,
+"remote": true,
+

[2/2] ambari git commit: AMBARI-19740 Ambari upgrade to Ambari 2.5 causes start DB check failure on Zeppelin configs (r-kamath)

2017-02-01 Thread rkamath
AMBARI-19740 Ambari upgrade to Ambari 2.5 causes start DB check failure on 
Zeppelin configs (r-kamath)


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

Branch: refs/heads/trunk
Commit: 8ece8aa6cd91f3abad4f1ec3c72a5320fb1278cc
Parents: 0dfe8b6
Author: Renjith Kamath 
Authored: Wed Feb 1 14:46:43 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Feb 1 14:46:43 2017 +0530

--
 .../server/upgrade/UpgradeCatalog250.java   | 27 
 .../server/upgrade/UpgradeCatalog250Test.java   |  5 
 2 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8ece8aa6/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index 6c90262..71cde7e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -164,6 +164,7 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 updateTEZInteractiveConfigs();
 updateHiveLlapConfigs();
 updateTablesForZeppelinViewRemoval();
+updateZeppelinConfigs();
 updateAtlasConfigs();
 updateLogSearchConfigs();
 updateAmbariInfraConfigs();
@@ -351,6 +352,32 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 dbAccessor.executeQuery("DELETE from viewparameter WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
   }
 
+  /**
+   * Updates Zeppelin configs.
+   *
+   * @throws AmbariException
+   */
+  protected void updateZeppelinConfigs() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+Clusters clusters = ambariManagementController.getClusters();
+if (clusters != null) {
+  Map clusterMap = clusters.getClusters();
+
+  if (clusterMap != null && !clusterMap.isEmpty()) {
+for (final Cluster cluster : clusterMap.values()) {
+  Config zeppelinEnvProperties = 
cluster.getDesiredConfigByType("zeppelin-env");
+  if (zeppelinEnvProperties != null) {
+String log4jPropertiesContent = 
zeppelinEnvProperties.getProperties().get("log4j_properties_content");
+String shiroIniContent = 
zeppelinEnvProperties.getProperties().get("shiro_ini_content");
+
+updateConfigurationProperties("zeppelin-log4j-properties", 
Collections.singletonMap("log4j_properties_content", log4jPropertiesContent), 
true, true);
+updateConfigurationProperties("zeppelin-shiro-ini", 
Collections.singletonMap("shiro_ini_content", shiroIniContent), true, true);
+  }
+}
+  }
+}
+  }
+
   protected String updateAmsEnvContent(String content) {
 if (content == null) {
   return null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8ece8aa6/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index 725928b..1cabe47 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -281,6 +281,7 @@ public class UpgradeCatalog250Test {
 Method addManageServiceAutoStartPermissions = 
UpgradeCatalog250.class.getDeclaredMethod("addManageServiceAutoStartPermissions");
 Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
 Method updateTablesForZeppelinViewRemoval = 
UpgradeCatalog250.class.getDeclaredMethod("updateTablesForZeppelinViewRemoval");
+Method updateZeppelinConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateZeppelinConfigs");
 Method updateAtlasConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAtlasConfigs");
 Method updateLogSearchConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateLogSearchConfigs");
 Method updateAmbariInfraConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAmbariInfraConfigs");
@@ -297,6 +298,7 @@ public class 

[1/2] ambari git commit: AMBARI-19740 Ambari upgrade to Ambari 2.5 causes start DB check failure on Zeppelin configs (r-kamath)

2017-02-01 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e31c81d9f -> dc0257f8f
  refs/heads/trunk 0dfe8b6c9 -> 8ece8aa6c


AMBARI-19740 Ambari upgrade to Ambari 2.5 causes start DB check failure on 
Zeppelin configs (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: dc0257f8f554dff0d13ef5cdbae29891625cc365
Parents: e31c81d
Author: Renjith Kamath 
Authored: Wed Feb 1 14:39:46 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Feb 1 14:39:46 2017 +0530

--
 .../server/upgrade/UpgradeCatalog250.java   | 27 
 .../server/upgrade/UpgradeCatalog250Test.java   |  5 
 2 files changed, 32 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dc0257f8/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index a8a5d17..6b9076c 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -164,6 +164,7 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 updateTEZInteractiveConfigs();
 updateHiveLlapConfigs();
 updateTablesForZeppelinViewRemoval();
+updateZeppelinConfigs();
 updateAtlasConfigs();
 updateLogSearchConfigs();
 updateAmbariInfraConfigs();
@@ -295,6 +296,32 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 dbAccessor.executeQuery("DELETE from viewparameter WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
   }
 
+  /**
+   * Updates Zeppelin configs.
+   *
+   * @throws AmbariException
+   */
+  protected void updateZeppelinConfigs() throws AmbariException {
+AmbariManagementController ambariManagementController = 
injector.getInstance(AmbariManagementController.class);
+Clusters clusters = ambariManagementController.getClusters();
+if (clusters != null) {
+  Map clusterMap = clusters.getClusters();
+
+  if (clusterMap != null && !clusterMap.isEmpty()) {
+for (final Cluster cluster : clusterMap.values()) {
+  Config zeppelinEnvProperties = 
cluster.getDesiredConfigByType("zeppelin-env");
+  if (zeppelinEnvProperties != null) {
+String log4jPropertiesContent = 
zeppelinEnvProperties.getProperties().get("log4j_properties_content");
+String shiroIniContent = 
zeppelinEnvProperties.getProperties().get("shiro_ini_content");
+
+updateConfigurationProperties("zeppelin-log4j-properties", 
Collections.singletonMap("log4j_properties_content", log4jPropertiesContent), 
true, true);
+updateConfigurationProperties("zeppelin-shiro-ini", 
Collections.singletonMap("shiro_ini_content", shiroIniContent), true, true);
+  }
+}
+  }
+}
+  }
+
   protected String updateAmsEnvContent(String content) {
 if (content == null) {
   return null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/dc0257f8/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index bbda783..1c455be 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -276,6 +276,7 @@ public class UpgradeCatalog250Test {
 Method updateKafkaConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateKafkaConfigs");
 Method updateHiveLlapConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateHiveLlapConfigs");
 Method updateTablesForZeppelinViewRemoval = 
UpgradeCatalog250.class.getDeclaredMethod("updateTablesForZeppelinViewRemoval");
+Method updateZeppelinConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateZeppelinConfigs");
 Method updateAtlasConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAtlasConfigs");
 Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
 Method updateHIVEInteractiveConfigs = 

[1/2] ambari git commit: AMBARI-19627 Cannot start Zeppelin notebook if Hive is not installed (r-kamath)

2017-01-22 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f06dcd7bc -> 8396f27b7
  refs/heads/trunk 2463b0a26 -> f4a3dbcbc


AMBARI-19627 Cannot start Zeppelin notebook if Hive is not installed (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 8396f27b732a98a93c6f63ed3f471c684f6eb70e
Parents: f06dcd7
Author: Renjith Kamath 
Authored: Mon Jan 23 11:48:17 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Jan 23 11:48:17 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py   | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8396f27b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index b609538..9af48e5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -151,11 +151,13 @@ class Master(Script):
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
 # copy hive-site.xml only if Spark 1.x is installed
-if 'spark-defaults' in params.config['configurations']:
+if 'spark-defaults' in params.config['configurations'] and \
+os.path.exists("/etc/spark/conf/hive-site.xml"):
 File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
-if len(params.hbase_master_hosts) > 0:
+if len(params.hbase_master_hosts) > 0 and \
+os.path.exists("/etc/hbase/conf/hbase-site.xml"):
   # copy hbase-site.xml
   File(format("{params.conf_dir}/hbase-site.xml"), 
content=StaticFile("/etc/hbase/conf/hbase-site.xml"),
owner=params.zeppelin_user, group=params.zeppelin_group)



[2/2] ambari git commit: AMBARI-19627 Cannot start Zeppelin notebook if Hive is not installed (Attila Doroszlai via r-kamath)

2017-01-22 Thread rkamath
AMBARI-19627 Cannot start Zeppelin notebook if Hive is not installed (Attila 
Doroszlai via r-kamath)


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

Branch: refs/heads/trunk
Commit: f4a3dbcbce0efe4b741a63277338b813ab52ae5c
Parents: 2463b0a
Author: Renjith Kamath 
Authored: Mon Jan 23 11:51:38 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Jan 23 11:53:43 2017 +0530

--
 .../0.6.0.2.5/package/scripts/master.py |   6 +-
 .../stacks/2.5/ZEPPELIN/test_zeppelin_master.py | 129 ++-
 2 files changed, 17 insertions(+), 118 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f4a3dbcb/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index b609538..9af48e5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -151,11 +151,13 @@ class Master(Script):
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
 # copy hive-site.xml only if Spark 1.x is installed
-if 'spark-defaults' in params.config['configurations']:
+if 'spark-defaults' in params.config['configurations'] and \
+os.path.exists("/etc/spark/conf/hive-site.xml"):
 File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
-if len(params.hbase_master_hosts) > 0:
+if len(params.hbase_master_hosts) > 0 and \
+os.path.exists("/etc/hbase/conf/hbase-site.xml"):
   # copy hbase-site.xml
   File(format("{params.conf_dir}/hbase-site.xml"), 
content=StaticFile("/etc/hbase/conf/hbase-site.xml"),
owner=params.zeppelin_user, group=params.zeppelin_group)

http://git-wip-us.apache.org/repos/asf/ambari/blob/f4a3dbcb/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py 
b/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
index 2578316..bd0f5ef 100644
--- a/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
+++ b/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
@@ -131,7 +131,9 @@ class TestZeppelinMaster(RMFTestCase):
 group = 'zeppelin',
 )
 
-  def test_configure_default(self):
+  @patch('os.path.exists')
+  def test_configure_default(self, os_path_exists_mock):
+os_path_exists_mock.side_effect = lambda path: path == 
'/etc/spark/conf/hive-site.xml'
 self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/master.py",
classname = "Master",
command = "configure",
@@ -142,7 +144,9 @@ class TestZeppelinMaster(RMFTestCase):
 self.assert_configure_default()
 self.assertNoMoreResources()
 
-  def test_configure_secured(self):
+  @patch('os.path.exists')
+  def test_configure_secured(self, os_path_exists_mock):
+os_path_exists_mock.side_effect = lambda path: path == 
'/etc/spark/conf/hive-site.xml'
 self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/master.py",
classname = "Master",
command = "configure",
@@ -199,116 +203,9 @@ class TestZeppelinMaster(RMFTestCase):
 )
 self.assertNoMoreResources()
 
-
-  def test_start_secured(self):
-self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/master.py",
-   classname = "Master",
-   command = "start",
-   config_file = "secured.json",
-   stack_version = self.STACK_VERSION,
-   target = RMFTestCase.TARGET_COMMON_SERVICES
-)
-self.assert_configure_secured()
-self.assertResourceCalled('Execute', ('chown', '-R', u'zeppelin:zeppelin', 
'/etc/zeppelin'),
-sudo = True,
-)
-self.assertResourceCalled('Execute', '/usr/bin/kinit -kt 
/etc/security/keytabs/zeppelin.server.kerberos.keytab zeppe...@example.com; ',
-user = 'zeppelin',
-)
-self.assertResourceCalled('HdfsResource', 

[1/2] ambari git commit: AMBARI-19648 Intermittent Zeppelin Server start failure during service install and start from Ambari (r-kamath)

2017-01-22 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e645fc91f -> f06dcd7bc
  refs/heads/trunk 593234b76 -> 2463b0a26


AMBARI-19648 Intermittent Zeppelin Server start failure during service install 
and start from Ambari (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: f06dcd7bce4c426527ade7a8348c227d1e40ad5a
Parents: e645fc9
Author: Renjith Kamath 
Authored: Mon Jan 23 11:44:20 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Jan 23 11:44:20 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py| 16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f06dcd7b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index ac56aa2..b609538 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -20,6 +20,7 @@ limitations under the License.
 
 import glob
 import os
+from resource_management.core.base import Fail
 from resource_management.core.resources import Directory
 from resource_management.core.resources.system import Execute, File
 from resource_management.core.source import InlineTemplate
@@ -32,6 +33,7 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import stack_select
 from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.decorator import retry
 from resource_management.libraries.functions.stack_features import 
check_stack_feature
 from resource_management.libraries.functions.version import 
format_stack_version
 from resource_management.libraries.script.script import Script
@@ -168,7 +170,6 @@ class Master(Script):
   def start(self, env, upgrade_type=None):
 import params
 import status_params
-import time
 self.configure(env)
 
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), "/etc/zeppelin"),
@@ -345,21 +346,14 @@ class Master(Script):
 
 self.set_interpreter_settings(config_data)
 
-  def check_zeppelin_server(self, retries=10):
+  @retry(times=30, sleep_time=5, err_class=Fail)
+  def check_zeppelin_server(self):
 import params
-import time
 path = params.conf_dir + "/interpreter.json"
 if os.path.exists(path) and os.path.getsize(path):
   Logger.info("interpreter.json found. Zeppelin server started.")
-  return True
 else:
-  if retries > 0:
-Logger.info("interpreter.json not found. waiting for zeppelin server 
to start...")
-time.sleep(5)
-self.check_zeppelin_server(retries - 1)
-  else:
-return False
-return False
+  raise Fail("interpreter.json not found. waiting for Zeppelin server to 
start...")
 
   def get_zeppelin_spark_dependencies(self):
 import params



[2/2] ambari git commit: AMBARI-19648 Intermittent Zeppelin Server start failure during service install and start from Ambari (r-kamath)

2017-01-22 Thread rkamath
AMBARI-19648 Intermittent Zeppelin Server start failure during service install 
and start from Ambari (r-kamath)


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

Branch: refs/heads/trunk
Commit: 2463b0a2632668c778293ffe352e928ff5ccf7b3
Parents: 593234b
Author: Renjith Kamath 
Authored: Mon Jan 23 11:44:20 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Jan 23 11:45:21 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py| 16 +---
 1 file changed, 5 insertions(+), 11 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2463b0a2/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index ac56aa2..b609538 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -20,6 +20,7 @@ limitations under the License.
 
 import glob
 import os
+from resource_management.core.base import Fail
 from resource_management.core.resources import Directory
 from resource_management.core.resources.system import Execute, File
 from resource_management.core.source import InlineTemplate
@@ -32,6 +33,7 @@ from resource_management.libraries.functions.format import 
format
 from resource_management.libraries.functions import conf_select
 from resource_management.libraries.functions import stack_select
 from resource_management.libraries.functions import StackFeature
+from resource_management.libraries.functions.decorator import retry
 from resource_management.libraries.functions.stack_features import 
check_stack_feature
 from resource_management.libraries.functions.version import 
format_stack_version
 from resource_management.libraries.script.script import Script
@@ -168,7 +170,6 @@ class Master(Script):
   def start(self, env, upgrade_type=None):
 import params
 import status_params
-import time
 self.configure(env)
 
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), "/etc/zeppelin"),
@@ -345,21 +346,14 @@ class Master(Script):
 
 self.set_interpreter_settings(config_data)
 
-  def check_zeppelin_server(self, retries=10):
+  @retry(times=30, sleep_time=5, err_class=Fail)
+  def check_zeppelin_server(self):
 import params
-import time
 path = params.conf_dir + "/interpreter.json"
 if os.path.exists(path) and os.path.getsize(path):
   Logger.info("interpreter.json found. Zeppelin server started.")
-  return True
 else:
-  if retries > 0:
-Logger.info("interpreter.json not found. waiting for zeppelin server 
to start...")
-time.sleep(5)
-self.check_zeppelin_server(retries - 1)
-  else:
-return False
-return False
+  raise Fail("interpreter.json not found. waiting for Zeppelin server to 
start...")
 
   def get_zeppelin_spark_dependencies(self):
 import params



ambari git commit: AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)

2017-01-10 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 7f09e4c6a -> ac66085b3


AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)

- Move shiro.ini and log4j.properties out of zeppelin-env configuration.
- Remove unused zeppelin-env fields
- fix unit tests


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

Branch: refs/heads/trunk
Commit: ac66085b35b69264c6d161a00fc866b5e1a828da
Parents: 7f09e4c
Author: Renjith Kamath 
Authored: Wed Jan 11 07:13:40 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 11 07:13:40 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  87 -
 .../configuration/zeppelin-log4j-properties.xml |  37 
 .../configuration/zeppelin-shiro-ini.xml|  63 +++
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml |   2 +
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../ZEPPELIN/configuration/zeppelin-env.xml | 182 +++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  34 
 .../stacks/2.5/ZEPPELIN/test_zeppelin_master.py |  16 +-
 .../test/python/stacks/2.5/configs/default.json |  26 +--
 .../test/python/stacks/2.5/configs/secured.json |  18 +-
 10 files changed, 354 insertions(+), 115 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ac66085b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 2beac97..e6c59d5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -137,93 +137,6 @@ export SPARK_YARN_USER_ENV="PYTHONPATH=${PYTHONPATH}"
 
   
   
-shiro_ini_content
-This is the jinja template for shiro.ini file
-
-[users]
-# List of users with their password allowed to access Zeppelin.
-# To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
-#admin = password1, admin
-#user1 = password2, role1, role2
-#user2 = password3, role3
-#user3 = password4, role2
-
-# Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
-[main]
-### A sample for configuring Active Directory Realm
-#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
-#activeDirectoryRealm.systemUsername = userNameA
-
-#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
-#activeDirectoryRealm.systemPassword = passwordA
-#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
-#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
-#activeDirectoryRealm.url = ldap://ldap.test.com:389
-#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
-#activeDirectoryRealm.authorizationCachingEnabled = false
-
-### A sample for configuring LDAP Directory Realm
-#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
-## search base for ldap groups (only relevant for LdapGroupRealm):
-#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
-#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
-#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
-#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
-
-### A sample PAM configuration
-#pamRealm=org.apache.zeppelin.realm.PamRealm
-#pamRealm.service=sshd
-
-sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
-
-### If caching of user is required then uncomment below lines
-#cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
-#securityManager.cacheManager = $cacheManager
-
-securityManager.sessionManager = $sessionManager
-# 86,400,000 milliseconds = 24 hour
-securityManager.sessionManager.globalSessionTimeout = 8640
-shiro.loginUrl = /api/login
-
-[roles]
-#role1 = *
-#role2 = *
-#role3 = *
-#admin = *
-
-[urls]
-# This section is used for url-based security.
-# You can secure interpreter, configuration and credential information 

ambari git commit: Revert "AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)"

2017-01-10 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 7244c701a -> e15531981


Revert "AMBARI-17470 Refactor Ambari service def configurations for Zeppelin 
(r-kamath)"

This reverts commit 7244c701aff560fac24210c45b061b0c0b3ad83c.


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

Branch: refs/heads/trunk
Commit: e15531981541372de74f94b1588edd7398ce91f5
Parents: 7244c70
Author: Renjith Kamath 
Authored: Tue Jan 10 22:16:06 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Jan 10 22:16:06 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  87 +
 .../configuration/zeppelin-log4j-properties.xml |  37 
 .../configuration/zeppelin-shiro-ini.xml|  63 ---
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml |   2 -
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../ZEPPELIN/configuration/zeppelin-env.xml | 182 ---
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  34 
 7 files changed, 89 insertions(+), 320 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/e1553198/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index e6c59d5..2beac97 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -137,6 +137,93 @@ export SPARK_YARN_USER_ENV="PYTHONPATH=${PYTHONPATH}"
 
   
   
+shiro_ini_content
+This is the jinja template for shiro.ini file
+
+[users]
+# List of users with their password allowed to access Zeppelin.
+# To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
+#admin = password1, admin
+#user1 = password2, role1, role2
+#user2 = password3, role3
+#user3 = password4, role2
+
+# Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
+[main]
+### A sample for configuring Active Directory Realm
+#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
+#activeDirectoryRealm.systemUsername = userNameA
+
+#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
+#activeDirectoryRealm.systemPassword = passwordA
+#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
+#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
+#activeDirectoryRealm.url = ldap://ldap.test.com:389
+#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
+#activeDirectoryRealm.authorizationCachingEnabled = false
+
+### A sample for configuring LDAP Directory Realm
+#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
+## search base for ldap groups (only relevant for LdapGroupRealm):
+#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
+#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
+#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
+#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
+
+### A sample PAM configuration
+#pamRealm=org.apache.zeppelin.realm.PamRealm
+#pamRealm.service=sshd
+
+sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
+
+### If caching of user is required then uncomment below lines
+#cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
+#securityManager.cacheManager = $cacheManager
+
+securityManager.sessionManager = $sessionManager
+# 86,400,000 milliseconds = 24 hour
+securityManager.sessionManager.globalSessionTimeout = 8640
+shiro.loginUrl = /api/login
+
+[roles]
+#role1 = *
+#role2 = *
+#role3 = *
+#admin = *
+
+[urls]
+# This section is used for url-based security.
+# You can secure interpreter, configuration and credential information by 
urls. Comment or uncomment the below urls that you want to hide.
+# anon means the access is anonymous.
+# authc means Form based Auth Security
+# To enfore security, comment the line below and uncomment the next one

[2/2] ambari git commit: AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)

2017-01-10 Thread rkamath
AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)

- Move shiro.ini and log4j.properties out of zeppelin-env configuration.
- Remove unused zeppelin-env fields


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

Branch: refs/heads/trunk
Commit: 7244c701aff560fac24210c45b061b0c0b3ad83c
Parents: 5134c2d
Author: Renjith Kamath 
Authored: Tue Jan 10 22:08:59 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Jan 10 22:10:04 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  87 -
 .../configuration/zeppelin-log4j-properties.xml |  37 
 .../configuration/zeppelin-shiro-ini.xml|  63 +++
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml |   2 +
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../ZEPPELIN/configuration/zeppelin-env.xml | 182 +++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  34 
 7 files changed, 320 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/7244c701/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 2beac97..e6c59d5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -137,93 +137,6 @@ export SPARK_YARN_USER_ENV="PYTHONPATH=${PYTHONPATH}"
 
   
   
-shiro_ini_content
-This is the jinja template for shiro.ini file
-
-[users]
-# List of users with their password allowed to access Zeppelin.
-# To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
-#admin = password1, admin
-#user1 = password2, role1, role2
-#user2 = password3, role3
-#user3 = password4, role2
-
-# Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
-[main]
-### A sample for configuring Active Directory Realm
-#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
-#activeDirectoryRealm.systemUsername = userNameA
-
-#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
-#activeDirectoryRealm.systemPassword = passwordA
-#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
-#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
-#activeDirectoryRealm.url = ldap://ldap.test.com:389
-#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
-#activeDirectoryRealm.authorizationCachingEnabled = false
-
-### A sample for configuring LDAP Directory Realm
-#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
-## search base for ldap groups (only relevant for LdapGroupRealm):
-#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
-#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
-#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
-#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
-
-### A sample PAM configuration
-#pamRealm=org.apache.zeppelin.realm.PamRealm
-#pamRealm.service=sshd
-
-sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
-
-### If caching of user is required then uncomment below lines
-#cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
-#securityManager.cacheManager = $cacheManager
-
-securityManager.sessionManager = $sessionManager
-# 86,400,000 milliseconds = 24 hour
-securityManager.sessionManager.globalSessionTimeout = 8640
-shiro.loginUrl = /api/login
-
-[roles]
-#role1 = *
-#role2 = *
-#role3 = *
-#admin = *
-
-[urls]
-# This section is used for url-based security.
-# You can secure interpreter, configuration and credential information by 
urls. Comment or uncomment the below urls that you want to hide.
-# anon means the access is anonymous.
-# authc means Form based Auth Security
-# To enfore security, comment the line below and uncomment the next one
-/api/version = anon
-#/api/interpreter/** = authc, 

ambari git commit: AMBARI-19316 Zeppelin stop failed during EU while deleting pid file with customized service user (r-kamath)

2017-01-10 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk f5c573a36 -> 0b6b67024


AMBARI-19316 Zeppelin stop failed during EU while deleting pid file with 
customized service user (r-kamath)


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

Branch: refs/heads/trunk
Commit: 0b6b67024212dd559cd646b51e1cab27300e74d4
Parents: f5c573a
Author: Renjith Kamath 
Authored: Tue Jan 10 21:56:17 2017 +0530
Committer: Renjith Kamath 
Committed: Tue Jan 10 21:56:17 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  |  8 
 .../python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py| 10 +-
 2 files changed, 17 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0b6b6702/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 04089ce..d3d494d 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -104,12 +104,19 @@ class Master(Script):
   mode=0755
   )
 
+  def chown_zeppelin_pid_dir(self, env):
+import params
+env.set_params(params)
+Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), params.zeppelin_pid_dir),
+sudo=True)
+
   def configure(self, env):
 import params
 import status_params
 env.set_params(params)
 env.set_params(status_params)
 self.create_zeppelin_log_dir(env)
+self.chown_zeppelin_pid_dir(env)
 
 # create the pid and zeppelin dirs
 Directory([params.zeppelin_pid_dir, params.zeppelin_dir],
@@ -154,6 +161,7 @@ class Master(Script):
   def stop(self, env, upgrade_type=None):
 import params
 self.create_zeppelin_log_dir(env)
+self.chown_zeppelin_pid_dir(env)
 Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + 
params.zeppelin_log_file,
 user=params.zeppelin_user)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/0b6b6702/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
--
diff --git 
a/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py 
b/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
index aea4ba8..9a3555b 100644
--- a/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
+++ b/ambari-server/src/test/python/stacks/2.5/ZEPPELIN/test_zeppelin_master.py
@@ -39,6 +39,7 @@ class TestZeppelinMaster(RMFTestCase):
 mode = 0755,
 cd_access = 'a',
 )
+self.assertResourceCalled('Execute', ('chown', '-R', u'zeppelin:zeppelin', 
'/var/run/zeppelin'), sudo = True)
 self.assertResourceCalled('Directory', '/var/run/zeppelin',
 owner = 'zeppelin',
 create_parents = True,
@@ -79,7 +80,7 @@ class TestZeppelinMaster(RMFTestCase):
 content = StaticFile('/etc/spark/conf/hive-site.xml'),
 group = 'zeppelin',
 )
- 
+
   def assert_configure_secured(self):
 self.assertResourceCalled('Directory', '/var/log/zeppelin',
 owner = 'zeppelin',
@@ -88,6 +89,7 @@ class TestZeppelinMaster(RMFTestCase):
 mode = 0755,
 cd_access = 'a',
 )
+self.assertResourceCalled('Execute', ('chown', '-R', u'zeppelin:zeppelin', 
'/var/run/zeppelin'), sudo = True)
 self.assertResourceCalled('Directory', '/var/run/zeppelin',
 owner = 'zeppelin',
 create_parents = True,
@@ -166,6 +168,9 @@ class TestZeppelinMaster(RMFTestCase):
 mode = 0755,
 cd_access = 'a',
 )
+self.assertResourceCalled('Execute', ('chown', '-R', u'zeppelin:zeppelin', 
'/var/run/zeppelin'),
+sudo = True,
+)
 self.assertResourceCalled('Execute', 
'/usr/hdp/current/zeppelin-server/bin/zeppelin-daemon.sh stop >> 
/var/log/zeppelin/zeppelin-setup.log',
 user = 'zeppelin',
 )
@@ -186,6 +191,9 @@ class TestZeppelinMaster(RMFTestCase):
 mode = 0755,
 cd_access = 'a',
 )
+self.assertResourceCalled('Execute', ('chown', '-R', u'zeppelin:zeppelin', 
'/var/run/zeppelin'),
+sudo = True,
+)
 self.assertResourceCalled('Execute', 

[1/2] ambari git commit: AMBARI-19399 Workflow imported into Local FS cannot be imported into WFD (Venkata Sairam via r-kamath)

2017-01-09 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 1e2fe429b -> 8a9d5fd52
  refs/heads/trunk 901b56df2 -> 8fa580614


AMBARI-19399 Workflow imported into Local FS cannot be imported into WFD 
(Venkata Sairam via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 8a9d5fd5294d1482af1fbe021bc2c565f2d12769
Parents: 1e2fe42
Author: Renjith Kamath 
Authored: Mon Jan 9 15:50:14 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Jan 9 15:50:14 2017 +0530

--
 .../src/main/resources/ui/app/components/flow-designer.js  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8a9d5fd5/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
index 2dd60a0..9007838 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
@@ -204,7 +204,7 @@ export default Ember.Component.extend(FindNodeMixin, 
Validations, {
   workflowXmlDownload(workflowXml){
   var link = document.createElement("a");
   link.download = "workflow.xml";
-  link.href = "data:text/xml,"+workflowXml;
+  link.href = 
"data:text/xml,"+encodeURIComponent(vkbeautify.xml(workflowXml));
   link.click();
   },
   nodeRendered: function(){



[2/2] ambari git commit: AMBARI-19399 Workflow imported into Local FS cannot be imported into WFD (Venkata Sairam via r-kamath)

2017-01-09 Thread rkamath
AMBARI-19399 Workflow imported into Local FS cannot be imported into WFD 
(Venkata Sairam via r-kamath)


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

Branch: refs/heads/trunk
Commit: 8fa58061480e9f325e74d0637d6d9ac858955911
Parents: 901b56d
Author: Renjith Kamath 
Authored: Mon Jan 9 15:50:14 2017 +0530
Committer: Renjith Kamath 
Committed: Mon Jan 9 15:51:33 2017 +0530

--
 .../src/main/resources/ui/app/components/flow-designer.js  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8fa58061/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
index 2dd60a0..9007838 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/components/flow-designer.js
@@ -204,7 +204,7 @@ export default Ember.Component.extend(FindNodeMixin, 
Validations, {
   workflowXmlDownload(workflowXml){
   var link = document.createElement("a");
   link.download = "workflow.xml";
-  link.href = "data:text/xml,"+workflowXml;
+  link.href = 
"data:text/xml,"+encodeURIComponent(vkbeautify.xml(workflowXml));
   link.click();
   },
   nodeRendered: function(){



[2/2] ambari git commit: AMBARI-19316 Zeppelin stop failed during EU while deleting pid file with customized service user (r-kamath)

2017-01-05 Thread rkamath
AMBARI-19316 Zeppelin stop failed during EU while deleting  pid file with 
customized service user (r-kamath)


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

Branch: refs/heads/trunk
Commit: 25a596769c7c420dc28e3a7178bf7f02dca5880f
Parents: 1b3f039
Author: Renjith Kamath 
Authored: Thu Jan 5 14:30:21 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Jan 5 14:31:28 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/25a59676/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 04089ce..d3d494d 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -104,12 +104,19 @@ class Master(Script):
   mode=0755
   )
 
+  def chown_zeppelin_pid_dir(self, env):
+import params
+env.set_params(params)
+Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), params.zeppelin_pid_dir),
+sudo=True)
+
   def configure(self, env):
 import params
 import status_params
 env.set_params(params)
 env.set_params(status_params)
 self.create_zeppelin_log_dir(env)
+self.chown_zeppelin_pid_dir(env)
 
 # create the pid and zeppelin dirs
 Directory([params.zeppelin_pid_dir, params.zeppelin_dir],
@@ -154,6 +161,7 @@ class Master(Script):
   def stop(self, env, upgrade_type=None):
 import params
 self.create_zeppelin_log_dir(env)
+self.chown_zeppelin_pid_dir(env)
 Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + 
params.zeppelin_log_file,
 user=params.zeppelin_user)
 



[1/2] ambari git commit: AMBARI-19316 Zeppelin stop failed during EU while deleting pid file with customized service user (r-kamath)

2017-01-05 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a2bd023b2 -> b14e303a2
  refs/heads/trunk 1b3f03981 -> 25a596769


AMBARI-19316 Zeppelin stop failed during EU while deleting  pid file with 
customized service user (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: b14e303a2542d0ab9e0e1582eb00fc1e5b0509f6
Parents: a2bd023
Author: Renjith Kamath 
Authored: Thu Jan 5 14:30:21 2017 +0530
Committer: Renjith Kamath 
Committed: Thu Jan 5 14:30:21 2017 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b14e303a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 04089ce..d3d494d 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -104,12 +104,19 @@ class Master(Script):
   mode=0755
   )
 
+  def chown_zeppelin_pid_dir(self, env):
+import params
+env.set_params(params)
+Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), params.zeppelin_pid_dir),
+sudo=True)
+
   def configure(self, env):
 import params
 import status_params
 env.set_params(params)
 env.set_params(status_params)
 self.create_zeppelin_log_dir(env)
+self.chown_zeppelin_pid_dir(env)
 
 # create the pid and zeppelin dirs
 Directory([params.zeppelin_pid_dir, params.zeppelin_dir],
@@ -154,6 +161,7 @@ class Master(Script):
   def stop(self, env, upgrade_type=None):
 import params
 self.create_zeppelin_log_dir(env)
+self.chown_zeppelin_pid_dir(env)
 Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh stop >> ' + 
params.zeppelin_log_file,
 user=params.zeppelin_user)
 



[1/2] ambari git commit: AMBARI-19334 XML formatting while workflow preview (Venkata Sairam via r-kamath)

2017-01-03 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f9d54855d -> dcb96e93a
  refs/heads/trunk 34bc40ece -> 4c12e5de8


AMBARI-19334 XML formatting while workflow  preview (Venkata Sairam via 
r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: dcb96e93a42dfb27c1a7fed52ae1106299d1ed60
Parents: f9d5485
Author: Renjith Kamath 
Authored: Wed Jan 4 13:00:44 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 4 13:00:44 2017 +0530

--
 .../views/wfmanager/src/main/resources/ui/ember-cli-build.js   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/dcb96e93/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
--
diff --git a/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js 
b/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
index 20f5971..bf48e9c 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
@@ -25,9 +25,9 @@ module.exports = function(defaults) {
 var app = new EmberApp(defaults, {
 // Add options here
   codemirror: {
-// modes: ['xml'],
-// keyMaps: ['vim'],
-// themes: ['solarized']
+ modes: ['xml'],
+ keyMaps: ['vim'],
+ themes: ['solarized']
   }
 });
 



[2/2] ambari git commit: AMBARI-19334 XML formatting while workflow preview (Venkata Sairam via r-kamath)

2017-01-03 Thread rkamath
AMBARI-19334 XML formatting while workflow  preview (Venkata Sairam via 
r-kamath)


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

Branch: refs/heads/trunk
Commit: 4c12e5de8040d0a32f6d0b0eb8f574ba10d5144b
Parents: 34bc40e
Author: Renjith Kamath 
Authored: Wed Jan 4 13:00:44 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 4 13:01:27 2017 +0530

--
 .../views/wfmanager/src/main/resources/ui/ember-cli-build.js   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4c12e5de/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
--
diff --git a/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js 
b/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
index 20f5971..bf48e9c 100644
--- a/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
+++ b/contrib/views/wfmanager/src/main/resources/ui/ember-cli-build.js
@@ -25,9 +25,9 @@ module.exports = function(defaults) {
 var app = new EmberApp(defaults, {
 // Add options here
   codemirror: {
-// modes: ['xml'],
-// keyMaps: ['vim'],
-// themes: ['solarized']
+ modes: ['xml'],
+ keyMaps: ['vim'],
+ themes: ['solarized']
   }
 });
 



ambari git commit: Revert "AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)"

2017-01-03 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a6fedf46e -> f9d54855d


Revert "AMBARI-17470 Refactor Ambari service def configurations for Zeppelin 
(r-kamath)"

This reverts commit 8542c5c47fdb20441aff7a9a0f9e451709a1f2b7.


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

Branch: refs/heads/branch-2.5
Commit: f9d54855d3162d534b0baecdf0cb196e6bc0e01d
Parents: a6fedf4
Author: Renjith Kamath 
Authored: Wed Jan 4 12:55:41 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 4 12:55:41 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  87 +
 .../configuration/zeppelin-log4j-properties.xml |  37 
 .../configuration/zeppelin-shiro-ini.xml|  63 ---
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml |   2 -
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../ZEPPELIN/configuration/zeppelin-env.xml | 182 ---
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  34 
 7 files changed, 89 insertions(+), 320 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f9d54855/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index e6c59d5..2beac97 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -137,6 +137,93 @@ export SPARK_YARN_USER_ENV="PYTHONPATH=${PYTHONPATH}"
 
   
   
+shiro_ini_content
+This is the jinja template for shiro.ini file
+
+[users]
+# List of users with their password allowed to access Zeppelin.
+# To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
+#admin = password1, admin
+#user1 = password2, role1, role2
+#user2 = password3, role3
+#user3 = password4, role2
+
+# Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
+[main]
+### A sample for configuring Active Directory Realm
+#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
+#activeDirectoryRealm.systemUsername = userNameA
+
+#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
+#activeDirectoryRealm.systemPassword = passwordA
+#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
+#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
+#activeDirectoryRealm.url = ldap://ldap.test.com:389
+#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
+#activeDirectoryRealm.authorizationCachingEnabled = false
+
+### A sample for configuring LDAP Directory Realm
+#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
+## search base for ldap groups (only relevant for LdapGroupRealm):
+#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
+#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
+#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
+#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
+
+### A sample PAM configuration
+#pamRealm=org.apache.zeppelin.realm.PamRealm
+#pamRealm.service=sshd
+
+sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
+
+### If caching of user is required then uncomment below lines
+#cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
+#securityManager.cacheManager = $cacheManager
+
+securityManager.sessionManager = $sessionManager
+# 86,400,000 milliseconds = 24 hour
+securityManager.sessionManager.globalSessionTimeout = 8640
+shiro.loginUrl = /api/login
+
+[roles]
+#role1 = *
+#role2 = *
+#role3 = *
+#admin = *
+
+[urls]
+# This section is used for url-based security.
+# You can secure interpreter, configuration and credential information by 
urls. Comment or uncomment the below urls that you want to hide.
+# anon means the access is anonymous.
+# authc means Form based Auth Security
+# To enfore security, comment the line below and uncomment the next one

[3/3] ambari git commit: AMBARI-19335 To support permission in string format for FS action node (Venkata Sairam via r-kamath)

2017-01-03 Thread rkamath
AMBARI-19335 To support permission in string format for FS  action node 
(Venkata Sairam via r-kamath)


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

Branch: refs/heads/trunk
Commit: 34bc40ece5b0dc6eed311ecccf7a29f822db1879
Parents: 976e40a
Author: Renjith Kamath 
Authored: Wed Jan 4 12:52:08 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 4 12:53:42 2017 +0530

--
 .../resources/ui/app/domain/actionjob_hanlder.js   | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34bc40ec/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
index af61c91..b0453e2 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
@@ -434,8 +434,19 @@ var FSActionJobHandler=ActionJobHandler.extend({
 settings.path=fileOpJson._path;
 settings.permissions=fileOpJson._permissions;
 var perm = settings.permissions.toString();
-
-
+if(isNaN(perm)){
+  var permList = {"-":0,"r":1,"w":2,"x":4}, permissionNumFormat = 
"", permTokenNum = 0, tempArr = [1,4,7];
+  for(let p=0; p

[1/3] ambari git commit: AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)

2017-01-03 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2c7dd8362 -> a6fedf46e
  refs/heads/trunk 976e40a67 -> 34bc40ece


AMBARI-17470 Refactor Ambari service def configurations for Zeppelin (r-kamath)

- Move shiro.ini and log4j.properties out of zeppelin-env configuration.
- Remove unused zeppelin-env fields


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

Branch: refs/heads/branch-2.5
Commit: 8542c5c47fdb20441aff7a9a0f9e451709a1f2b7
Parents: 2c7dd83
Author: Renjith Kamath 
Authored: Mon Jan 2 19:34:52 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 4 12:50:59 2017 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|  87 -
 .../configuration/zeppelin-log4j-properties.xml |  37 
 .../configuration/zeppelin-shiro-ini.xml|  63 +++
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml |   2 +
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../ZEPPELIN/configuration/zeppelin-env.xml | 182 +++
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  34 
 7 files changed, 320 insertions(+), 89 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/8542c5c4/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 2beac97..e6c59d5 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -137,93 +137,6 @@ export SPARK_YARN_USER_ENV="PYTHONPATH=${PYTHONPATH}"
 
   
   
-shiro_ini_content
-This is the jinja template for shiro.ini file
-
-[users]
-# List of users with their password allowed to access Zeppelin.
-# To use a different strategy (LDAP / Database / ...) check the shiro doc at 
http://shiro.apache.org/configuration.html#Configuration-INISections
-#admin = password1, admin
-#user1 = password2, role1, role2
-#user2 = password3, role3
-#user3 = password4, role2
-
-# Sample LDAP configuration, for user Authentication, currently tested for 
single Realm
-[main]
-### A sample for configuring Active Directory Realm
-#activeDirectoryRealm = org.apache.zeppelin.realm.ActiveDirectoryGroupRealm
-#activeDirectoryRealm.systemUsername = userNameA
-
-#use either systemPassword or hadoopSecurityCredentialPath, more details in 
http://zeppelin.apache.org/docs/latest/security/shiroauthentication.html
-#activeDirectoryRealm.systemPassword = passwordA
-#activeDirectoryRealm.hadoopSecurityCredentialPath = 
jceks://file/user/zeppelin/zeppelin.jceks
-#activeDirectoryRealm.searchBase = CN=Users,DC=SOME_GROUP,DC=COMPANY,DC=COM
-#activeDirectoryRealm.url = ldap://ldap.test.com:389
-#activeDirectoryRealm.groupRolesMap = 
"CN=admin,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"admin","CN=finance,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"finance","CN=hr,OU=groups,DC=SOME_GROUP,DC=COMPANY,DC=COM":"hr"
-#activeDirectoryRealm.authorizationCachingEnabled = false
-
-### A sample for configuring LDAP Directory Realm
-#ldapRealm = org.apache.zeppelin.realm.LdapGroupRealm
-## search base for ldap groups (only relevant for LdapGroupRealm):
-#ldapRealm.contextFactory.environment[ldap.searchBase] = dc=COMPANY,dc=COM
-#ldapRealm.contextFactory.url = ldap://ldap.test.com:389
-#ldapRealm.userDnTemplate = uid={0},ou=Users,dc=COMPANY,dc=COM
-#ldapRealm.contextFactory.authenticationMechanism = SIMPLE
-
-### A sample PAM configuration
-#pamRealm=org.apache.zeppelin.realm.PamRealm
-#pamRealm.service=sshd
-
-sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager
-
-### If caching of user is required then uncomment below lines
-#cacheManager = org.apache.shiro.cache.MemoryConstrainedCacheManager
-#securityManager.cacheManager = $cacheManager
-
-securityManager.sessionManager = $sessionManager
-# 86,400,000 milliseconds = 24 hour
-securityManager.sessionManager.globalSessionTimeout = 8640
-shiro.loginUrl = /api/login
-
-[roles]
-#role1 = *
-#role2 = *
-#role3 = *
-#admin = *
-
-[urls]
-# This section is used for url-based security.
-# You can secure interpreter, configuration and credential information by 
urls. Comment or uncomment the below urls that you want to hide.
-# anon means the access is anonymous.
-# authc means Form based Auth 

[2/3] ambari git commit: AMBARI-19335 To support permission in string format for FS action node (Venkata Sairam via r-kamath)

2017-01-03 Thread rkamath
AMBARI-19335 To support permission in string format for FS  action node 
(Venkata Sairam via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: a6fedf46efb54139c9d4b2dffeef8e8b95ec058c
Parents: 8542c5c
Author: Renjith Kamath 
Authored: Wed Jan 4 12:52:08 2017 +0530
Committer: Renjith Kamath 
Committed: Wed Jan 4 12:52:08 2017 +0530

--
 .../resources/ui/app/domain/actionjob_hanlder.js   | 17 ++---
 1 file changed, 14 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a6fedf46/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
--
diff --git 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
index af61c91..b0453e2 100644
--- 
a/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
+++ 
b/contrib/views/wfmanager/src/main/resources/ui/app/domain/actionjob_hanlder.js
@@ -434,8 +434,19 @@ var FSActionJobHandler=ActionJobHandler.extend({
 settings.path=fileOpJson._path;
 settings.permissions=fileOpJson._permissions;
 var perm = settings.permissions.toString();
-
-
+if(isNaN(perm)){
+  var permList = {"-":0,"r":1,"w":2,"x":4}, permissionNumFormat = 
"", permTokenNum = 0, tempArr = [1,4,7];
+  for(let p=0; p

[1/2] ambari git commit: AMBARI-19290 Refactor jdbc-like interpreter example properties and improve JDBC in Zeppelin service (Prabhjyot Singh via r-kamath)

2016-12-26 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f871d9521 -> a249a3390
  refs/heads/trunk 4fa08766f -> d0c5fe041


AMBARI-19290 Refactor jdbc-like interpreter example properties and improve JDBC 
in Zeppelin service (Prabhjyot Singh via r-kamath)

- changes introduced in ZEPPELIN-1489


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

Branch: refs/heads/branch-2.5
Commit: a249a3390eb7e633b3e61004a9e73da66af97eac
Parents: f871d95
Author: Renjith Kamath 
Authored: Mon Dec 26 14:52:33 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 14:52:33 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/a249a339/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index cfd6963..0bcc282 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -286,6 +286,9 @@ class Master(Script):
   if interpreter['group'] == 'jdbc':
 interpreter['dependencies'] = []
 if params.hive_server_host:
+  interpreter['properties']['hive.driver'] = 
'org.apache.hive.jdbc.HiveDriver'
+  interpreter['properties']['hive.user'] = 'hive'
+  interpreter['properties']['hive.password'] = ''
   if params.hive_server2_support_dynamic_service_discovery:
 interpreter['properties']['hive.url'] = 'jdbc:hive2://' + \
  params.hive_zookeeper_quorum 
+ \
@@ -303,6 +306,10 @@ class Master(Script):
 
 if params.zookeeper_znode_parent \
 and params.hbase_zookeeper_quorum:
+interpreter['properties']['phoenix.driver'] = 
'org.apache.phoenix.jdbc.PhoenixDriver'
+interpreter['properties']['phoenix.hbase.client.retries.number'] = 
'1'
+interpreter['properties']['phoenix.user'] = 'phoenixuser'
+interpreter['properties']['phoenix.password'] = ''
 interpreter['properties']['phoenix.url'] = "jdbc:phoenix:" + \
 
params.hbase_zookeeper_quorum + ':' + \
 
params.zookeeper_znode_parent



[2/2] ambari git commit: AMBARI-19290 Refactor jdbc-like interpreter example properties and improve JDBC in Zeppelin service (Prabhjyot Singh via r-kamath)

2016-12-26 Thread rkamath
AMBARI-19290 Refactor jdbc-like interpreter example properties and improve JDBC 
in Zeppelin service (Prabhjyot Singh via r-kamath)

- changes introduced in ZEPPELIN-1489


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

Branch: refs/heads/trunk
Commit: d0c5fe041335c40fcd38cd4cbeeda8aebf84b703
Parents: 4fa0876
Author: Renjith Kamath 
Authored: Mon Dec 26 14:52:33 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 14:54:20 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 7 +++
 1 file changed, 7 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/d0c5fe04/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index cfd6963..0bcc282 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -286,6 +286,9 @@ class Master(Script):
   if interpreter['group'] == 'jdbc':
 interpreter['dependencies'] = []
 if params.hive_server_host:
+  interpreter['properties']['hive.driver'] = 
'org.apache.hive.jdbc.HiveDriver'
+  interpreter['properties']['hive.user'] = 'hive'
+  interpreter['properties']['hive.password'] = ''
   if params.hive_server2_support_dynamic_service_discovery:
 interpreter['properties']['hive.url'] = 'jdbc:hive2://' + \
  params.hive_zookeeper_quorum 
+ \
@@ -303,6 +306,10 @@ class Master(Script):
 
 if params.zookeeper_znode_parent \
 and params.hbase_zookeeper_quorum:
+interpreter['properties']['phoenix.driver'] = 
'org.apache.phoenix.jdbc.PhoenixDriver'
+interpreter['properties']['phoenix.hbase.client.retries.number'] = 
'1'
+interpreter['properties']['phoenix.user'] = 'phoenixuser'
+interpreter['properties']['phoenix.password'] = ''
 interpreter['properties']['phoenix.url'] = "jdbc:phoenix:" + \
 
params.hbase_zookeeper_quorum + ':' + \
 
params.zookeeper_znode_parent



[2/2] ambari git commit: Revert "AMBARI-19264 Zeppelin Notebook Component is not able start after reboot (r-kamath)"

2016-12-25 Thread rkamath
Revert "AMBARI-19264 Zeppelin Notebook Component is not able start after reboot 
(r-kamath)"

This reverts commit 5822c2f512fab4aca1443ab04c7ceba4c272e5d1.


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

Branch: refs/heads/trunk
Commit: 4fa08766fcc7dbf842b6672fe838c8ad04520ec0
Parents: 5822c2f
Author: Renjith Kamath 
Authored: Mon Dec 26 11:55:38 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 11:55:38 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/4fa08766/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 8053648..cfd6963 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -161,14 +161,6 @@ class Master(Script):
 import time
 self.configure(env)
 
-Directory([params.zeppelin_pid_dir],
-  owner=params.zeppelin_user,
-  group=params.zeppelin_group,
-  cd_access="a",
-  create_parents=True,
-  mode=0755
-  )
-
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), "/etc/zeppelin"),
 sudo=True)
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"),



[1/2] ambari git commit: Revert "AMBARI-19264 Zeppelin Notebook Component is not able start after reboot (r-kamath)"

2016-12-25 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 07261b0c3 -> f871d9521
  refs/heads/trunk 5822c2f51 -> 4fa08766f


Revert "AMBARI-19264 Zeppelin Notebook Component is not able start after reboot 
(r-kamath)"

This reverts commit 07261b0c3fbe86582198911c773f8fb5b44d1f67.


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

Branch: refs/heads/branch-2.5
Commit: f871d95212150a65c9fae13aae382542e8362d15
Parents: 07261b0
Author: Renjith Kamath 
Authored: Mon Dec 26 11:55:20 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 11:55:20 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/f871d952/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 8053648..cfd6963 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -161,14 +161,6 @@ class Master(Script):
 import time
 self.configure(env)
 
-Directory([params.zeppelin_pid_dir],
-  owner=params.zeppelin_user,
-  group=params.zeppelin_group,
-  cd_access="a",
-  create_parents=True,
-  mode=0755
-  )
-
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), "/etc/zeppelin"),
 sudo=True)
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"),



[2/2] ambari git commit: AMBARI-19264 Zeppelin Notebook Component is not able start after reboot (r-kamath)

2016-12-25 Thread rkamath
AMBARI-19264 Zeppelin Notebook Component is not able start after reboot 
(r-kamath)


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

Branch: refs/heads/trunk
Commit: 5822c2f512fab4aca1443ab04c7ceba4c272e5d1
Parents: ef79c6d
Author: Renjith Kamath 
Authored: Mon Dec 26 11:51:03 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 11:51:57 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/5822c2f5/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index cfd6963..8053648 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -161,6 +161,14 @@ class Master(Script):
 import time
 self.configure(env)
 
+Directory([params.zeppelin_pid_dir],
+  owner=params.zeppelin_user,
+  group=params.zeppelin_group,
+  cd_access="a",
+  create_parents=True,
+  mode=0755
+  )
+
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), "/etc/zeppelin"),
 sudo=True)
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"),



[1/2] ambari git commit: AMBARI-19264 Zeppelin Notebook Component is not able start after reboot (r-kamath)

2016-12-25 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 64c87b235 -> 07261b0c3
  refs/heads/trunk ef79c6d83 -> 5822c2f51


AMBARI-19264 Zeppelin Notebook Component is not able start after reboot 
(r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 07261b0c3fbe86582198911c773f8fb5b44d1f67
Parents: 64c87b2
Author: Renjith Kamath 
Authored: Mon Dec 26 11:51:03 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 11:51:03 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 8 
 1 file changed, 8 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/07261b0c/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index cfd6963..8053648 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -161,6 +161,14 @@ class Master(Script):
 import time
 self.configure(env)
 
+Directory([params.zeppelin_pid_dir],
+  owner=params.zeppelin_user,
+  group=params.zeppelin_group,
+  cd_access="a",
+  create_parents=True,
+  mode=0755
+  )
+
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"), "/etc/zeppelin"),
 sudo=True)
 Execute(("chown", "-R", format("{zeppelin_user}") + ":" + 
format("{zeppelin_group}"),



ambari git commit: AMBARI-19263 Remove Spark dependency from Zeppelin service def (r-kamath)

2016-12-25 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 f4475c43a -> 64c87b235


AMBARI-19263 Remove Spark dependency from Zeppelin service def (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 64c87b235afb148780a1d147de579a7d2e35fc53
Parents: f4475c4
Author: Renjith Kamath 
Authored: Mon Dec 26 11:42:18 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 11:43:53 2016 +0530

--
 .../resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml| 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/64c87b23/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
index 382e913..9a0ba5f 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
@@ -80,10 +80,6 @@ limitations under the License.
 300
   
 
-  
-SPARK
-  
-
   
 zeppelin-config
 zeppelin-env



ambari git commit: AMBARI-19263 Remove Spark dependency from Zeppelin service def (r-kamath)

2016-12-25 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk bff44261a -> ef79c6d83


AMBARI-19263 Remove Spark dependency from Zeppelin service def (r-kamath)


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

Branch: refs/heads/trunk
Commit: ef79c6d83d7149eb8d214a173f6aca6c2472faa2
Parents: bff4426
Author: Renjith Kamath 
Authored: Mon Dec 26 11:42:18 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 26 11:43:03 2016 +0530

--
 .../resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml| 4 
 1 file changed, 4 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/ef79c6d8/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
index 382e913..9a0ba5f 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/metainfo.xml
@@ -80,10 +80,6 @@ limitations under the License.
 300
   
 
-  
-SPARK
-  
-
   
 zeppelin-config
 zeppelin-env



[1/2] ambari git commit: AMBARI-19265 Zeppelin fails to install when hive-site.xml does not exist in spark conf directory (r-kamath)

2016-12-21 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 fa4dab96d -> 66cb2f3bd
  refs/heads/trunk b9271c308 -> 170d3bef6


AMBARI-19265 Zeppelin fails to install when hive-site.xml  does not exist in 
spark conf directory (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 66cb2f3bd14e39a6468b07981eba7fe3f5cf2e48
Parents: fa4dab9
Author: Renjith Kamath 
Authored: Thu Dec 22 12:43:25 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 22 12:43:25 2016 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/66cb2f3b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 0b79d37..39941f7 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -55,9 +55,6 @@ class Master(Script):
   mode=0755
   )
 
-# update the configs specified by user
-self.configure(env)
-
 if params.spark_version:
   Execute('echo spark_version:' + str(params.spark_version) + ' detected 
for spark_home: '
   + params.spark_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)



[2/2] ambari git commit: AMBARI-19265 Zeppelin fails to install when hive-site.xml does not exist in spark conf directory (r-kamath)

2016-12-21 Thread rkamath
AMBARI-19265 Zeppelin fails to install when hive-site.xml  does not exist in 
spark conf directory (r-kamath)


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

Branch: refs/heads/trunk
Commit: 170d3bef601da41952e466d49147e8772d5fa303
Parents: b9271c3
Author: Renjith Kamath 
Authored: Thu Dec 22 12:43:25 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 22 12:44:05 2016 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py  | 3 ---
 1 file changed, 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/170d3bef/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 0b79d37..39941f7 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -55,9 +55,6 @@ class Master(Script):
   mode=0755
   )
 
-# update the configs specified by user
-self.configure(env)
-
 if params.spark_version:
   Execute('echo spark_version:' + str(params.spark_version) + ' detected 
for spark_home: '
   + params.spark_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)



ambari git commit: AMBARI-19271 Update Zeppelin version in service def to 0.6.2 instead of 0.7.0 (r-kamath)

2016-12-21 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 0f2ec4f45 -> 799036850


AMBARI-19271 Update Zeppelin version in service def to 0.6.2 instead of 0.7.0 
(r-kamath)


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

Branch: refs/heads/trunk
Commit: 79903685076122292f8773efa29ef2496fc3aeb8
Parents: 0f2ec4f
Author: Renjith Kamath 
Authored: Wed Dec 21 21:02:30 2016 +0530
Committer: Renjith Kamath 
Committed: Wed Dec 21 21:12:52 2016 +0530

--
 .../main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/79903685/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
index e8ab191..dad54e8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
@@ -21,7 +21,7 @@
   
 
   ZEPPELIN
-  0.7.0.2.6
+  0.6.2.2.6
 
   
 



ambari git commit: AMBARI-19271 Update Zeppelin version in service def to 0.6.2 instead of 0.7.0 (r-kamath)

2016-12-21 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8ea68ca44 -> cafe61c35


AMBARI-19271 Update Zeppelin version in service def to 0.6.2 instead of 0.7.0 
(r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: cafe61c356b702b8e3c9d6aff3701ddffd4a057f
Parents: 8ea68ca
Author: Renjith Kamath 
Authored: Wed Dec 21 21:02:30 2016 +0530
Committer: Renjith Kamath 
Committed: Wed Dec 21 21:02:30 2016 +0530

--
 .../main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/cafe61c3/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
index e8ab191..dad54e8 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
@@ -21,7 +21,7 @@
   
 
   ZEPPELIN
-  0.7.0.2.6
+  0.6.2.2.6
 
   
 



[2/2] ambari git commit: AMBARI-19222 %livy interpreter gives 400 HttpClientError due to spark.master property present in livy-spark-blacklist (Prabhjyot Singh via r-kamath)

2016-12-18 Thread rkamath
AMBARI-19222 %livy interpreter gives 400 HttpClientError due to spark.master 
property present in livy-spark-blacklist (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: fce9d6e090c9433f5783871aab73cdb3e16c9335
Parents: 7ec550a
Author: Renjith Kamath 
Authored: Mon Dec 19 12:40:02 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 19 12:41:13 2016 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py| 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/fce9d6e0/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 9cc808b..0b79d37 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -312,7 +312,6 @@ class Master(Script):
 interpreter['dependencies'].append(
 {"groupArtifactVersion": 
"org.apache.phoenix:phoenix-core:4.7.0-HBase-1.1", "local": "false"})
   elif interpreter['group'] == 'livy' and params.livy_livyserver_host:
-interpreter['properties']['livy.spark.master'] = "yarn-cluster"
 interpreter['properties']['zeppelin.livy.url'] = "http://; + 
params.livy_livyserver_host +\
   ":" + 
params.livy_livyserver_port
 



[1/2] ambari git commit: AMBARI-19222 %livy interpreter gives 400 HttpClientError due to spark.master property present in livy-spark-blacklist (Prabhjyot Singh via r-kamath)

2016-12-18 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 904ff8d3e -> 3cea98fcd
  refs/heads/trunk 7ec550aae -> fce9d6e09


AMBARI-19222 %livy interpreter gives 400 HttpClientError due to spark.master 
property present in livy-spark-blacklist (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 3cea98fcd49949779a1749bd49362510d7c4b349
Parents: 904ff8d
Author: Renjith Kamath 
Authored: Mon Dec 19 12:40:02 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Dec 19 12:40:02 2016 +0530

--
 .../common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py| 1 -
 1 file changed, 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/3cea98fc/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 9cc808b..0b79d37 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -312,7 +312,6 @@ class Master(Script):
 interpreter['dependencies'].append(
 {"groupArtifactVersion": 
"org.apache.phoenix:phoenix-core:4.7.0-HBase-1.1", "local": "false"})
   elif interpreter['group'] == 'livy' and params.livy_livyserver_host:
-interpreter['properties']['livy.spark.master'] = "yarn-cluster"
 interpreter['properties']['zeppelin.livy.url'] = "http://; + 
params.livy_livyserver_host +\
   ":" + 
params.livy_livyserver_port
 



[1/2] ambari git commit: AMBARI-19214 fix rat check failure (r-kamath)

2016-12-15 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d9a03d43c -> 47dabf349
  refs/heads/trunk f7399125e -> c74df6f57


AMBARI-19214 fix rat check failure (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 47dabf3497d71b1b2252aceda105190a57acfaf7
Parents: d9a03d4
Author: Renjith Kamath 
Authored: Thu Dec 15 23:02:52 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 15 23:02:52 2016 +0530

--
 .../package/scripts/spark2_config_template.py   | 20 
 1 file changed, 20 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/47dabf34/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
index 0e81542..28a63c6 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
@@ -1,3 +1,23 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
 template = '''
 {
   "id": "2C4U48MY3_spark2",



[2/2] ambari git commit: AMBARI-19214 fix rat check failure (r-kamath)

2016-12-15 Thread rkamath
AMBARI-19214 fix rat check failure (r-kamath)


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

Branch: refs/heads/trunk
Commit: c74df6f574a5c209208428bf4afba9ba0a394d9c
Parents: f739912
Author: Renjith Kamath 
Authored: Thu Dec 15 23:02:52 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 15 23:03:54 2016 +0530

--
 .../package/scripts/spark2_config_template.py   | 20 
 1 file changed, 20 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c74df6f5/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
index 0e81542..28a63c6 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/spark2_config_template.py
@@ -1,3 +1,23 @@
+#!/usr/bin/env python
+"""
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+"""
+
 template = '''
 {
   "id": "2C4U48MY3_spark2",



[1/2] ambari git commit: AMBARI-19123 Update zeppelin configuration for ambari 2.5 (prabhjyotsingh)

2016-12-14 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2d8a77642 -> 34aa7559f
  refs/heads/trunk b77b2fac3 -> 61255affe


AMBARI-19123 Update zeppelin configuration for ambari 2.5 (prabhjyotsingh)


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

Branch: refs/heads/branch-2.5
Commit: 34aa7559fc25e357709bca0c9869e950a1de
Parents: 2d8a776
Author: Renjith Kamath 
Authored: Thu Dec 15 12:07:18 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 15 12:07:18 2016 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml| 163 ++-
 1 file changed, 88 insertions(+), 75 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/34aa7559/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 317ad73..2beac97 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -60,94 +60,80 @@
 zeppelin_env_content
 This is the jinja template for zeppelin-env.sh 
file
 
-# Spark master url. eg. spark://master_addr:7077. Leave empty if you want to 
use local mode
+# export JAVA_HOME=
+export JAVA_HOME={{java64_home}}
+# export MASTER=  # Spark master url. eg. 
spark://master_addr:7077. Leave empty if you want to use local mode.
 export MASTER=yarn-client
 export SPARK_YARN_JAR={{spark_jar}}
+# export ZEPPELIN_JAVA_OPTS   # Additional jvm options. for 
example, export ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory=8g 
-Dspark.cores.max=16"
+export ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory={{executor_mem}} 
-Dspark.executor.instances={{executor_instances}} 
-Dspark.yarn.queue={{spark_queue}}"
+# export ZEPPELIN_MEM # Zeppelin jvm mem options 
Default -Xms1024m -Xmx1024m -XX:MaxPermSize=512m
+# export ZEPPELIN_INTP_MEM# zeppelin interpreter process 
jvm mem options. Default -Xms1024m -Xmx1024m -XX:MaxPermSize=512m
+# export ZEPPELIN_INTP_JAVA_OPTS  # zeppelin interpreter process 
jvm options.
+# export ZEPPELIN_SSL_PORT# ssl port (used when ssl 
environment variable is set to true)
 
-
-# Where log files are stored.  PWD by default.
+# export ZEPPELIN_LOG_DIR # Where log files are stored.  
PWD by default.
 export ZEPPELIN_LOG_DIR={{zeppelin_log_dir}}
-
-# The pid files are stored. /tmp by default.
+# export ZEPPELIN_PID_DIR # The pid files are stored. 
${ZEPPELIN_HOME}/run by default.
 export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
-
-
-export JAVA_HOME={{java64_home}}
-
-# Additional jvm options. for example, export 
ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory=8g -Dspark.cores.max=16"
-export ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory={{executor_mem}} 
-Dspark.executor.instances={{executor_instances}} 
-Dspark.yarn.queue={{spark_queue}}"
-
-
-# Zeppelin jvm mem options Default -Xmx1024m -XX:MaxPermSize=512m
-# export ZEPPELIN_MEM
-
-# zeppelin interpreter process jvm mem options. Defualt = ZEPPELIN_MEM
-# export ZEPPELIN_INTP_MEM
-
-# zeppelin interpreter process jvm options. Default = ZEPPELIN_JAVA_OPTS
-# export ZEPPELIN_INTP_JAVA_OPTS
-
-# Where notebook saved
-# export ZEPPELIN_NOTEBOOK_DIR
-
-# Id of notebook to be displayed in homescreen. ex) 2A94M5J1Z
-# export ZEPPELIN_NOTEBOOK_HOMESCREEN
-
-# hide homescreen notebook from list when this value set to "true". default 
"false"
-# export ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE
-
-# Bucket where notebook saved
-# export ZEPPELIN_NOTEBOOK_S3_BUCKET
-
-# User in bucket where notebook saved. For example 
bucket/user/notebook/2A94M5J1Z/note.json
-# export ZEPPELIN_NOTEBOOK_S3_USER
-
-# A string representing this instance of zeppelin. $USER by default
-# export ZEPPELIN_IDENT_STRING
-
-# The scheduling priority for daemons. Defaults to 0.
-# export ZEPPELIN_NICENESS
-
+# export ZEPPELIN_WAR_TEMPDIR # The location of jetty 
temporary directory.
+# export ZEPPELIN_NOTEBOOK_DIR# Where notebook saved
+# export ZEPPELIN_NOTEBOOK_HOMESCREEN # Id of notebook to be displayed 
in homescreen. ex) 2A94M5J1Z
+# export ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE# hide 

[2/2] ambari git commit: AMBARI-19123 Update zeppelin configuration for ambari 2.5 (prabhjyotsingh)

2016-12-14 Thread rkamath
AMBARI-19123 Update zeppelin configuration for ambari 2.5 (prabhjyotsingh)


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

Branch: refs/heads/trunk
Commit: 61255affedf34ea0c29bfe513945e81f4a1d6a74
Parents: b77b2fa
Author: Renjith Kamath 
Authored: Thu Dec 15 12:07:18 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 15 12:08:47 2016 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml| 163 ++-
 1 file changed, 88 insertions(+), 75 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/61255aff/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index 317ad73..2beac97 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -60,94 +60,80 @@
 zeppelin_env_content
 This is the jinja template for zeppelin-env.sh 
file
 
-# Spark master url. eg. spark://master_addr:7077. Leave empty if you want to 
use local mode
+# export JAVA_HOME=
+export JAVA_HOME={{java64_home}}
+# export MASTER=  # Spark master url. eg. 
spark://master_addr:7077. Leave empty if you want to use local mode.
 export MASTER=yarn-client
 export SPARK_YARN_JAR={{spark_jar}}
+# export ZEPPELIN_JAVA_OPTS   # Additional jvm options. for 
example, export ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory=8g 
-Dspark.cores.max=16"
+export ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory={{executor_mem}} 
-Dspark.executor.instances={{executor_instances}} 
-Dspark.yarn.queue={{spark_queue}}"
+# export ZEPPELIN_MEM # Zeppelin jvm mem options 
Default -Xms1024m -Xmx1024m -XX:MaxPermSize=512m
+# export ZEPPELIN_INTP_MEM# zeppelin interpreter process 
jvm mem options. Default -Xms1024m -Xmx1024m -XX:MaxPermSize=512m
+# export ZEPPELIN_INTP_JAVA_OPTS  # zeppelin interpreter process 
jvm options.
+# export ZEPPELIN_SSL_PORT# ssl port (used when ssl 
environment variable is set to true)
 
-
-# Where log files are stored.  PWD by default.
+# export ZEPPELIN_LOG_DIR # Where log files are stored.  
PWD by default.
 export ZEPPELIN_LOG_DIR={{zeppelin_log_dir}}
-
-# The pid files are stored. /tmp by default.
+# export ZEPPELIN_PID_DIR # The pid files are stored. 
${ZEPPELIN_HOME}/run by default.
 export ZEPPELIN_PID_DIR={{zeppelin_pid_dir}}
-
-
-export JAVA_HOME={{java64_home}}
-
-# Additional jvm options. for example, export 
ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory=8g -Dspark.cores.max=16"
-export ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory={{executor_mem}} 
-Dspark.executor.instances={{executor_instances}} 
-Dspark.yarn.queue={{spark_queue}}"
-
-
-# Zeppelin jvm mem options Default -Xmx1024m -XX:MaxPermSize=512m
-# export ZEPPELIN_MEM
-
-# zeppelin interpreter process jvm mem options. Defualt = ZEPPELIN_MEM
-# export ZEPPELIN_INTP_MEM
-
-# zeppelin interpreter process jvm options. Default = ZEPPELIN_JAVA_OPTS
-# export ZEPPELIN_INTP_JAVA_OPTS
-
-# Where notebook saved
-# export ZEPPELIN_NOTEBOOK_DIR
-
-# Id of notebook to be displayed in homescreen. ex) 2A94M5J1Z
-# export ZEPPELIN_NOTEBOOK_HOMESCREEN
-
-# hide homescreen notebook from list when this value set to "true". default 
"false"
-# export ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE
-
-# Bucket where notebook saved
-# export ZEPPELIN_NOTEBOOK_S3_BUCKET
-
-# User in bucket where notebook saved. For example 
bucket/user/notebook/2A94M5J1Z/note.json
-# export ZEPPELIN_NOTEBOOK_S3_USER
-
-# A string representing this instance of zeppelin. $USER by default
-# export ZEPPELIN_IDENT_STRING
-
-# The scheduling priority for daemons. Defaults to 0.
-# export ZEPPELIN_NICENESS
-
+# export ZEPPELIN_WAR_TEMPDIR # The location of jetty 
temporary directory.
+# export ZEPPELIN_NOTEBOOK_DIR# Where notebook saved
+# export ZEPPELIN_NOTEBOOK_HOMESCREEN # Id of notebook to be displayed 
in homescreen. ex) 2A94M5J1Z
+# export ZEPPELIN_NOTEBOOK_HOMESCREEN_HIDE# hide homescreen notebook from 
list when this value set to "true". default "false"
+# export ZEPPELIN_NOTEBOOK_S3_BUCKET  # Bucket 

[1/2] ambari git commit: AMBARI-19126 Spark 2.x interpreter confgurations in Zeppelin (r-kamath)

2016-12-14 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a74bf6b2b -> 2d8a77642
  refs/heads/trunk f936fd04d -> b77b2fac3


AMBARI-19126 Spark 2.x interpreter confgurations in Zeppelin (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 2d8a776423f341e5a0282a28a1c663c5bb758d08
Parents: a74bf6b
Author: Renjith Kamath 
Authored: Thu Dec 15 11:57:34 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 15 11:57:34 2016 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|   2 +-
 .../0.6.0.2.5/package/scripts/master.py | 108 +++
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../package/scripts/spark2_config_template.py   |  64 +++
 4 files changed, 133 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/2d8a7764/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index c03d2dc..317ad73 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -115,7 +115,7 @@ export 
ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory={{executor_mem}} -Dspark.exec
 ## defining SPARK_HOME makes Zeppelin run spark interpreter process using 
spark-submit
 ##
 # (required) When it is defined, load it instead of Zeppelin embedded Spark 
libraries
-export SPARK_HOME={{spark_home}}
+#export SPARK_HOME={{spark_home}}
 
 # (optional) extra options to pass to spark submit. eg) "--driver-memory 512M 
--executor-memory 1G".
 # export SPARK_SUBMIT_OPTIONS

http://git-wip-us.apache.org/repos/asf/ambari/blob/2d8a7764/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index e82b53c..9cc808b 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -237,40 +237,40 @@ class Master(Script):
 import params
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
-for notebooks in interpreter_settings:
-  notebook = interpreter_settings[notebooks]
-  if notebook['group'] == 'livy' and params.livy_livyserver_host:
+for interpreter_setting in interpreter_settings:
+  interpreter = interpreter_settings[interpreter_setting]
+  if interpreter['group'] == 'livy' and params.livy_livyserver_host:
 if params.zeppelin_kerberos_principal and 
params.zeppelin_kerberos_keytab and params.security_enabled:
-  notebook['properties']['zeppelin.livy.principal'] = 
params.zeppelin_kerberos_principal
-  notebook['properties']['zeppelin.livy.keytab'] = 
params.zeppelin_kerberos_keytab
+  interpreter['properties']['zeppelin.livy.principal'] = 
params.zeppelin_kerberos_principal
+  interpreter['properties']['zeppelin.livy.keytab'] = 
params.zeppelin_kerberos_keytab
 else:
-  notebook['properties']['zeppelin.livy.principal'] = ""
-  notebook['properties']['zeppelin.livy.keytab'] = ""
-  elif notebook['group'] == 'spark':
+  interpreter['properties']['zeppelin.livy.principal'] = ""
+  interpreter['properties']['zeppelin.livy.keytab'] = ""
+  elif interpreter['group'] == 'spark':
 if params.zeppelin_kerberos_principal and 
params.zeppelin_kerberos_keytab and params.security_enabled:
-  notebook['properties']['spark.yarn.principal'] = 
params.zeppelin_kerberos_principal
-  notebook['properties']['spark.yarn.keytab'] = 
params.zeppelin_kerberos_keytab
+  interpreter['properties']['spark.yarn.principal'] = 
params.zeppelin_kerberos_principal
+  interpreter['properties']['spark.yarn.keytab'] = 
params.zeppelin_kerberos_keytab
 else:
-  

[2/2] ambari git commit: AMBARI-19126 Spark 2.x interpreter confgurations in Zeppelin (r-kamath)

2016-12-14 Thread rkamath
AMBARI-19126 Spark 2.x interpreter confgurations in Zeppelin (r-kamath)


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

Branch: refs/heads/trunk
Commit: b77b2fac39bc06df1d5b6a59d1be4d6bdd8b0386
Parents: f936fd0
Author: Renjith Kamath 
Authored: Thu Dec 15 11:57:34 2016 +0530
Committer: Renjith Kamath 
Committed: Thu Dec 15 11:59:13 2016 +0530

--
 .../0.6.0.2.5/configuration/zeppelin-env.xml|   2 +-
 .../0.6.0.2.5/package/scripts/master.py | 108 +++
 .../0.6.0.2.5/package/scripts/params.py |   4 +-
 .../package/scripts/spark2_config_template.py   |  64 +++
 4 files changed, 133 insertions(+), 45 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/b77b2fac/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
index c03d2dc..317ad73 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/configuration/zeppelin-env.xml
@@ -115,7 +115,7 @@ export 
ZEPPELIN_JAVA_OPTS="-Dspark.executor.memory={{executor_mem}} -Dspark.exec
 ## defining SPARK_HOME makes Zeppelin run spark interpreter process using 
spark-submit
 ##
 # (required) When it is defined, load it instead of Zeppelin embedded Spark 
libraries
-export SPARK_HOME={{spark_home}}
+#export SPARK_HOME={{spark_home}}
 
 # (optional) extra options to pass to spark submit. eg) "--driver-memory 512M 
--executor-memory 1G".
 # export SPARK_SUBMIT_OPTIONS

http://git-wip-us.apache.org/repos/asf/ambari/blob/b77b2fac/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index e82b53c..9cc808b 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -237,40 +237,40 @@ class Master(Script):
 import params
 config_data = self.get_interpreter_settings()
 interpreter_settings = config_data['interpreterSettings']
-for notebooks in interpreter_settings:
-  notebook = interpreter_settings[notebooks]
-  if notebook['group'] == 'livy' and params.livy_livyserver_host:
+for interpreter_setting in interpreter_settings:
+  interpreter = interpreter_settings[interpreter_setting]
+  if interpreter['group'] == 'livy' and params.livy_livyserver_host:
 if params.zeppelin_kerberos_principal and 
params.zeppelin_kerberos_keytab and params.security_enabled:
-  notebook['properties']['zeppelin.livy.principal'] = 
params.zeppelin_kerberos_principal
-  notebook['properties']['zeppelin.livy.keytab'] = 
params.zeppelin_kerberos_keytab
+  interpreter['properties']['zeppelin.livy.principal'] = 
params.zeppelin_kerberos_principal
+  interpreter['properties']['zeppelin.livy.keytab'] = 
params.zeppelin_kerberos_keytab
 else:
-  notebook['properties']['zeppelin.livy.principal'] = ""
-  notebook['properties']['zeppelin.livy.keytab'] = ""
-  elif notebook['group'] == 'spark':
+  interpreter['properties']['zeppelin.livy.principal'] = ""
+  interpreter['properties']['zeppelin.livy.keytab'] = ""
+  elif interpreter['group'] == 'spark':
 if params.zeppelin_kerberos_principal and 
params.zeppelin_kerberos_keytab and params.security_enabled:
-  notebook['properties']['spark.yarn.principal'] = 
params.zeppelin_kerberos_principal
-  notebook['properties']['spark.yarn.keytab'] = 
params.zeppelin_kerberos_keytab
+  interpreter['properties']['spark.yarn.principal'] = 
params.zeppelin_kerberos_principal
+  interpreter['properties']['spark.yarn.keytab'] = 
params.zeppelin_kerberos_keytab
 else:
-  notebook['properties']['spark.yarn.principal'] = ""
-  notebook['properties']['spark.yarn.keytab'] = ""
-  elif notebook['group'] == 'jdbc':
+  

[1/2] ambari git commit: AMBARI-18975 Remove Zeppelin View from Ambari (r-kamath)

2016-12-02 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 83adcf667 -> 590d4f9b8
  refs/heads/trunk 73d372b8d -> c2dc7538b


AMBARI-18975 Remove Zeppelin View from Ambari (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 590d4f9b8ca3c9b3ca5f43f9f8bce114edff90be
Parents: 83adcf6
Author: Renjith Kamath 
Authored: Fri Dec 2 14:39:28 2016 +0530
Committer: Renjith Kamath 
Committed: Fri Dec 2 14:39:28 2016 +0530

--
 .../server/upgrade/UpgradeCatalog250.java   |   6 +
 .../server/upgrade/UpgradeCatalog250Test.java   |   5 +
 contrib/views/pom.xml   |   1 -
 contrib/views/zeppelin/pom.xml  | 190 ---
 .../view/zeppelin/ZeppelinServiceCheck.java |  55 --
 .../ambari/view/zeppelin/ZeppelinServlet.java   | 113 ---
 .../zeppelin/src/main/resources/WEB-INF/web.xml |  40 
 .../src/main/resources/view.log4j.properties|  27 ---
 .../views/zeppelin/src/main/resources/view.xml  |  48 -
 9 files changed, 11 insertions(+), 474 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/590d4f9b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index 52de784..8488d46 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -136,6 +136,7 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 updateAMSConfigs();
 updateKafkaConfigs();
 updateHiveLlapConfigs();
+updateTablesForZeppelinViewRemoval();
   }
 
   protected void updateHostVersionTable() throws SQLException {
@@ -177,6 +178,11 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 }
   }
 
+  protected void updateTablesForZeppelinViewRemoval() throws SQLException {
+dbAccessor.executeQuery("DELETE from viewinstance WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
+dbAccessor.executeQuery("DELETE from viewmain WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
+dbAccessor.executeQuery("DELETE from viewparameter WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
+  }
 
   protected String updateAmsEnvContent(String content) {
 if (content == null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/590d4f9b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index ce0b387..fbe81bf 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -212,12 +212,14 @@ public class UpgradeCatalog250Test {
 Method updateAmsConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAMSConfigs");
 Method updateKafkaConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateKafkaConfigs");
 Method updateHiveLlapConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateHiveLlapConfigs");
+Method updateTablesForZeppelinViewRemoval = 
UpgradeCatalog250.class.getDeclaredMethod("updateTablesForZeppelinViewRemoval");
 Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
 
 UpgradeCatalog250 upgradeCatalog250 = 
createMockBuilder(UpgradeCatalog250.class)
   .addMockedMethod(updateAmsConfigs)
   .addMockedMethod(updateKafkaConfigs)
   .addMockedMethod(updateHiveLlapConfigs)
+  .addMockedMethod(updateTablesForZeppelinViewRemoval)
   .addMockedMethod(addNewConfigurationsFromXml)
   .createMock();
 
@@ -234,6 +236,9 @@ public class UpgradeCatalog250Test {
 upgradeCatalog250.updateHiveLlapConfigs();
 expectLastCall().once();
 
+upgradeCatalog250.updateTablesForZeppelinViewRemoval();
+expectLastCall().once();
+
 replay(upgradeCatalog250);
 
 upgradeCatalog250.executeDMLUpdates();

http://git-wip-us.apache.org/repos/asf/ambari/blob/590d4f9b/contrib/views/pom.xml

[2/2] ambari git commit: AMBARI-18975 Remove Zeppelin View from Ambari (r-kamath)

2016-12-02 Thread rkamath
AMBARI-18975 Remove Zeppelin View from Ambari (r-kamath)


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

Branch: refs/heads/trunk
Commit: c2dc7538b65ab9f045010b7964ba00551b0ea099
Parents: 73d372b
Author: Renjith Kamath 
Authored: Fri Dec 2 14:39:28 2016 +0530
Committer: Renjith Kamath 
Committed: Fri Dec 2 14:52:51 2016 +0530

--
 .../server/upgrade/UpgradeCatalog250.java   |   6 +
 .../server/upgrade/UpgradeCatalog250Test.java   |  17 +-
 contrib/views/pom.xml   |   1 -
 contrib/views/zeppelin/pom.xml  | 190 ---
 .../view/zeppelin/ZeppelinServiceCheck.java |  55 --
 .../ambari/view/zeppelin/ZeppelinServlet.java   | 113 ---
 .../zeppelin/src/main/resources/WEB-INF/web.xml |  40 
 .../src/main/resources/view.log4j.properties|  27 ---
 .../views/zeppelin/src/main/resources/view.xml  |  48 -
 9 files changed, 17 insertions(+), 480 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c2dc7538/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
--
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
index 3b2cdd3..837f340 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog250.java
@@ -136,6 +136,7 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 updateAMSConfigs();
 updateKafkaConfigs();
 updateHiveLlapConfigs();
+updateTablesForZeppelinViewRemoval();
   }
 
   protected void updateHostVersionTable() throws SQLException {
@@ -227,6 +228,11 @@ public class UpgradeCatalog250 extends 
AbstractUpgradeCatalog {
 }
   }
 
+  protected void updateTablesForZeppelinViewRemoval() throws SQLException {
+dbAccessor.executeQuery("DELETE from viewinstance WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
+dbAccessor.executeQuery("DELETE from viewmain WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
+dbAccessor.executeQuery("DELETE from viewparameter WHERE 
view_name='ZEPPELIN{1.0.0}'", true);
+  }
 
   protected String updateAmsEnvContent(String content) {
 if (content == null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/c2dc7538/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
--
diff --git 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
index 978e2dc..0b2b32d 100644
--- 
a/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
+++ 
b/ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java
@@ -210,16 +210,18 @@ public class UpgradeCatalog250Test {
   @Test
   public void testExecuteDMLUpdates() throws Exception {
 Method updateAmsConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateAMSConfigs");
-Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
 Method updateKafkaConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateKafkaConfigs");
 Method updateHiveLlapConfigs = 
UpgradeCatalog250.class.getDeclaredMethod("updateHiveLlapConfigs");
+Method addNewConfigurationsFromXml = 
AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml");
+Method updateTablesForZeppelinViewRemoval = 
UpgradeCatalog250.class.getDeclaredMethod("updateTablesForZeppelinViewRemoval");
 
 UpgradeCatalog250 upgradeCatalog250 = 
createMockBuilder(UpgradeCatalog250.class)
-.addMockedMethod(updateAmsConfigs)
-.addMockedMethod(addNewConfigurationsFromXml)
-.addMockedMethod(updateKafkaConfigs)
-.addMockedMethod(updateHiveLlapConfigs)
-.createMock();
+  .addMockedMethod(updateAmsConfigs)
+  .addMockedMethod(updateKafkaConfigs)
+  .addMockedMethod(updateHiveLlapConfigs)
+  .addMockedMethod(addNewConfigurationsFromXml)
+  .addMockedMethod(updateTablesForZeppelinViewRemoval)
+  .createMock();
 
 upgradeCatalog250.updateAMSConfigs();
 expectLastCall().once();
@@ -233,6 +235,9 @@ public class UpgradeCatalog250Test {
 upgradeCatalog250.updateHiveLlapConfigs();

[2/2] ambari git commit: AMBARI-18946 Ambari Integration for Zeppelin and Spark 2.0 (r-kamath)

2016-11-28 Thread rkamath
AMBARI-18946 Ambari Integration for Zeppelin and Spark 2.0 (r-kamath)


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

Branch: refs/heads/trunk
Commit: 69390ee4897699a94542e946e2f03d31ee4a626b
Parents: b5b73d2
Author: Renjith Kamath 
Authored: Tue Nov 29 11:57:41 2016 +0530
Committer: Renjith Kamath 
Committed: Tue Nov 29 11:59:01 2016 +0530

--
 .../0.6.0.2.5/package/scripts/master.py | 15 +++
 .../0.6.0.2.5/package/scripts/params.py | 28 +++-
 2 files changed, 31 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/69390ee4/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 33a2a14..e82b53c 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -58,8 +58,12 @@ class Master(Script):
 # update the configs specified by user
 self.configure(env)
 
-Execute('echo spark_version:' + params.spark_version + ' detected for 
spark_home: '
-+ params.spark_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)
+if params.spark_version:
+  Execute('echo spark_version:' + str(params.spark_version) + ' detected 
for spark_home: '
+  + params.spark_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)
+if params.spark2_version:
+  Execute('echo spark2_version:' + str(params.spark2_version) + ' detected 
for spark2_home: '
+  + params.spark2_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)
 
   def create_zeppelin_dir(self, params):
 params.HdfsResource(format("/user/{zeppelin_user}"),
@@ -138,9 +142,10 @@ class Master(Script):
 File(format("{params.conf_dir}/log4j.properties"), 
content=params.log4j_properties_content,
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
-# copy hive-site.xml
-File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
- owner=params.zeppelin_user, group=params.zeppelin_group)
+# copy hive-site.xml only if Spark 1.x is installed
+if 'spark-defaults' in params.config['configurations']:
+File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
+ owner=params.zeppelin_user, group=params.zeppelin_group)
 
 if len(params.hbase_master_hosts) > 0:
   # copy hbase-site.xml

http://git-wip-us.apache.org/repos/asf/ambari/blob/69390ee4/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 27ed150..5a3174f 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -39,6 +39,14 @@ def get_port_from_url(address):
   else:
 return address
 
+def extract_spark_version(spark_home):
+  try:
+with open(spark_home + "/RELEASE") as fline:
+  return re.search('Spark (\d\.\d).+', fline.readline().rstrip()).group(1)
+  except:
+pass
+  return None
+
 
 # server configurations
 config = Script.get_config()
@@ -58,13 +66,17 @@ spark_jar_dir = 
config['configurations']['zeppelin-env']['zeppelin.spark.jar.dir
 spark_jar = format("{spark_jar_dir}/zeppelin-spark-0.5.5-SNAPSHOT.jar")
 setup_view = True
 temp_file = config['configurations']['zeppelin-env']['zeppelin.temp.file']
-spark_home = os.path.join(stack_root, "current", "spark-client")
 
-try:
-  fline = open(spark_home + "/RELEASE").readline().rstrip()
-  spark_version = re.search('Spark (\d\.\d).+', fline).group(1)
-except:
-  pass
+spark_home = None
+spark_version = None
+spark2_home = None
+spark2_version = None
+if 'spark-defaults' in config['configurations']:
+  spark_home = os.path.join(stack_root, "current", 'spark-client')
+  spark_version = 

[1/2] ambari git commit: AMBARI-18946 Ambari Integration for Zeppelin and Spark 2.0 (r-kamath)

2016-11-28 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 d3c75557e -> 182479d3c
  refs/heads/trunk b5b73d202 -> 69390ee48


AMBARI-18946 Ambari Integration for Zeppelin and Spark 2.0 (r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 182479d3ce0324422379ca87ec369b7025dfe91f
Parents: d3c7555
Author: Renjith Kamath 
Authored: Tue Nov 29 11:57:41 2016 +0530
Committer: Renjith Kamath 
Committed: Tue Nov 29 11:57:41 2016 +0530

--
 .../0.6.0.2.5/package/scripts/master.py | 15 +++
 .../0.6.0.2.5/package/scripts/params.py | 28 +++-
 2 files changed, 31 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/182479d3/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 33a2a14..e82b53c 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -58,8 +58,12 @@ class Master(Script):
 # update the configs specified by user
 self.configure(env)
 
-Execute('echo spark_version:' + params.spark_version + ' detected for 
spark_home: '
-+ params.spark_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)
+if params.spark_version:
+  Execute('echo spark_version:' + str(params.spark_version) + ' detected 
for spark_home: '
+  + params.spark_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)
+if params.spark2_version:
+  Execute('echo spark2_version:' + str(params.spark2_version) + ' detected 
for spark2_home: '
+  + params.spark2_home + ' >> ' + params.zeppelin_log_file, 
user=params.zeppelin_user)
 
   def create_zeppelin_dir(self, params):
 params.HdfsResource(format("/user/{zeppelin_user}"),
@@ -138,9 +142,10 @@ class Master(Script):
 File(format("{params.conf_dir}/log4j.properties"), 
content=params.log4j_properties_content,
  owner=params.zeppelin_user, group=params.zeppelin_group)
 
-# copy hive-site.xml
-File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
- owner=params.zeppelin_user, group=params.zeppelin_group)
+# copy hive-site.xml only if Spark 1.x is installed
+if 'spark-defaults' in params.config['configurations']:
+File(format("{params.conf_dir}/hive-site.xml"), 
content=StaticFile("/etc/spark/conf/hive-site.xml"),
+ owner=params.zeppelin_user, group=params.zeppelin_group)
 
 if len(params.hbase_master_hosts) > 0:
   # copy hbase-site.xml

http://git-wip-us.apache.org/repos/asf/ambari/blob/182479d3/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
index 27ed150..5a3174f 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/params.py
@@ -39,6 +39,14 @@ def get_port_from_url(address):
   else:
 return address
 
+def extract_spark_version(spark_home):
+  try:
+with open(spark_home + "/RELEASE") as fline:
+  return re.search('Spark (\d\.\d).+', fline.readline().rstrip()).group(1)
+  except:
+pass
+  return None
+
 
 # server configurations
 config = Script.get_config()
@@ -58,13 +66,17 @@ spark_jar_dir = 
config['configurations']['zeppelin-env']['zeppelin.spark.jar.dir
 spark_jar = format("{spark_jar_dir}/zeppelin-spark-0.5.5-SNAPSHOT.jar")
 setup_view = True
 temp_file = config['configurations']['zeppelin-env']['zeppelin.temp.file']
-spark_home = os.path.join(stack_root, "current", "spark-client")
 
-try:
-  fline = open(spark_home + "/RELEASE").readline().rstrip()
-  spark_version = re.search('Spark (\d\.\d).+', fline).group(1)
-except:
-  pass
+spark_home = None
+spark_version = None
+spark2_home = None
+spark2_version = None
+if 

ambari git commit: AMBARI-18918: Zeppelin view doesn't work with JDK 1.8_91+ (Prabhjyot Singh)

2016-11-21 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk c0bd9f83f -> c9a4881d9


AMBARI-18918: Zeppelin view doesn't work with JDK 1.8_91+ (Prabhjyot Singh)


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

Branch: refs/heads/trunk
Commit: c9a4881d976f306f54d9b2323d68913dab02438a
Parents: c0bd9f8
Author: Renjith Kamath 
Authored: Mon Nov 21 17:22:06 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Nov 21 17:23:46 2016 +0530

--
 .../ambari/view/zeppelin/ZeppelinServlet.java   | 103 +--
 .../src/main/resources/WEB-INF/index.jsp|  63 
 2 files changed, 73 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/c9a4881d/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
--
diff --git 
a/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
 
b/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
index 5b329be..ab61a3d 100644
--- 
a/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
+++ 
b/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
@@ -29,42 +29,85 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.util.List;
 
 
 public class ZeppelinServlet extends HttpServlet {
-private ViewContext viewContext;
-private final static Logger LOG = 
LoggerFactory.getLogger(ZeppelinServlet.class);
+  private ViewContext viewContext;
+  private final static Logger LOG = 
LoggerFactory.getLogger(ZeppelinServlet.class);
 
-@Override
-public void init(ServletConfig config) throws ServletException {
-super.init(config);
+  @Override
+  public void init(ServletConfig config) throws ServletException {
+super.init(config);
 
-ServletContext context = config.getServletContext();
-viewContext = (ViewContext) 
context.getAttribute(ViewContext.CONTEXT_ATTRIBUTE);
-}
-
-@Override
-protected void doGet(HttpServletRequest request, HttpServletResponse 
response) throws IOException, ServletException {
-response.setContentType("text/html");
-response.setStatus(HttpServletResponse.SC_OK);
-String publicName = "";
-String port = "";
-try {
-port = viewContext.getProperties().get("zeppelin.server.port");
-if (viewContext.getCluster() != null) {
-List hostsForServiceComponents = 
viewContext.getCluster().getHostsForServiceComponent("ZEPPELIN", 
"ZEPPELIN_MASTER");
-publicName = hostsForServiceComponents.get(0);
-} else {
-publicName = 
viewContext.getProperties().get("zeppelin.host.publicname");
-}
-} catch (Exception e) {
-LOG.error("Zeppelin view servlet failed", e);
-}
+ServletContext context = config.getServletContext();
+viewContext = (ViewContext) 
context.getAttribute(ViewContext.CONTEXT_ATTRIBUTE);
+  }
 
-String serviceCheckResponse = ZeppelinServiceCheck.check(publicName, 
port);
-request.setAttribute("serviceCheckResponse", serviceCheckResponse);
-
-request.getRequestDispatcher("WEB-INF/index.jsp").forward(request, 
response);
+  public void service(HttpServletRequest req,
+  HttpServletResponse res) throws IOException {
+res.setContentType("text/html");
+PrintWriter out = res.getWriter();
+String publicName = "";
+String port = "";
+try {
+  port = viewContext.getProperties().get("zeppelin.server.port");
+  if (viewContext.getCluster() != null) {
+List hostsForServiceComponents = 
viewContext.getCluster().getHostsForServiceComponent
+("ZEPPELIN", "ZEPPELIN_MASTER");
+publicName = hostsForServiceComponents.get(0);
+  } else {
+publicName = 
viewContext.getProperties().get("zeppelin.host.publicname");
+  }
+} catch (Exception e) {
+  LOG.error("Zeppelin view servlet failed", e);
 }
+out.println("" +
+"" +
+"" +
+"" +
+"" +
+"" +
+"" +
+"" +
+"Welcome to the Zeppelin View" +
+"Service check failed" +
+"" +
+"" +
+"" +
+"" +
+"zeppelin service is not 

ambari git commit: AMBARI-18918: Zeppelin view doesn't work with JDK 1.8_91+ (Prabhjyot Singh)

2016-11-21 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 795dd1f81 -> 0c5850a2e


AMBARI-18918: Zeppelin view doesn't work with JDK 1.8_91+ (Prabhjyot Singh)


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

Branch: refs/heads/branch-2.5
Commit: 0c5850a2e569897f3b4878fd04ccc165cfd6a161
Parents: 795dd1f
Author: Renjith Kamath 
Authored: Mon Nov 21 17:22:06 2016 +0530
Committer: Renjith Kamath 
Committed: Mon Nov 21 17:22:06 2016 +0530

--
 .../ambari/view/zeppelin/ZeppelinServlet.java   | 103 +--
 .../src/main/resources/WEB-INF/index.jsp|  63 
 2 files changed, 73 insertions(+), 93 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/0c5850a2/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
--
diff --git 
a/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
 
b/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
index 5b329be..ab61a3d 100644
--- 
a/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
+++ 
b/contrib/views/zeppelin/src/main/java/org/apache/ambari/view/zeppelin/ZeppelinServlet.java
@@ -29,42 +29,85 @@ import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.util.List;
 
 
 public class ZeppelinServlet extends HttpServlet {
-private ViewContext viewContext;
-private final static Logger LOG = 
LoggerFactory.getLogger(ZeppelinServlet.class);
+  private ViewContext viewContext;
+  private final static Logger LOG = 
LoggerFactory.getLogger(ZeppelinServlet.class);
 
-@Override
-public void init(ServletConfig config) throws ServletException {
-super.init(config);
+  @Override
+  public void init(ServletConfig config) throws ServletException {
+super.init(config);
 
-ServletContext context = config.getServletContext();
-viewContext = (ViewContext) 
context.getAttribute(ViewContext.CONTEXT_ATTRIBUTE);
-}
-
-@Override
-protected void doGet(HttpServletRequest request, HttpServletResponse 
response) throws IOException, ServletException {
-response.setContentType("text/html");
-response.setStatus(HttpServletResponse.SC_OK);
-String publicName = "";
-String port = "";
-try {
-port = viewContext.getProperties().get("zeppelin.server.port");
-if (viewContext.getCluster() != null) {
-List hostsForServiceComponents = 
viewContext.getCluster().getHostsForServiceComponent("ZEPPELIN", 
"ZEPPELIN_MASTER");
-publicName = hostsForServiceComponents.get(0);
-} else {
-publicName = 
viewContext.getProperties().get("zeppelin.host.publicname");
-}
-} catch (Exception e) {
-LOG.error("Zeppelin view servlet failed", e);
-}
+ServletContext context = config.getServletContext();
+viewContext = (ViewContext) 
context.getAttribute(ViewContext.CONTEXT_ATTRIBUTE);
+  }
 
-String serviceCheckResponse = ZeppelinServiceCheck.check(publicName, 
port);
-request.setAttribute("serviceCheckResponse", serviceCheckResponse);
-
-request.getRequestDispatcher("WEB-INF/index.jsp").forward(request, 
response);
+  public void service(HttpServletRequest req,
+  HttpServletResponse res) throws IOException {
+res.setContentType("text/html");
+PrintWriter out = res.getWriter();
+String publicName = "";
+String port = "";
+try {
+  port = viewContext.getProperties().get("zeppelin.server.port");
+  if (viewContext.getCluster() != null) {
+List hostsForServiceComponents = 
viewContext.getCluster().getHostsForServiceComponent
+("ZEPPELIN", "ZEPPELIN_MASTER");
+publicName = hostsForServiceComponents.get(0);
+  } else {
+publicName = 
viewContext.getProperties().get("zeppelin.host.publicname");
+  }
+} catch (Exception e) {
+  LOG.error("Zeppelin view servlet failed", e);
 }
+out.println("" +
+"" +
+"" +
+"" +
+"" +
+"" +
+"" +
+"" +
+"Welcome to the Zeppelin View" +
+"Service check failed" +
+"" +
+"" +
+"" +
+"" +
+"zeppelin 

ambari git commit: AMBARI-18872 Zeppelin notebook execution fails due missing spark dependency

2016-11-16 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/trunk 7956950c6 -> 49d6d88dc


AMBARI-18872 Zeppelin notebook execution fails due missing spark dependency


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

Branch: refs/heads/trunk
Commit: 49d6d88dcf7ed8c15152cdca7bc1fbf2ba6c8d5a
Parents: 7956950
Author: Renjith Kamath 
Authored: Wed Nov 16 22:52:51 2016 +0530
Committer: Renjith Kamath 
Committed: Wed Nov 16 22:56:03 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 11 +++
 .../src/main/resources/scripts/Ambaripreupload.py|  2 +-
 .../stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml|  2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/49d6d88d/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 080fcd6..33a2a14 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -84,7 +84,7 @@ class Master(Script):
 recursive_chmod=True
 )
 
-spark_deps_full_path = glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar')[0]
+spark_deps_full_path = self.get_zeppelin_spark_dependencies()[0]
 spark_dep_file_name = os.path.basename(spark_deps_full_path);
 
 params.HdfsResource(params.spark_jar_dir + "/" + spark_dep_file_name,
@@ -168,9 +168,8 @@ class Master(Script):
 zeppelin_kinit_cmd = format("{kinit_path_local} -kt 
{zeppelin_kerberos_keytab} {zeppelin_kerberos_principal}; ")
 Execute(zeppelin_kinit_cmd, user=params.zeppelin_user)
 
-if glob.glob(
-params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar') and os.path.exists(
-  glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar')[0]):
+zeppelin_spark_dependencies = self.get_zeppelin_spark_dependencies()
+if zeppelin_spark_dependencies and 
os.path.exists(zeppelin_spark_dependencies[0]):
   self.create_zeppelin_dir(params)
 
 # if first_setup:
@@ -326,5 +325,9 @@ class Master(Script):
 return False
 return False
 
+  def get_zeppelin_spark_dependencies(self):
+import params
+return glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies*.jar')
+
 if __name__ == "__main__":
   Master().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/49d6d88d/ambari-server/src/main/resources/scripts/Ambaripreupload.py
--
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py 
b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index c04424f..bedf859 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -415,7 +415,7 @@ with Environment() as env:
   copy_tarballs_to_hdfs(format("/usr/hdp/{stack_version}/sqoop/sqoop.tar.gz"), 
hdfs_path_prefix+"/hdp/apps/{{ stack_version_formatted }}/sqoop/", 
'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, 
params.user_group)
   
   createHdfsResources()
-  
copy_zeppelin_dependencies_to_hdfs(format("/usr/hdp/{stack_version}/zeppelin/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar"))
+  
copy_zeppelin_dependencies_to_hdfs(format("/usr/hdp/{stack_version}/zeppelin/interpreter/spark/dep/zeppelin-spark-dependencies*.jar"))
   putSQLDriverToOozieShared()
   putCreatedHdfsResourcesToIgnore(env)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/49d6d88d/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
index 0c3aa77..e8ab191 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
@@ -21,7 +21,7 @@
   
 
  

ambari git commit: AMBARI-18872 Zeppelin notebook execution fails due missing spark dependency

2016-11-16 Thread rkamath
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2873b4a60 -> 48074fc7a


AMBARI-18872 Zeppelin notebook execution fails due missing spark dependency


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

Branch: refs/heads/branch-2.5
Commit: 48074fc7ae52e9603431bc6a85ef57c7ec96fcd7
Parents: 2873b4a
Author: Renjith Kamath 
Authored: Wed Nov 16 22:52:51 2016 +0530
Committer: Renjith Kamath 
Committed: Wed Nov 16 22:52:51 2016 +0530

--
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 11 +++
 .../src/main/resources/scripts/Ambaripreupload.py|  2 +-
 .../stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml|  2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ambari/blob/48074fc7/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
--
diff --git 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 080fcd6..33a2a14 100644
--- 
a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ 
b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -84,7 +84,7 @@ class Master(Script):
 recursive_chmod=True
 )
 
-spark_deps_full_path = glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar')[0]
+spark_deps_full_path = self.get_zeppelin_spark_dependencies()[0]
 spark_dep_file_name = os.path.basename(spark_deps_full_path);
 
 params.HdfsResource(params.spark_jar_dir + "/" + spark_dep_file_name,
@@ -168,9 +168,8 @@ class Master(Script):
 zeppelin_kinit_cmd = format("{kinit_path_local} -kt 
{zeppelin_kerberos_keytab} {zeppelin_kerberos_principal}; ")
 Execute(zeppelin_kinit_cmd, user=params.zeppelin_user)
 
-if glob.glob(
-params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar') and os.path.exists(
-  glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar')[0]):
+zeppelin_spark_dependencies = self.get_zeppelin_spark_dependencies()
+if zeppelin_spark_dependencies and 
os.path.exists(zeppelin_spark_dependencies[0]):
   self.create_zeppelin_dir(params)
 
 # if first_setup:
@@ -326,5 +325,9 @@ class Master(Script):
 return False
 return False
 
+  def get_zeppelin_spark_dependencies(self):
+import params
+return glob.glob(params.zeppelin_dir + 
'/interpreter/spark/dep/zeppelin-spark-dependencies*.jar')
+
 if __name__ == "__main__":
   Master().execute()

http://git-wip-us.apache.org/repos/asf/ambari/blob/48074fc7/ambari-server/src/main/resources/scripts/Ambaripreupload.py
--
diff --git a/ambari-server/src/main/resources/scripts/Ambaripreupload.py 
b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
index c04424f..bedf859 100644
--- a/ambari-server/src/main/resources/scripts/Ambaripreupload.py
+++ b/ambari-server/src/main/resources/scripts/Ambaripreupload.py
@@ -415,7 +415,7 @@ with Environment() as env:
   copy_tarballs_to_hdfs(format("/usr/hdp/{stack_version}/sqoop/sqoop.tar.gz"), 
hdfs_path_prefix+"/hdp/apps/{{ stack_version_formatted }}/sqoop/", 
'hadoop-mapreduce-historyserver', params.mapred_user, params.hdfs_user, 
params.user_group)
   
   createHdfsResources()
-  
copy_zeppelin_dependencies_to_hdfs(format("/usr/hdp/{stack_version}/zeppelin/interpreter/spark/dep/zeppelin-spark-dependencies-*.jar"))
+  
copy_zeppelin_dependencies_to_hdfs(format("/usr/hdp/{stack_version}/zeppelin/interpreter/spark/dep/zeppelin-spark-dependencies*.jar"))
   putSQLDriverToOozieShared()
   putCreatedHdfsResourcesToIgnore(env)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/48074fc7/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
--
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
index 0c3aa77..e8ab191 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ZEPPELIN/metainfo.xml
@@ -21,7 +21,7 @@