Repository: ambari Updated Branches: refs/heads/branch-2.1 2596e648f -> f415e7e86
Revert "AMBARI-14660. HistoryServer upgrade times out when /app-logs is too large (aonishuk)" This reverts commit 2596e648f0804ae47ec7ef43d60e34119fee13c2. Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f415e7e8 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f415e7e8 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f415e7e8 Branch: refs/heads/branch-2.1 Commit: f415e7e865186fe63580717eb2ea39512f0e6b8d Parents: 2596e64 Author: Andrew Onishuk <[email protected]> Authored: Thu Jan 14 12:45:28 2016 +0200 Committer: Andrew Onishuk <[email protected]> Committed: Thu Jan 14 12:45:28 2016 +0200 ---------------------------------------------------------------------- .../libraries/providers/hdfs_resource.py | 18 ------------------ 1 file changed, 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f415e7e8/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py ---------------------------------------------------------------------- diff --git a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py index 3c18b7d..a016ad6 100644 --- a/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py +++ b/ambari-common/src/main/python/resource_management/libraries/providers/hdfs_resource.py @@ -215,12 +215,6 @@ class HdfsResourceWebHDFS: Since it's not available on non-hdfs FS and also can be disabled in scope of HDFS. We should still have the other implementations for such a cases. """ - - # if we have more than this count of files to recursively chmod/chown - # webhdfs won't be used, but 'hadoop fs -chmod (or chown) -R ..' As it can really slow. - # (in one second ~17 files can be chmoded) - MAX_FILES_FOR_RECURSIVE_ACTION_VIA_WEBHDFS = 1000 - def action_execute(self, main_resource): pass @@ -347,12 +341,6 @@ class HdfsResourceWebHDFS: if self.main_resource.resource.recursive_chown: self._fill_directories_list(self.main_resource.resource.target, results) - - # if we don't do this, we can end up waiting real long, having a big result list. - if len(results) > HdfsResourceWebHDFS.MAX_FILES_FOR_RECURSIVE_ACTION_VIA_WEBHDFS: - shell.checked_call(["hadoop", "fs", "-chown", "-R", format("{owner}:{group}"), self.main_resource.resource.target], user=self.main_resource.resource.user) - results = [] - if self.main_resource.resource.change_permissions_for_parents: self._fill_in_parent_directories(self.main_resource.resource.target, results) @@ -370,12 +358,6 @@ class HdfsResourceWebHDFS: if self.main_resource.resource.recursive_chmod: self._fill_directories_list(self.main_resource.resource.target, results) - - # if we don't do this, we can end up waiting real long, having a big result list. - if len(results) > HdfsResourceWebHDFS.MAX_FILES_FOR_RECURSIVE_ACTION_VIA_WEBHDFS: - shell.checked_call(["hadoop", "fs", "-chmod", "-R", self.mode, self.main_resource.resource.target], user=self.main_resource.resource.user) - results = [] - if self.main_resource.resource.change_permissions_for_parents: self._fill_in_parent_directories(self.main_resource.resource.target, results)
