use of com.sequenceiq.cloudbreak.api.endpoint.v4.database.base.DatabaseType in project cloudbreak by hortonworks.
the class ClusterStartHandler method updateDatabaseConfiguration.
private void updateDatabaseConfiguration(Optional<Stack> datalakeStack, Stack dataHubStack, String service, DatabaseType databaseType) {
Cluster cluster = clusterService.getById(datalakeStack.get().getCluster().getId());
Optional<RDSConfig> rdsConfig = postgresConfigService.createRdsConfigIfNeeded(datalakeStack.get(), cluster, databaseType).stream().filter(config -> config.getType().toLowerCase().equals(databaseType.toString().toLowerCase())).findFirst();
try {
if (rdsConfig.isPresent()) {
apiConnectors.getConnector(dataHubStack).updateServiceConfig(service, getRdsConfigMap(rdsConfig.get()));
} else {
LOGGER.error("Could not find RDS configuration for Hive");
}
} catch (CloudbreakException e) {
LOGGER.info("Exception while updating the Data-Hub configuration", e);
}
}
Aggregations