use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class FlinkCloudStorageConfigProviderTest method testGetFlinkCloudStorageRoleConfigsWhenNoCloudStorageProvided.
@Test
public void testGetFlinkCloudStorageRoleConfigsWhenNoCloudStorageProvided() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(false);
String inputJson = getBlueprintText("input/flink.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject);
List<ApiClusterTemplateConfig> flinkRoleConfigs = roleConfigs.get("flink-FLINK_HISTORY_SERVER-BASE");
assertEquals(0, flinkRoleConfigs.size());
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class FlinkCloudStorageConfigProviderTest method testGetFlinkCloudStorageRoleConfigs.
@Test
public void testGetFlinkCloudStorageRoleConfigs() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(true);
String inputJson = getBlueprintText("input/flink.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject);
List<ApiClusterTemplateConfig> flinkRoleConfigs = roleConfigs.get("flink-FLINK_HISTORY_SERVER-BASE");
Map<String, String> actual = flinkRoleConfigs.stream().collect(Collectors.toMap(ApiClusterTemplateConfig::getName, ApiClusterTemplateConfig::getValue));
Map<String, String> expectedRoleConfigs = Map.of(HISTORY_SERVER_ARCHIVE_FS_DIR_NAME, HISTORY_SERVER_ARCHIVE_FS_DIR_VALUE);
assertEquals(expectedRoleConfigs, actual);
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class CodHadoopTempDirConfigProviderTest method testNoConfigChangeForYcloudCluster.
@Test
public void testNoConfigChangeForYcloudCluster() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(true, false, "7.2.1", Map.of("is_cod_cluster", "true"), CloudPlatform.YARN);
String inputJson = getBlueprintText("input/clouderamanager.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 HbaseCloudStorageServiceConfigProviderTest method testGetHbaseServiceConfigsWhenNoStorageConfiguredWithDataLake.
@Test
public void testGetHbaseServiceConfigsWhenNoStorageConfiguredWithDataLake() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(false, true);
String inputJson = getBlueprintText("input/clouderamanager.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 HbaseCloudStorageServiceConfigProviderTest method testGetHbaseStorageServiceConfigsWhenDataLake722.
@Test
public void testGetHbaseStorageServiceConfigsWhenDataLake722() {
TemplatePreparationObject preparationObject = getTemplatePreparationObject(true, true, "7.2.2");
String inputJson = getBlueprintText("input/clouderamanager.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
List<ApiClusterTemplateConfig> serviceConfigs = underTest.getServiceConfigs(cmTemplateProcessor, preparationObject);
assertEquals(1, serviceConfigs.size());
assertEquals("hdfs_rootdir", serviceConfigs.get(0).getName());
assertEquals("s3a://bucket/cluster1/hbase", serviceConfigs.get(0).getValue());
}
Aggregations