You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2018/08/14 02:07:31 UTC

[ambari] branch branch-2.7 updated: [AMBARI-24470] HDP 3.0 Livy2-Server fails to start. (#2048)

This is an automated email from the ASF dual-hosted git repository.

avijayan pushed a commit to branch branch-2.7
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/branch-2.7 by this push:
     new 25f53eb  [AMBARI-24470] HDP 3.0 Livy2-Server fails to start. (#2048)
25f53eb is described below

commit 25f53eb7aef4f979b8ceca30d9e35beeb7f959d5
Author: avijayanhwx <av...@hortonworks.com>
AuthorDate: Mon Aug 13 19:07:29 2018 -0700

    [AMBARI-24470] HDP 3.0 Livy2-Server fails to start. (#2048)
---
 .../SPARK2/2.0.0/package/scripts/params.py                |  1 +
 .../SPARK2/2.0.0/package/scripts/setup_livy2.py           | 15 ++++++++-------
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
index 2f38a4b..3564efc 100755
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/params.py
@@ -214,6 +214,7 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY2, sta
   livy2_hdfs_user_dir = format("/user/{livy2_user}")
   livy2_server_pid_file = status_params.livy2_server_pid_file
   livy2_recovery_dir = default("/configurations/livy2-conf/livy.server.recovery.state-store.url", "/livy2-recovery")
+  livy2_recovery_store = default("/configurations/livy2-conf/livy.server.recovery.state-store", "filesystem")
 
   livy2_server_start = format("{livy2_home}/bin/livy-server start")
   livy2_server_stop = format("{livy2_home}/bin/livy-server stop")
diff --git a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_livy2.py b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_livy2.py
index 59ec190..7259bbc6 100644
--- a/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_livy2.py
+++ b/ambari-server/src/main/resources/common-services/SPARK2/2.0.0/package/scripts/setup_livy2.py
@@ -42,13 +42,14 @@ def setup_livy(env, type, upgrade_type = None, action = None):
     )
     params.HdfsResource(None, action="execute")
 
-    params.HdfsResource(params.livy2_recovery_dir,
-                        type="directory",
-                        action="create_on_execute",
-                        owner=params.livy2_user,
-                        mode=0700
-       )
-    params.HdfsResource(None, action="execute")
+    if params.livy2_recovery_store == 'filesystem':
+      params.HdfsResource(params.livy2_recovery_dir,
+                          type="directory",
+                          action="create_on_execute",
+                          owner=params.livy2_user,
+                          mode=0700
+                          )
+      params.HdfsResource(None, action="execute")
 
   # create livy-env.sh in etc/conf dir
   File(os.path.join(params.livy2_conf, 'livy-env.sh'),