use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.
the class ClusterHostServiceRunner method decoratePillarWithClouderaManagerDatabase.
private void decoratePillarWithClouderaManagerDatabase(Cluster cluster, Map<String, SaltPillarProperties> servicePillar) throws CloudbreakOrchestratorFailedException {
RdsConfigWithoutCluster clouderaManagerRdsConfig = rdsConfigWithoutClusterService.findByClusterIdAndType(cluster.getId(), DatabaseType.CLOUDERA_MANAGER);
if (clouderaManagerRdsConfig == null) {
throw new CloudbreakOrchestratorFailedException("Cloudera Manager RDSConfig is missing for stack");
}
RdsView rdsView = new RdsView(clouderaManagerRdsConfig);
servicePillar.put("cloudera-manager-database", new SaltPillarProperties("/cloudera-manager/database.sls", singletonMap("cloudera-manager", singletonMap("database", rdsView))));
}
use of com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster in project cloudbreak by hortonworks.
the class SharedServiceConfigProvider method configureCluster.
public Cluster configureCluster(@Nonnull Cluster requestedCluster, User user, Workspace workspace) {
Objects.requireNonNull(requestedCluster);
Stack stack = requestedCluster.getStack();
if (!Strings.isNullOrEmpty(stack.getDatalakeCrn())) {
Stack datalakeStack = stackService.getByCrn(stack.getDatalakeCrn());
if (datalakeStack != null) {
List<RdsConfigWithoutCluster> rdsConfigs = rdsConfigWithoutClusterService.findByClusterIdAndStatusInAndTypeIn(datalakeStack.getCluster().getId(), Set.of(ResourceStatus.USER_MANAGED, ResourceStatus.DEFAULT), Set.of(DatabaseType.HIVE));
setupRds(requestedCluster, rdsConfigs);
setupStoragePath(requestedCluster, datalakeStack);
}
}
return requestedCluster;
}
Aggregations