ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [15/17] ambari git commit: AMBARI-13558. App Timeline Server unexpectedly turn down [rarely reproduced] (dlysnichenko)
Date Mon, 26 Oct 2015 14:19:24 GMT
AMBARI-13558. App Timeline Server unexpectedly turn down [rarely reproduced] (dlysnichenko)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 0e8dddabdee9a87d421c6ab6c4adcf6b6c3747b3
Parents: a9546af
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Mon Oct 26 13:28:54 2015 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Mon Oct 26 13:29:49 2015 +0200

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/params_linux.py            | 1 +
 .../common-services/YARN/2.1.0.2.0/package/scripts/service.py | 7 +++++++
 .../src/test/python/stacks/2.1/YARN/test_apptimelineserver.py | 5 +++++
 3 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e8dddab/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
index 929269d..a02a84d 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/params_linux.py
@@ -145,6 +145,7 @@ resourcemanager_heapsize = config['configurations']['yarn-env']['resourcemanager
 nodemanager_heapsize = config['configurations']['yarn-env']['nodemanager_heapsize']
 apptimelineserver_heapsize = default("/configurations/yarn-env/apptimelineserver_heapsize",
1024)
 ats_leveldb_dir = config['configurations']['yarn-site']['yarn.timeline-service.leveldb-timeline-store.path']
+ats_leveldb_lock_file = os.path.join(ats_leveldb_dir, "leveldb-timeline-store.ldb", "LOCK")
 yarn_log_dir_prefix = config['configurations']['yarn-env']['yarn_log_dir_prefix']
 yarn_pid_dir_prefix = status_params.yarn_pid_dir_prefix
 mapred_pid_dir_prefix = status_params.mapred_pid_dir_prefix

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e8dddab/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 f368bd4..6785644 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
@@ -38,6 +38,13 @@ 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")

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e8dddab/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 0e467d8..2c1184a 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
@@ -56,6 +56,11 @@ 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)
+
     pid_check_cmd = 'ls /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid >/dev/null
2>&1 && ps -p `cat /var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid`
>/dev/null 2>&1'
     self.assertResourceCalled('File', '/var/run/hadoop-yarn/yarn/yarn-yarn-timelineserver.pid',
                               not_if=pid_check_cmd,


Mime
View raw message