ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pallav...@apache.org
Subject ambari git commit: AMBARI-17632. Zeppelin service: Dependencies for phoenix in JDBC interpreter are not configured by default (Renjith Kamath via pallavkul)
Date Mon, 11 Jul 2016 14:30:28 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 560332f80 -> 3330878f0


AMBARI-17632. Zeppelin service: Dependencies for phoenix in JDBC interpreter are not configured
by default (Renjith Kamath via pallavkul)


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

Branch: refs/heads/branch-2.4
Commit: 3330878f0b825151fe69d92554a2a8755947d63b
Parents: 560332f
Author: Pallav Kulshreshtha <pallav.kul@gmail.com>
Authored: Mon Jul 11 19:58:13 2016 +0530
Committer: Pallav Kulshreshtha <pallav.kul@gmail.com>
Committed: Mon Jul 11 20:00:12 2016 +0530

----------------------------------------------------------------------
 .../0.6.0.2.5/package/scripts/master.py         | 57 +++++++++++---------
 .../0.6.0.2.5/package/scripts/params.py         |  4 ++
 2 files changed, 36 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3330878f/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 632f983..57082da 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
@@ -249,31 +249,38 @@ class Master(Script):
     interpreter_settings = config_data['interpreterSettings']
 
     for notebooks in interpreter_settings:
-        notebook = interpreter_settings[notebooks]
-        if notebook['group'] == 'jdbc':
-            notebook['dependencies'] = []
-            if params.hive_server_host:
-                notebook['properties']['hive.url'] = 'jdbc:hive2://' + \
-                                                     params.hive_server_host + \
-                                                         ':' + params.hive_server_port
-                notebook['dependencies'].append(
-                    {"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", "local":
"false"})
-                notebook['dependencies'].append(
-                    {"groupArtifactVersion": "org.apache.hadoop:hadoop-common:2.7.2", "local":
"false"})
-
-            elif params.zookeeper_znode_parent \
-                    and params.hbase_zookeeper_quorum:
-                notebook['properties']['phoenix.url'] = "jdbc:phoenix:" + \
-                                                        params.hbase_zookeeper_quorum + ':'
+ \
-                                                        params.zookeeper_znode_parent
-                notebook['dependencies'].append(
-                    {"groupArtifactVersion": "org.apache.phoenix:phoenix-core:4.4.0-HBase-1.0",
"local": "false"})
-        elif notebook['group'] == 'livy' and params.livy_livyserver_host:
-            notebook['properties']['livy.spark.master'] = "yarn-cluster"
-            notebook['properties']['zeppelin.livy.url'] = "http://" + params.livy_livyserver_host
+\
-                                                          ":" + params.livy_livyserver_port
-        elif notebook['group'] == 'spark':
-            notebook['properties']['master'] = "yarn-client"
+      notebook = interpreter_settings[notebooks]
+      if notebook['group'] == 'jdbc':
+        notebook['dependencies'] = []
+        if params.hive_server_host:
+          if params.hive_server2_support_dynamic_service_discovery:
+            notebook['properties']['hive.url'] = 'jdbc:hive2://' + \
+                                                 params.hive_zookeeper_quorum + \
+                                                 '/;' + 'serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2'
+          else:
+            notebook['properties']['hive.url'] = 'jdbc:hive2://' + \
+                                                 params.hive_server_host + \
+                                                     ':' + params.hive_server_port
+          notebook['dependencies'].append(
+              {"groupArtifactVersion": "org.apache.hive:hive-jdbc:2.0.1", "local": "false"})
+          notebook['dependencies'].append(
+              {"groupArtifactVersion": "org.apache.hadoop:hadoop-common:2.7.2", "local":
"false"})
+          notebook['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:
+            notebook['properties']['phoenix.url'] = "jdbc:phoenix:" + \
+                                                    params.hbase_zookeeper_quorum + ':' +
\
+                                                    params.zookeeper_znode_parent
+            notebook['dependencies'].append(
+                {"groupArtifactVersion": "org.apache.phoenix:phoenix-core:4.7.0-HBase-1.1",
"local": "false"})
+      elif notebook['group'] == 'livy' and params.livy_livyserver_host:
+        notebook['properties']['livy.spark.master'] = "yarn-cluster"
+        notebook['properties']['zeppelin.livy.url'] = "http://" + params.livy_livyserver_host
+\
+                                                      ":" + params.livy_livyserver_port
+      elif notebook['group'] == 'spark':
+        notebook['properties']['master'] = "yarn-client"
     self.set_interpreter_settings(config_data)
 
 if __name__ == "__main__":

http://git-wip-us.apache.org/repos/asf/ambari/blob/3330878f/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 6016ae1..85e6fcf 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
@@ -102,12 +102,16 @@ hive_server_host = None
 hive_metastore_host = '0.0.0.0'
 hive_metastore_port = None
 hive_server_port = None
+hive_zookeeper_quorum = None
+hive_server2_support_dynamic_service_discovery = None
 if 'hive_server_host' in master_configs and len(master_configs['hive_server_host']) != 0:
   hive_server_host = str(master_configs['hive_server_host'][0])
   hive_metastore_host = str(master_configs['hive_metastore_host'][0])
   hive_metastore_port = str(
     get_port_from_url(config['configurations']['hive-site']['hive.metastore.uris']))
   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


Mime
View raw message