use of com.sequenceiq.cloudbreak.template.views.HostgroupView 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.sequenceiq.cloudbreak.template.views.HostgroupView 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.sequenceiq.cloudbreak.template.views.HostgroupView 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.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class KafkaConnectDataHubConfigProviderTest method testRoleConfigsReturnedWithValidParameters.
@ParameterizedTest
@MethodSource("validConfigurationParameters")
void testRoleConfigsReturnedWithValidParameters(String cdhVersion, String roleType) {
cdpMainVersionIs(cdhVersion);
HostgroupView hostGroup = new HostgroupView("test");
assertEquals(expectedConfigWithConnectAndCdhAtLeast7214(), provider.getRoleConfigs(roleType, getTemplatePreparationObject(hostGroup)));
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class KafkaVolumeConfigProviderTest method getKafkaVolumeConfigWithDatalakeStackType.
@Test
void getKafkaVolumeConfigWithDatalakeStackType() {
HostgroupView hostgroupView = new HostgroupView("test", 3, InstanceGroupType.CORE, 2);
assertEquals(List.of(config("log.dirs", "/hadoopfs/fs1/kafka,/hadoopfs/fs2/kafka,/hadoopfs/fs3/kafka")), provider.getRoleConfigs(KAFKA_BROKER, hostgroupView, source(5, 2, StackType.DATALAKE)));
}
Aggregations