use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class ImpalaCloudStorageServiceConfigProviderTest method testImpalaCloudStorageServiceConfigs.
@Test
public void testImpalaCloudStorageServiceConfigs() {
CmTemplateProcessor templateProcessor = new CmTemplateProcessor(getBlueprintText("input/clouderamanager-host-with-uppercase.bp"));
TemplatePreparationObject templatePreparationObject = getTemplatePreparationObject(true);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(templateProcessor, templatePreparationObject);
assertEquals(1, serviceConfigs.size());
assertEquals("impala_cmd_args_safety_valve", serviceConfigs.get(0).getName());
assertEquals("--startup_filesystem_check_directories=" + "s3a://bucket/warehouse/tablespace/managed/hive," + "s3a://bucket/warehouse/tablespace/external/hive", serviceConfigs.get(0).getValue());
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class ImpalaCloudStorageServiceConfigProviderTest method testImpalaCloudStorageServiceConfigsWithLowerCdhVersion.
@Test
public void testImpalaCloudStorageServiceConfigsWithLowerCdhVersion() {
CmTemplateProcessor templateProcessor = new CmTemplateProcessor(getBlueprintText("input/cdp-data-mart.bp"));
TemplatePreparationObject templatePreparationObject = getTemplatePreparationObject(true);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(templateProcessor, templatePreparationObject);
assertEquals(0, serviceConfigs.size());
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class SqlStreamBuilderAdminDatabaseConfigProviderTest method testProperDbConfig.
@Test
public void testProperDbConfig() {
CmTemplateProcessor cmTemplateProcessor = initTemplateProcessor("7.2.11");
TemplatePreparationObject preparationObject = initTemplatePreparationObject(cmTemplateProcessor);
List<ApiClusterTemplateConfig> roleConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertThat(roleConfigs).hasSameElementsAs(List.of(config("database_type", "postgresql"), config("database_host", "testhost"), config("database_port", "5432"), config("database_schema", "eventador_admin"), config("database_user", "ssb_test_user"), config("database_password", "ssb_test_pw")));
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class SqlStreamBuilderSnapperDatabaseConfigProviderTest method testNoConfigNeeded.
@Test
public void testNoConfigNeeded() {
CmTemplateProcessor cmTemplateProcessor = initTemplateProcessor("7.2.10");
TemplatePreparationObject preparationObject = initTemplatePreparationObject(cmTemplateProcessor);
assertFalse(underTest.isConfigurationNeeded(cmTemplateProcessor, preparationObject));
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class TezRoleConfigProviderTest method testGetTezClientRoleConfigsWhenNoStorageConfigured.
@Test
public void testGetTezClientRoleConfigsWhenNoStorageConfigured() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject();
String inputJson = getBlueprintText("input/clouderamanager-ds.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject);
List<ApiClusterTemplateConfig> tezConfigs = roleConfigs.get("tez-GATEWAY-BASE");
assertEquals(0, tezConfigs.size());
}
Aggregations