ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stoa...@apache.org
Subject ambari git commit: AMBARI-15531. Hiveserver2 goes down on HA cluster deployed via blueprint. (Laszlo Puskas via stoader)
Date Fri, 25 Mar 2016 09:27:33 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 303f28037 -> 99ffb6eb5


AMBARI-15531. Hiveserver2 goes down on HA cluster deployed via blueprint. (Laszlo Puskas via
stoader)


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

Branch: refs/heads/trunk
Commit: 99ffb6eb55847652f4feddaedd18accf2c45f761
Parents: 303f280
Author: Toader, Sebastian <stoader@hortonworks.com>
Authored: Fri Mar 25 06:24:59 2016 +0100
Committer: Toader, Sebastian <stoader@hortonworks.com>
Committed: Fri Mar 25 09:51:35 2016 +0100

----------------------------------------------------------------------
 .../YARN/2.1.0.2.0/package/scripts/yarn.py      | 12 +++++--
 .../stacks/2.0.6/YARN/test_historyserver.py     | 38 ++++++++++++++++++++
 2 files changed, 48 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/99ffb6eb/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
index 4fdfb23..4110d39 100644
--- a/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
+++ b/ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/yarn.py
@@ -20,7 +20,6 @@ Ambari Agent
 """
 
 from resource_management import *
-import sys
 import os
 from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl
 from ambari_commons import OSConst
@@ -71,7 +70,16 @@ def yarn(name = None):
                            mode=0777,
                            recursive_chmod=True
       )
-      
+
+    # create the /tmp folder with proper permissions if it doesn't exist yet
+    if params.entity_file_history_directory.startswith('/tmp'):
+        params.HdfsResource('/tmp',
+                            action="create_on_execute",
+                            type="directory",
+                            owner=params.yarn_user,
+                            group=params.user_group,
+                            mode=0777
+        )
 
     params.HdfsResource(params.entity_file_history_directory,
                            action="create_on_execute",

http://git-wip-us.apache.org/repos/asf/ambari/blob/99ffb6eb/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
index bc0e07e..b6a19ec 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/YARN/test_historyserver.py
@@ -216,6 +216,25 @@ class TestHistoryServer(RMFTestCase):
         action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name=UnknownConfigurationMock(),
default_fs='hdfs://c6401.ambari.apache.org:8020',
         mode = 0777,
     )
+    self.assertResourceCalled('HdfsResource', '/tmp',
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
+        security_enabled = False,
+        hadoop_bin_dir = '/usr/bin',
+        keytab = UnknownConfigurationMock(),
+        default_fs = 'hdfs://c6401.ambari.apache.org:8020',
+        hdfs_site = self.getConfig()['configurations']['hdfs-site'],
+        kinit_path_local = '/usr/bin/kinit',
+        principal_name = UnknownConfigurationMock(),
+        user = 'hdfs',
+        dfs_type = '',
+        owner = 'yarn',
+        group = 'hadoop',
+        hadoop_conf_dir = '/etc/hadoop/conf',
+        type = 'directory',
+        action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
+        mode = 0777
+      )
+
     self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active',
         immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = False,
@@ -468,6 +487,25 @@ class TestHistoryServer(RMFTestCase):
         action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
hdfs_site=self.getConfig()['configurations']['hdfs-site'], principal_name='hdfs', default_fs='hdfs://c6401.ambari.apache.org:8020',
         mode = 0777,
     )
+
+    self.assertResourceCalled('HdfsResource', '/tmp',
+        immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
+        security_enabled = True,
+        hadoop_bin_dir = '/usr/bin',
+        keytab = '/etc/security/keytabs/hdfs.headless.keytab',
+        default_fs = 'hdfs://c6401.ambari.apache.org:8020',
+        hdfs_site = self.getConfig()['configurations']['hdfs-site'],
+        kinit_path_local = '/usr/bin/kinit',
+        principal_name = 'hdfs',
+        user = 'hdfs',
+        dfs_type = '',
+        owner = 'yarn',
+        group = 'hadoop',
+        hadoop_conf_dir = '/etc/hadoop/conf',
+        type = 'directory',
+        action = ['create_on_execute'], hdfs_resource_ignore_file='/var/lib/ambari-agent/data/.hdfs_resource_ignore',
+        mode = 0777
+    )
     self.assertResourceCalled('HdfsResource', '/tmp/entity-file-history/active',
         immutable_paths = self.DEFAULT_IMMUTABLE_PATHS,
         security_enabled = True,


Mime
View raw message