You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by db...@apache.org on 2016/10/27 17:15:20 UTC
ambari git commit: AMBARI-18690. Zeppelin fails to start after
deployment due to timing issue. (Renjith Kamath via dipayanb)
Repository: ambari
Updated Branches:
refs/heads/trunk 03014f0cd -> a93654239
AMBARI-18690. Zeppelin fails to start after deployment due to timing issue. (Renjith Kamath via dipayanb)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/a9365423
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a9365423
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a9365423
Branch: refs/heads/trunk
Commit: a936542398d8f2cc516560353609d13a4b8a8fd3
Parents: 03014f0
Author: Dipayan Bhowmick <di...@gmail.com>
Authored: Thu Oct 27 22:44:51 2016 +0530
Committer: Dipayan Bhowmick <di...@gmail.com>
Committed: Thu Oct 27 22:44:51 2016 +0530
----------------------------------------------------------------------
.../ZEPPELIN/0.6.0.2.5/package/scripts/master.py | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/a9365423/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 4583d81..080fcd6 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
@@ -178,7 +178,7 @@ class Master(Script):
not os.path.exists(params.conf_dir + "/interpreter.json"):
Execute(params.zeppelin_dir + '/bin/zeppelin-daemon.sh start >> '
+ params.zeppelin_log_file, user=params.zeppelin_user)
- time.sleep(20)
+ self.check_zeppelin_server()
self.update_zeppelin_interpreter()
self.update_kerberos_properties()
@@ -310,5 +310,21 @@ class Master(Script):
notebook['properties']['master'] = "yarn-client"
self.set_interpreter_settings(config_data)
+ def check_zeppelin_server(self, retries=10):
+ 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
+
if __name__ == "__main__":
Master().execute()