use of com.sequenceiq.cloudbreak.template.TemplatePreparationObject 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.sequenceiq.cloudbreak.template.TemplatePreparationObject in project cloudbreak by hortonworks.
the class HiveMetastoreCloudStorageServiceConfigProviderTest method testIsConfigurationNeededShouldReturnTrueWhenHMSRoleProvided.
@Test
public void testIsConfigurationNeededShouldReturnTrueWhenHMSRoleProvided() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(true);
String inputJson = getBlueprintText("input/clouderamanager.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
boolean configNeeded = underTest.isConfigurationNeeded(cmTemplateProcessor, preparationObject);
assertTrue(configNeeded);
}
use of com.sequenceiq.cloudbreak.template.TemplatePreparationObject 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.sequenceiq.cloudbreak.template.TemplatePreparationObject 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);
}
use of com.sequenceiq.cloudbreak.template.TemplatePreparationObject in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProviderTest method getServiceConfigsTestDatalakeAndNoLdap.
@Test
void getServiceConfigsTestDatalakeAndNoLdap() {
TemplatePreparationObject tpo = new TemplatePreparationObject.Builder().withRdsConfigs(Set.of(createRdsConfig(null))).withProductDetails(generateCmRepo(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_7_2_2), null).withStackType(StackType.DATALAKE).build();
List<ApiClusterTemplateConfig> result = underTest.getServiceConfigs(templateProcessor, tpo);
verifyDbOnlyMinimalResult(result);
}
Aggregations