Search in sources :

Example 11 with RdsView

use of com.sequenceiq.cloudbreak.template.views.RdsView in project cloudbreak by hortonworks.

the class OozieRoleConfigProvider method getRoleConfigs.

@Override
protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject source) {
    switch(roleType) {
        case OozieRoles.OOZIE_SERVER:
            RdsView oozieRdsView = getRdsView(source);
            List<ApiClusterTemplateConfig> config = new ArrayList<>(List.of(config(OOZIE_DATABASE_HOST, oozieRdsView.getHost()), config(OOZIE_DATABASE_NAME, oozieRdsView.getDatabaseName()), config(OOZIE_DATABASE_TYPE, oozieRdsView.getSubprotocol()), config(OOZIE_DATABASE_USER, oozieRdsView.getConnectionUserName()), config(OOZIE_DATABASE_PASSWORD, oozieRdsView.getConnectionPassword())));
            return config;
        default:
            return List.of();
    }
}
Also used : RdsView(com.sequenceiq.cloudbreak.template.views.RdsView) ArrayList(java.util.ArrayList) ApiClusterTemplateConfig(com.cloudera.api.swagger.model.ApiClusterTemplateConfig)

Example 12 with RdsView

use of com.sequenceiq.cloudbreak.template.views.RdsView in project cloudbreak by hortonworks.

the class ClusterStartHandler method getRdsConfigMap.

private Map<String, String> getRdsConfigMap(RDSConfig rdsConfig) {
    RdsView hiveRdsView = new RdsView(rdsConfig, dbCertificateProvider.getSslCertsFilePath());
    Map<String, String> configs = new HashMap<String, String>();
    configs.put(HIVE_METASTORE_DATABASE_HOST, hiveRdsView.getHost());
    configs.put(HIVE_METASTORE_DATABASE_NAME, hiveRdsView.getDatabaseName());
    configs.put(HIVE_METASTORE_DATABASE_PASSWORD, hiveRdsView.getConnectionPassword());
    configs.put(HIVE_METASTORE_DATABASE_PORT, hiveRdsView.getPort());
    configs.put(HIVE_METASTORE_DATABASE_TYPE, hiveRdsView.getSubprotocol());
    configs.put(HIVE_METASTORE_DATABASE_USER, hiveRdsView.getConnectionUserName());
    configs.put(JDBC_URL_OVERRIDE, hiveRdsView.getConnectionURL());
    return configs;
}
Also used : HashMap(java.util.HashMap) RdsView(com.sequenceiq.cloudbreak.template.views.RdsView)

Aggregations

RdsView (com.sequenceiq.cloudbreak.template.views.RdsView)12 ApiClusterTemplateConfig (com.cloudera.api.swagger.model.ApiClusterTemplateConfig)6 ArrayList (java.util.ArrayList)5 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)2 HashMap (java.util.HashMap)2 ApiClusterTemplateVariable (com.cloudera.api.swagger.model.ApiClusterTemplateVariable)1 VirtualGroupRequest (com.sequenceiq.cloudbreak.auth.altus.VirtualGroupRequest)1 RdsConfigWithoutCluster (com.sequenceiq.cloudbreak.domain.view.RdsConfigWithoutCluster)1 KerberosConfig (com.sequenceiq.cloudbreak.dto.KerberosConfig)1 CloudbreakOrchestratorFailedException (com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorFailedException)1 SaltPillarProperties (com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties)1 Test (org.junit.jupiter.api.Test)1