ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
Subject ambari git commit: AMBARI-20017. PixieDust - Decrease Service Check running time under 3 mins (dlysnichenko)
Date Thu, 16 Feb 2017 21:19:54 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 347ba2a99 -> 18fc2586f


AMBARI-20017. PixieDust - Decrease Service Check running time under 3 mins (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: 18fc2586fa7410823b3d7a9354cf5b10be0dc2e0
Parents: 347ba2a
Author: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Authored: Thu Feb 16 23:17:09 2017 +0200
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
Committed: Thu Feb 16 23:17:09 2017 +0200

----------------------------------------------------------------------
 .../controller/AmbariCustomCommandExecutionHelper.java   |  8 ++++++++
 .../org/apache/ambari/server/state/ConfigHelper.java     |  2 ++
 .../stacks/HDP/2.0.6/configuration/cluster-env.xml       | 11 +++++++++++
 3 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/18fc2586/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index b601893..eeb2de5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -142,6 +142,8 @@ public class AmbariCustomCommandExecutionHelper {
 
   private final static String ALIGN_MAINTENANCE_STATE = "align_maintenance_state";
 
+  public final static int MIN_STRICT_SERVICE_CHECK_TIMEOUT = 120;
+  
   @Inject
   private ActionMetadata actionMetadata;
 
@@ -766,6 +768,12 @@ public class AmbariCustomCommandExecutionHelper {
     }
 
     commandParams.put(COMMAND_TIMEOUT, commandTimeout);
+    String checkType = configHelper.getValueFromDesiredConfigurations(cluster, ConfigHelper.CLUSTER_ENV,
ConfigHelper.SERVICE_CHECK_TYPE);
+    if (ConfigHelper.SERVICE_CHECK_MINIMAL.equals(checkType)) {
+      int actualTimeout = Integer.parseInt(commandParams.get(COMMAND_TIMEOUT)) / 2;
+      actualTimeout = actualTimeout < MIN_STRICT_SERVICE_CHECK_TIMEOUT ? MIN_STRICT_SERVICE_CHECK_TIMEOUT
: actualTimeout;
+      commandParams.put(COMMAND_TIMEOUT, Integer.toString(actualTimeout));
+    }
     commandParams.put(SERVICE_PACKAGE_FOLDER, serviceInfo.getServicePackageFolder());
     commandParams.put(HOOKS_FOLDER, stackInfo.getStackHooksFolder());
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/18fc2586/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
index 0e5b434..6572bbb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ConfigHelper.java
@@ -86,6 +86,7 @@ public class ConfigHelper {
   public static final String CLUSTER_ENV = "cluster-env";
   public static final String CLUSTER_ENV_ALERT_REPEAT_TOLERANCE = "alerts_repeat_tolerance";
   public static final String CLUSTER_ENV_RETRY_ENABLED = "command_retry_enabled";
+  public static final String SERVICE_CHECK_TYPE = "service_check_type";
   public static final String CLUSTER_ENV_RETRY_COMMANDS = "commands_to_retry";
   public static final String CLUSTER_ENV_RETRY_MAX_TIME_IN_SEC = "command_retry_max_time_in_sec";
   public static final String COMMAND_RETRY_MAX_TIME_IN_SEC_DEFAULT = "600";
@@ -94,6 +95,7 @@ public class ConfigHelper {
 
   public static final String HTTP_ONLY = "HTTP_ONLY";
   public static final String HTTPS_ONLY = "HTTPS_ONLY";
+  public static final String SERVICE_CHECK_MINIMAL = "minimal";
 
   /**
    * The tag given to newly created versions.

http://git-wip-us.apache.org/repos/asf/ambari/blob/18fc2586/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
index 3af8f08..3f74aa7 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/configuration/cluster-env.xml
@@ -296,4 +296,15 @@ gpgcheck=0</value>
     <description>Flag to turn on when external setup of External Ranger is done.</description>
     <on-ambari-upgrade add="false"/>
   </property>
+  <property>
+    <name>service_check_type</name>
+    <display-name>Service Check Type</display-name>
+    <value>full</value>
+    <description>Indicates the complexity of the service check.  Valid values are 'minimal'
or 'full'.</description>
+    <on-ambari-upgrade add="true"/>
+    <value-attributes>
+      <visible>true</visible>
+      <empty-value-valid>true</empty-value-valid>
+    </value-attributes>
+  </property>
 </configuration>


Mime
View raw message