use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor 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.cmtemplate.CmTemplateProcessor 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.cmtemplate.CmTemplateProcessor 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.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class HiveOnTezServiceConfigProviderTest method testGetHiveOnTezServiceConfigsWhenNoStorageConfigured.
@Test
public void testGetHiveOnTezServiceConfigsWhenNoStorageConfigured() {
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.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class HiveServer2ConfigProviderTest method testIsConfigurationNeededShouldReturnTrueWhenHiveServer2RoleProvided.
@Test
public void testIsConfigurationNeededShouldReturnTrueWhenHiveServer2RoleProvided() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject();
String inputJson = getBlueprintText("input/clouderamanager.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
boolean configNeeded = underTest.isConfigurationNeeded(cmTemplateProcessor, preparationObject);
assertTrue(configNeeded);
}
Aggregations