use of com.sequenceiq.cloudbreak.cm.exception.CommandDetails in project cloudbreak by hortonworks.
the class ClouderaManagerTemplateInstallationChecker method fail.
private void fail(String messagePrefix, ApiCommand apiCommand, CommandsResourceApi commandsResourceApi, StackType stackType) {
List<CommandDetails> failedCommands = ClouderaManagerCommandUtil.getFailedOrActiveCommands(apiCommand, commandsResourceApi);
String msg = messagePrefix + "Installation of CDP with Cloudera Manager has failed. " + CommandDetailsFormatter.formatFailedCommands(failedCommands);
LOGGER.debug("Top level command {}. Failed or active commands: {}", CommandDetails.fromApiCommand(apiCommand), failedCommands);
if (stackType == StackType.DATALAKE) {
for (CommandDetails failedCommand : failedCommands) {
// has no added value, therefore we are just checking whether AuditDir related commands are failing or not.
if (CLOUD_STORAGE_RELATED_COMMANDS.contains(failedCommand.getName()) && CommandDetails.CommandStatus.FAILED == failedCommand.getCommandStatus()) {
throw new CloudStorageConfigurationFailedException(msg);
}
}
}
throw new ClouderaManagerOperationFailedException(msg);
}
Aggregations