use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class SchemaRegistryServiceConfigProviderTest method testGetSchemaRegistryRoleConfigs720.
@Test
public void testGetSchemaRegistryRoleConfigs720() {
String inputJson = loadBlueprint("7.2.0");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
TemplatePreparationObject preparationObject = getTemplatePreparationObject(cmTemplateProcessor);
List<ApiClusterTemplateConfig> roleConfigs = underTest.getRoleConfigs(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER, preparationObject);
assertThat(roleConfigs).hasSameElementsAs(List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)));
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class SchemaRegistryServiceConfigProviderTest method testGetSchemaRegistryServiceConfigs710.
@Test
public void testGetSchemaRegistryServiceConfigs710() {
String inputJson = loadBlueprint("7.1.0");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
TemplatePreparationObject preparationObject = getTemplatePreparationObject(cmTemplateProcessor);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertThat(serviceConfigs).isEmpty();
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class Spark3OnYarnRoleConfigProviderTest method testGetSpark3OnYarnRoleConfigsWhenNoStorageConfigured.
@Test
public void testGetSpark3OnYarnRoleConfigsWhenNoStorageConfigured() {
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> sparkOnYarnConfigs = roleConfigs.get("spark3_on_yarn-GATEWAY-BASE");
assertEquals(0, sparkOnYarnConfigs.size());
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class SparkOnYarnRoleConfigProviderTest method testGetSparkOnYarnRoleConfigsWhenNoStorageConfigured.
@Test
public void testGetSparkOnYarnRoleConfigsWhenNoStorageConfigured() {
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> sparkOnYarnConfigs = roleConfigs.get("spark_on_yarn-GATEWAY-BASE");
assertEquals(0, sparkOnYarnConfigs.size());
}
use of com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor in project cloudbreak by hortonworks.
the class SparkOnYarnRoleConfigProviderTest method validateClientConfig.
protected void validateClientConfig(String hmsExternalDirLocation, String clientConfigDirLocation) {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(hmsExternalDirLocation);
String inputJson = getBlueprintText("input/clouderamanager-ds.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject);
List<ApiClusterTemplateConfig> sparkOnYarnConfigs = roleConfigs.get("spark_on_yarn-GATEWAY-BASE");
assertEquals(1, sparkOnYarnConfigs.size());
assertEquals("spark-conf/spark-defaults.conf_client_config_safety_valve", sparkOnYarnConfigs.get(0).getName());
assertEquals("spark.yarn.access.hadoopFileSystems=" + clientConfigDirLocation, sparkOnYarnConfigs.get(0).getValue());
}
Aggregations