Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6F5C3200B3B for ; Mon, 11 Jul 2016 16:30:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 6C639160A7D; Mon, 11 Jul 2016 14:30:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 8D0E2160A5E for ; Mon, 11 Jul 2016 16:30:29 +0200 (CEST) Received: (qmail 63292 invoked by uid 500); 11 Jul 2016 14:30:28 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 63283 invoked by uid 99); 11 Jul 2016 14:30:28 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Jul 2016 14:30:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7E090DFFF8; Mon, 11 Jul 2016 14:30:28 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: pallavkul@apache.org To: commits@ambari.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) archived-at: Mon, 11 Jul 2016 14:30:30 -0000 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 Authored: Mon Jul 11 19:58:13 2016 +0530 Committer: Pallav Kulshreshtha 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