ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-19433. Increase default timeout and threadpool size for the external script to work on slower machines. (jaimin)
Date Mon, 06 Mar 2017 19:42:42 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 8e6882447 -> 23bd4187c


AMBARI-19433. Increase default timeout and threadpool size for the external script to work
on slower machines. (jaimin)


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

Branch: refs/heads/branch-2.5
Commit: 23bd4187cb8442bcc06fd20469e9f8b77158a4cf
Parents: 8e68824
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Mar 6 11:41:27 2017 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Mar 6 11:42:18 2017 -0800

----------------------------------------------------------------------
 .../org/apache/ambari/server/configuration/Configuration.java    | 4 ++--
 .../server/controller/internal/ClientConfigResourceProvider.java | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/23bd4187/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 27ac82c..cfb4d3d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -1754,7 +1754,7 @@ public class Configuration {
    */
   @Markdown(description = "The time, in milliseconds, until an external script is killed.")
   public static final ConfigurationProperty<Integer> EXTERNAL_SCRIPT_TIMEOUT = new
ConfigurationProperty<>(
-      "server.script.timeout", 5000);
+      "server.script.timeout", 10000);
 
   /**
    * The time, in {@link TimeUnit#MILLISECONDS}, until an external script is killed.
@@ -1762,7 +1762,7 @@ public class Configuration {
    */
   @Markdown(description = "The number of threads that should be allocated to run external
script.")
   public static final ConfigurationProperty<Integer> THREAD_POOL_SIZE_FOR_EXTERNAL_SCRIPT
= new ConfigurationProperty<>(
-    "server.script.threads", 4);
+    "server.script.threads", 20);
 
   public static final String DEF_ARCHIVE_EXTENSION;
   public static final String DEF_ARCHIVE_CONTENT_TYPE;

http://git-wip-us.apache.org/repos/asf/ambari/blob/23bd4187/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
index 42e9b34..b690e3a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProvider.java
@@ -479,7 +479,8 @@ public class ClientConfigResourceProvider extends AbstractControllerResourceProv
       throw new SystemException("No configuration files defined for any component" );
     }
 
-    Integer threadPoolSize = configs.getExternalScriptThreadPoolSize();
+    Integer totalCommands = pythonCompressFilesCmds.size() * 2;
+    Integer threadPoolSize = Math.min(totalCommands,configs.getExternalScriptThreadPoolSize());
     ExecutorService processExecutor = Executors.newFixedThreadPool(threadPoolSize);
 
     // put all threads that starts process to compress each component config files in the
executor


Mime
View raw message