use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class YarnVolumeConfigProviderTest method getRoleConfigsWithMultipleVolumes.
@Test
void getRoleConfigsWithMultipleVolumes() {
HostgroupView worker = hostGroupWithVolumeCount(2);
List<ApiClusterTemplateConfig> roleConfigs = subject.getRoleConfigs(YarnRoles.NODEMANAGER, worker, preparatorWithHostGroups(worker));
assertEquals(List.of(config("yarn_nodemanager_local_dirs", "/hadoopfs/fs1/nodemanager,/hadoopfs/fs2/nodemanager"), config("yarn_nodemanager_log_dirs", "/hadoopfs/fs1/nodemanager/log,/hadoopfs/fs2/nodemanager/log")), roleConfigs);
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class ZeppelinCloudStorageRoleConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(BaseFileSystemConfigurationsView fileSystemConfigurationsView) {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2);
return Builder.builder().withFileSystemConfigurationView(fileSystemConfigurationsView).withHostgroupViews(Set.of(master, worker)).build();
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class NifiVolumeConfigProviderTest method testRoleConfigsWithThreeVolumesAndStackVersion7211.
@Test
void testRoleConfigsWithThreeVolumesAndStackVersion7211() {
when(cmTemplateProcessorMock.getStackVersion()).thenReturn("7.2.11");
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 testRoleConfigsWithTwoVolumesAndStackVersion7211.
@Test
void testRoleConfigsWithTwoVolumesAndStackVersion7211() {
when(cmTemplateProcessorMock.getStackVersion()).thenReturn("7.2.11");
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 testRoleConfigsWithTwoVolumes.
@Test
void testRoleConfigsWithTwoVolumes() {
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")), subject.getRoleConfigs(NifiRoles.NIFI_NODE, hostGroup, getTemplatePreparationObject(hostGroup)));
}
Aggregations