use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class ImpalaVolumeConfigProviderTest method testRoleConfigsWithAttachedVolumesGreaterThanMaxImapalaCacheVolumeSize.
@Test
void testRoleConfigsWithAttachedVolumesGreaterThanMaxImapalaCacheVolumeSize() {
HostgroupView worker = hostGroupWithVolumeTemplates(3, getVolumeTemplates(1000));
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(ImpalaRoles.ROLE_IMPALAD, worker, preparatorWithHostGroups(worker));
assertEquals(List.of(config("scratch_dirs", "/hadoopfs/fs1/impala/scratch,/hadoopfs/fs2/impala/scratch,/hadoopfs/fs3/impala/scratch"), config("datacache_enabled", "true"), config("datacache_capacity", "46170898432"), config("datacache_dirs", "/hadoopfs/fs1/impala/datacache,/hadoopfs/fs2/impala/datacache,/hadoopfs/fs3/impala/datacache")), roleConfigs);
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class ImpalaVolumeConfigProviderTest method testRoleConfigsWithAttachedVolumeCountZero.
@Test
void testRoleConfigsWithAttachedVolumeCountZero() {
HostgroupView worker = hostGroupWithVolumeTemplates(0, getVolumeTemplates(0));
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(ImpalaRoles.ROLE_IMPALAD, worker, preparatorWithHostGroups(worker));
assertEquals(List.of(config("scratch_dirs", "/hadoopfs/root1/impala/scratch")), roleConfigs);
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class ImpalaVolumeConfigProviderTest method testRoleConfigsWithAttachedVolumes200GB.
@Test
void testRoleConfigsWithAttachedVolumes200GB() {
HostgroupView worker = hostGroupWithVolumeTemplates(3, getVolumeTemplates(200));
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(ImpalaRoles.ROLE_IMPALAD, worker, preparatorWithHostGroups(worker));
assertEquals(List.of(config("scratch_dirs", "/hadoopfs/fs1/impala/scratch,/hadoopfs/fs2/impala/scratch,/hadoopfs/fs3/impala/scratch"), config("datacache_enabled", "true"), config("datacache_capacity", "46170898432"), config("datacache_dirs", "/hadoopfs/fs1/impala/datacache,/hadoopfs/fs2/impala/datacache,/hadoopfs/fs3/impala/datacache")), roleConfigs);
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class KafkaDatahubConfigProviderTest method getServiceConfigs.
@ParameterizedTest
@MethodSource("testArgsForGetServiceConfigs")
void getServiceConfigs(String cdhMainVersion, String cdhParcelVersion, Collection<ApiClusterTemplateConfig> expectedConfigs) {
when(blueprintView.getProcessor()).thenReturn(cmTemplateProcessor);
when(cmTemplateProcessor.getStackVersion()).thenReturn(cdhMainVersion);
when(cmTemplateProcessor.getVersion()).thenReturn(Optional.ofNullable(cdhMainVersion));
TemplatePreparationObject tpo = templatePreparationObject(StackType.WORKLOAD, cdhParcelVersion);
List<ApiClusterTemplateConfig> serviceConfigs = configProviderUnderTest.getServiceConfigs(cmTemplateProcessor, tpo);
assertThat(serviceConfigs).as("Expected configs for cdh version: %s / %s", cdhMainVersion, cdhParcelVersion).hasSameElementsAs(expectedConfigs);
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class KafkaMultiAzConfigProviderTest method getRoleConfigs.
@ParameterizedTest
@MethodSource("testArgsForGetRoleConfigs")
void getRoleConfigs(String cdhMainVersion, String cdhParcelVersion, Collection<ApiClusterTemplateConfig> expectedConfigs) {
when(blueprintView.getProcessor()).thenReturn(cmTemplateProcessor);
when(cmTemplateProcessor.getStackVersion()).thenReturn(cdhMainVersion);
TemplatePreparationObject tpo = templatePreparationObject(StackType.DATALAKE, cdhParcelVersion);
List<ApiClusterTemplateConfig> serviceConfigs = configProviderUnderTest.getRoleConfigs(KafkaRoles.KAFKA_BROKER, tpo);
assertThat(serviceConfigs).as("Expected configs for cdh version: %s / %s", cdhMainVersion, cdhParcelVersion).hasSameElementsAs(expectedConfigs);
}
Aggregations