* TODO: Custom actions are not supported yet, that's why we just pass
* component main commandScript to agent. This script is only used for
* default commads like INSTALL/STOP/START/CONFIGURE
*/
String commandTimeout = configs.getDefaultAgentTaskTimeout();
CommandScriptDefinition script = componentInfo.getCommandScript();
if (serviceInfo.getSchemaVersion().equals(AmbariMetaInfo.SCHEMA_VERSION_2)) {
if (script != null) {
commandParams.put(SCRIPT, script.getScript());
commandParams.put(SCRIPT_TYPE, script.getScriptType().toString());
if (script.getTimeout() > 0) {
commandTimeout = String.valueOf(script.getTimeout());
}
} else {
String message = String.format("Component %s of service %s has no " +
"command script defined", componentName, serviceName);
throw new AmbariException(message);