use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveKnoxConfigProviderTest method config.
private static ApiClusterTemplateConfig config(String name, String value) {
ApiClusterTemplateConfig cfg = new ApiClusterTemplateConfig();
cfg.setName(name);
cfg.setValue(value);
return cfg;
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveLLAPServiceConfigProviderTest method testGetHiveLlapServiceConfigsWhenNoStorageConfigured.
@Test
public void testGetHiveLlapServiceConfigsWhenNoStorageConfigured() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(false);
String inputJson = getBlueprintText("input/clouderamanager-ds.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertEquals(0, serviceConfigs.size());
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveLLAPServiceConfigProviderTest method testGetHiveLlapServiceConfigs.
@Test
public void testGetHiveLlapServiceConfigs() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(true);
String inputJson = getBlueprintText("input/clouderamanager-ds.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertEquals(1, serviceConfigs.size());
assertEquals("hive_hook_proto_base_directory", serviceConfigs.get(0).getName());
assertEquals("s3a://bucket/hive/warehouse/external/sys.db/query_data", serviceConfigs.get(0).getValue());
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreCloudStorageServiceConfigProviderTest method testGetHMSStorageServiceConfigs.
@Test
public void testGetHMSStorageServiceConfigs() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(true);
String inputJson = getBlueprintText("input/clouderamanager.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertEquals(3, serviceConfigs.size());
assertEquals("hive_warehouse_directory", serviceConfigs.get(0).getName());
assertEquals("s3a://bucket/hive/warehouse", serviceConfigs.get(0).getValue());
assertEquals("hive_warehouse_external_directory", serviceConfigs.get(1).getName());
assertEquals("s3a://bucket/hive/warehouse/external", serviceConfigs.get(1).getValue());
assertEquals("hive_repl_replica_functions_root_dir", serviceConfigs.get(2).getName());
assertEquals("s3a://bucket/hive/replica", serviceConfigs.get(2).getValue());
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getServiceConfigsTestDbOnlyWithSslAndTemplateWithHarmlessHmsServiceConfigsAndCustomHmsDbOverride.
@Test
void getServiceConfigsTestDbOnlyWithSslAndTemplateWithHarmlessHmsServiceConfigsAndCustomHmsDbOverride() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().withRdsConfigs(Set.of(createRdsConfig(RdsSslMode.ENABLED))).withProductDetails(generateCmRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_2), null).build();
initHmsServiceConfigs(List.of(config("foo", "bar"), config(HIVE_METASTORE_DATABASE_HOST, "customhms.mydomain.com")));
List<ApiClusterTemplateConfig> result = underTest.getServiceConfigs(templateProcessor, tpo);
verifyDbOnlyMinimalResult(result);
}
Aggregations