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 15:19:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk a147e43c8 -> a8b285354


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/a8b28535
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/a8b28535
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/a8b28535

Branch: refs/heads/trunk
Commit: a8b2853547d53d277bb0a320f74cd99a7dc90ebd
Parents: a147e43
Author: Dmytro Sen <dsen@apache.org>
Authored: Wed Nov 25 17:19:42 2015 +0200
Committer: Dmytro Sen <dsen@apache.org>
Committed: Wed Nov 25 17:19: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/a8b28535/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/a8b28535/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 4748fb0..6118cc8 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