You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2016/07/03 13:55:18 UTC

ambari git commit: AMBARI-17523. Zeppelin: remove Livy component dependency (Renjith Kamath via smohanty)

Repository: ambari
Updated Branches:
  refs/heads/trunk 1b17f36ee -> 13e4c2aaf


AMBARI-17523. Zeppelin: remove Livy component dependency (Renjith Kamath via smohanty)


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

Branch: refs/heads/trunk
Commit: 13e4c2aafc2df68e415a49efda82d53837d86621
Parents: 1b17f36
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Sun Jul 3 06:54:48 2016 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Sun Jul 3 06:54:48 2016 -0700

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/metainfo.xml             |  7 -------
 .../0.6.0.2.5/package/scripts/master.py         | 21 +++++++++++++-------
 .../0.6.0.2.5/package/scripts/params.py         | 21 +++++++++-----------
 3 files changed, 23 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/13e4c2aa/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 4f19b43..1f4e446 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
@@ -39,13 +39,6 @@ limitations under the License.
           </commandScript>
           <dependencies>
             <dependency>
-              <name>SPARK/LIVY_SERVER</name>
-              <scope>host</scope>
-              <auto-deploy>
-                <enabled>true</enabled>
-              </auto-deploy>
-            </dependency>
-            <dependency>
               <name>SPARK/SPARK_CLIENT</name>
               <scope>host</scope>
               <auto-deploy>

http://git-wip-us.apache.org/repos/asf/ambari/blob/13e4c2aa/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 fd6cbb6..075219a 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
@@ -169,8 +169,8 @@ class Master(Script):
 
     Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh restart >> '
             + params.zeppelin_log_file, user=params.zeppelin_user)
-    pidfile = glob.glob(status_params.zeppelin_pid_dir
-                        + '/zeppelin-' + params.zeppelin_user + '*.pid')[0]
+    pidfile = glob.glob(os.path.join(status_params.zeppelin_pid_dir,
+                                     'zeppelin-' + params.zeppelin_user + '*.pid'))[0]
     Execute('echo pid file is: ' + pidfile, user=params.zeppelin_user)
     contents = open(pidfile).read()
     Execute('echo pid is ' + contents, user=params.zeppelin_user)
@@ -190,7 +190,7 @@ class Master(Script):
     import params
     import json
 
-    interpreter_config = params.conf_dir + "/interpreter.json"
+    interpreter_config = os.path.join(params.conf_dir, "interpreter.json")
     interpreter_config_file = open(interpreter_config, "r")
     config_data = json.load(interpreter_config_file)
     interpreter_config_file.close()
@@ -200,10 +200,17 @@ class Master(Script):
     import params
     import json
 
-    interpreter_config = params.conf_dir + "/interpreter.json"
-    interpreter_config_file = open(interpreter_config, "w+")
-    interpreter_config_file.write(json.dumps(config_data, indent=2))
-    interpreter_config_file.close()
+    try:
+      interpreter_config = os.path.join(params.conf_dir, "interpreter.json")
+      interpreter_config_file = open(interpreter_config, "w+")
+      interpreter_config_file.write(json.dumps(config_data, indent=2))
+    except IOError:
+      pass
+    finally:
+      try:
+        interpreter_config_file.close()
+      except:
+        pass
 
   def update_kerberos_properties(self):
     import params

http://git-wip-us.apache.org/repos/asf/ambari/blob/13e4c2aa/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 936df81..6016ae1 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
@@ -98,25 +98,23 @@ zeppelin_host = str(master_configs['zeppelin_master_hosts'][0])
 
 # detect HS2 details, if installed
 
+hive_server_host = None
+hive_metastore_host = '0.0.0.0'
+hive_metastore_port = None
+hive_server_port = 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'])
-else:
-  hive_server_host = None
-  hive_metastore_host = '0.0.0.0'
-  hive_metastore_port = None
-  hive_server_port = None
 
 # detect hbase details if installed
+zookeeper_znode_parent = None
+hbase_zookeeper_quorum = None
 if 'hbase_master_hosts' in master_configs and 'hbase-site' in config['configurations']:
   zookeeper_znode_parent = config['configurations']['hbase-site']['zookeeper.znode.parent']
   hbase_zookeeper_quorum = config['configurations']['hbase-site']['hbase.zookeeper.quorum']
-else:
-  zookeeper_znode_parent = None
-  hbase_zookeeper_quorum = None
 
 # detect spark queue
 if 'spark.yarn.queue' in config['configurations']['spark-defaults']:
@@ -140,13 +138,12 @@ spark_client_version = get_stack_version('spark-client')
 
 livy_hosts = default("/clusterHostInfo/livy_server_hosts", [])
 
+livy_livyserver_host = None
+livy_livyserver_port = None
 if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stack_version_formatted) and \
-    len(livy_hosts) != 0:
+    len(livy_hosts) > 0:
   livy_livyserver_host = str(livy_hosts[0])
   livy_livyserver_port = config['configurations']['livy-conf']['livy.server.port']
-else:
-  livy_livyserver_host = None
-  livy_livyserver_port = None
 
 hdfs_user = config['configurations']['hadoop-env']['hdfs_user']
 security_enabled = config['configurations']['cluster-env']['security_enabled']