ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject ambari git commit: AMBARI-14070 App Timeline Server become stopped by itself (Upgrade from 2.1.2 to 2.1.3.0 ) (dsen)
Date Wed, 25 Nov 2015 16:02:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 deb3f33d3 -> 498fa8d24


AMBARI-14070 App Timeline Server become stopped by itself (Upgrade from 2.1.2 to 2.1.3.0 )
(dsen)


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

Branch: refs/heads/branch-2.1
Commit: 498fa8d24b18c7a2e498675c060f83c6325a15fc
Parents: deb3f33
Author: Dmytro Sen <dsen@apache.org>
Authored: Wed Nov 25 18:02:42 2015 +0200
Committer: Dmytro Sen <dsen@apache.org>
Committed: Wed Nov 25 18:02:42 2015 +0200

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/service.py        | 15 ++++++++-------
 .../python/stacks/2.1/YARN/test_apptimelineserver.py | 13 ++++++++-----
 2 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/498fa8d2/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
index 6070442..6d9aef5 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/service.py
@@ -39,13 +39,6 @@ def service(componentName, action='start', serviceName='yarn'):
 def service(componentName, action='start', serviceName='yarn'):
   import params
 
-  if componentName == 'timelineserver' and serviceName == 'yarn' and action == 'start':
-    File(params.ats_leveldb_lock_file,
-         action = "delete",
-         only_if = format("ls {params.ats_leveldb_lock_file}"),
-         ignore_failures = True
-    )
-
   if serviceName == 'mapreduce' and componentName == 'historyserver':
     delete_pid_file = True
     daemon = format("{mapred_bin}/mr-jobhistory-daemon.sh")
@@ -68,6 +61,14 @@ def service(componentName, action='start', serviceName='yarn'):
     # Remove the pid file if its corresponding process is not running.
     File(pid_file, action = "delete", not_if = check_process)
 
+    if componentName == 'timelineserver' and serviceName == 'yarn':
+      File(params.ats_leveldb_lock_file,
+         action = "delete",
+         only_if = format("ls {params.ats_leveldb_lock_file}"),
+         not_if = check_process,
+         ignore_failures = True
+      )
+
     # Attempt to start the process. Internally, this is skipped if the process is already
running.
     Execute(daemon_cmd, user = usr, not_if = check_process)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/498fa8d2/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
index f8e4504..1b5e485 100644
--- a/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
+++ b/ambari-server/src/test/python/stacks/2.1/YARN/test_apptimelineserver.py
@@ -55,15 +55,18 @@ class TestAppTimelineServer(RMFTestCase):
 
     self.assert_configure_default()
 
-    self.assertResourceCalled('File', '/var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK',
-                              only_if='ls /var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK',
-                              action=['delete'],
-                              ignore_failures=True)
-
     self.assertResourceCalled('File', '/var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid',
         action = ['delete'],
         not_if = "ambari-sudo.sh su yarn -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid
&& ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`'",
     )
+
+    self.assertResourceCalled('File', '/var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK',
+      only_if='ls /var/log/hadoop-yarn/timeline/leveldb-timeline-store.ldb/LOCK',
+      action=['delete'],
+      not_if="ambari-sudo.sh su yarn -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid
&& ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`'",
+      ignore_failures=True
+    )
+
     self.assertResourceCalled('Execute', 'ulimit -c unlimited; export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec
&& /usr/lib/hadoop-yarn/sbin/yarn-daemon.sh --config /etc/hadoop/conf start timelineserver',
         not_if = "ambari-sudo.sh su yarn -l -s /bin/bash -c '[RMF_EXPORT_PLACEHOLDER]ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid
&& ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`'",
         user = 'yarn',


Mime
View raw message