This is an automated email from the ASF dual-hosted git repository.

hapylestat pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 30b0db0  [AMBARI-23673] Available packages reader speed is to slow for 
ubuntu systems (dgrinenko)
30b0db0 is described below

commit 30b0db04da6769b2a96c4b9c1c6cc3725ed4da26
Author: Dmitry Grinenko <[email protected]>
AuthorDate: Tue Apr 24 18:12:46 2018 +0300

    [AMBARI-23673] Available packages reader speed is to slow for ubuntu 
systems (dgrinenko)
---
 .../src/main/python/ambari_commons/repo_manager/apt_manager.py     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py 
b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
index c4b6e7d..38cf602 100644
--- a/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
+++ b/ambari-common/src/main/python/ambari_commons/repo_manager/apt_manager.py
@@ -95,7 +95,8 @@ class AptManager(GenericManager):
     packages = []
     available_packages = self._available_packages_dict(pkg_names, repo_filter)
 
-    with shell.process_executor(self.properties.installed_packages_cmd, 
error_callback=self._executor_error_handler) as output:
+    with shell.process_executor(self.properties.installed_packages_cmd, 
error_callback=self._executor_error_handler,
+                                strategy=shell.ReaderStrategy.BufferedChunks) 
as output:
       for package, version in AptParser.packages_installed_reader(output):
         if package in available_packages:
           packages.append(available_packages[package])
@@ -113,7 +114,9 @@ class AptManager(GenericManager):
     :type repo_filter str|None
     """
 
-    with shell.process_executor(self.properties.available_packages_cmd, 
error_callback=self._executor_error_handler) as output:
+    with shell.process_executor(self.properties.available_packages_cmd, 
error_callback=self._executor_error_handler,
+                                strategy=shell.ReaderStrategy.BufferedChunks) 
as output:
+
       for pkg_item in AptParser.packages_reader(output):
         if repo_filter and repo_filter not in pkg_item[2]:
           continue

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to