use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class YarnVolumeConfigProviderTest method getRoleConfigsWithMultipleEphemeralVolumes.
@Test
void getRoleConfigsWithMultipleEphemeralVolumes() {
HostgroupView worker = hostGroupWithVolumeTemplatesAndTemporaryStorage(2, Sets.newHashSet(new VolumeTemplate()), TemporaryStorage.EPHEMERAL_VOLUMES, 3);
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(YarnRoles.NODEMANAGER, worker, preparatorWithHostGroups(worker));
assertEquals(List.of(config("yarn_nodemanager_local_dirs", "/hadoopfs/ephfs1/nodemanager,/hadoopfs/ephfs2/nodemanager,/hadoopfs/ephfs3/nodemanager"), config("yarn_nodemanager_log_dirs", "/hadoopfs/ephfs1/nodemanager/log,/hadoopfs/ephfs2/nodemanager/log," + "/hadoopfs/ephfs3/nodemanager/log")), roleConfigs);
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class NifiVolumeConfigProviderTest method testRoleConfigsWithThreeVolumesAndStackVersion7210.
@Test
void testRoleConfigsWithThreeVolumesAndStackVersion7210() {
when(cmTemplateProcessorMock.getStackVersion()).thenReturn("7.2.10");
HostgroupView hostGroup = hostGroupWithVolumeCount(3);
assertEquals(List.of(config("nifi.flowfile.repository.directory", "/hadoopfs/fs1/flowfile-repo"), config("nifi.content.repository.directory.default", "/hadoopfs/fs3/content-repo"), config("nifi.provenance.repository.directory.default", "/hadoopfs/fs2/provenance-repo"), config("log_dir", "/hadoopfs/fs3/nifi-log"), config("nifi.database.directory", "/hadoopfs/fs1/database-dir"), config("nifi.working.directory", "/hadoopfs/fs3/working-dir")), subject.getRoleConfigs(NifiRoles.NIFI_NODE, hostGroup, getTemplatePreparationObject(hostGroup)));
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class NifiVolumeConfigProviderTest method testRoleConfigsWithTwoVolumesAndStackVersion7210.
@Test
void testRoleConfigsWithTwoVolumesAndStackVersion7210() {
when(cmTemplateProcessorMock.getStackVersion()).thenReturn("7.2.10");
HostgroupView hostGroup = hostGroupWithVolumeCount(2);
assertEquals(List.of(config("nifi.flowfile.repository.directory", "/hadoopfs/fs1/flowfile-repo"), config("nifi.content.repository.directory.default", "/hadoopfs/fs2/content-repo"), config("nifi.provenance.repository.directory.default", "/hadoopfs/fs1/provenance-repo"), config("log_dir", "/hadoopfs/fs2/nifi-log"), config("nifi.database.directory", "/hadoopfs/fs1/database-dir"), config("nifi.working.directory", "/hadoopfs/fs2/working-dir")), subject.getRoleConfigs(NifiRoles.NIFI_NODE, hostGroup, getTemplatePreparationObject(hostGroup)));
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class NifiVolumeConfigProviderTest method testRoleConfigsWithThreeVolumes.
@Test
void testRoleConfigsWithThreeVolumes() {
HostgroupView hostGroup = hostGroupWithVolumeCount(3);
assertEquals(List.of(config("nifi.flowfile.repository.directory", "/hadoopfs/fs1/flowfile-repo"), config("nifi.content.repository.directory.default", "/hadoopfs/fs3/content-repo"), config("nifi.provenance.repository.directory.default", "/hadoopfs/fs2/provenance-repo"), config("log_dir", "/hadoopfs/fs3/nifi-log"), config("nifi.database.directory", "/hadoopfs/fs1/database-dir")), subject.getRoleConfigs(NifiRoles.NIFI_NODE, hostGroup, getTemplatePreparationObject(hostGroup)));
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class NifiVolumeConfigProviderTest method testRoleConfigsWithFourVolumesAndStackVersion7210.
@Test
void testRoleConfigsWithFourVolumesAndStackVersion7210() {
when(cmTemplateProcessorMock.getStackVersion()).thenReturn("7.2.10");
HostgroupView hostGroup = hostGroupWithVolumeCount(4);
assertEquals(List.of(config("nifi.flowfile.repository.directory", "/hadoopfs/fs1/flowfile-repo"), config("nifi.content.repository.directory.default", "/hadoopfs/fs2/content-repo"), config("nifi.provenance.repository.directory.default", "/hadoopfs/fs3/provenance-repo"), config("log_dir", "/hadoopfs/fs4/nifi-log"), config("nifi.database.directory", "/hadoopfs/fs4/database-dir"), config("nifi.working.directory", "/hadoopfs/fs4/working-dir")), subject.getRoleConfigs(NifiRoles.NIFI_NODE, hostGroup, getTemplatePreparationObject(hostGroup)));
}
Aggregations