|
@@ -237,6 +237,8 @@ public class Configuration {
|
|
|
public static final String DEFAULT_SCHEDULER_START_DELAY_SECONDS = "120";
|
|
|
public static final String SERVER_TMP_DIR_KEY = "server.tmp.dir";
|
|
|
public static final String SERVER_TMP_DIR_DEFAULT = "/var/lib/ambari-server/tmp";
|
|
|
+ public static final String EXTERNAL_SCRIPT_TIMEOUT_KEY = "server.script.timeout";
|
|
|
+ public static final String EXTERNAL_SCRIPT_TIMEOUT_DEFAULT = "5000";
|
|
|
/**
|
|
|
* This key defines whether stages of parallel requests are executed in
|
|
|
* parallel or sequentally. Only stages from different requests
|
|
@@ -389,6 +391,8 @@ public class Configuration {
|
|
|
PARALLEL_STAGE_EXECUTION_KEY, PARALLEL_STAGE_EXECUTION_DEFAULT));
|
|
|
configsMap.put(SERVER_TMP_DIR_KEY, properties.getProperty(
|
|
|
SERVER_TMP_DIR_KEY, SERVER_TMP_DIR_DEFAULT));
|
|
|
+ configsMap.put(EXTERNAL_SCRIPT_TIMEOUT_KEY, properties.getProperty(
|
|
|
+ EXTERNAL_SCRIPT_TIMEOUT_KEY, EXTERNAL_SCRIPT_TIMEOUT_DEFAULT));
|
|
|
|
|
|
configsMap.put(SHARED_RESOURCES_DIR_KEY, properties.getProperty(
|
|
|
SHARED_RESOURCES_DIR_KEY, SHARED_RESOURCES_DIR_DEFAULT));
|
|
@@ -1057,6 +1061,10 @@ public class Configuration {
|
|
|
return Integer.parseInt(delay);
|
|
|
}
|
|
|
|
|
|
+ public Integer getExternalScriptTimeout() {
|
|
|
+ return Integer.parseInt(properties.getProperty(EXTERNAL_SCRIPT_TIMEOUT_KEY, EXTERNAL_SCRIPT_TIMEOUT_DEFAULT));
|
|
|
+ }
|
|
|
+
|
|
|
public boolean getParallelStageExecution() {
|
|
|
return "true".equalsIgnoreCase(configsMap.get(PARALLEL_STAGE_EXECUTION_KEY));
|
|
|
}
|