use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class KuduVolumeConfigProviderTest method testRoleConfigsWithSingleVolume.
@Test
void testRoleConfigsWithSingleVolume() {
HostgroupView hostGroup = hostGroupWithVolumeCount(1);
assertEquals(List.of(config("fs_wal_dir", "/hadoopfs/fs1/kudu/master"), config("fs_data_dirs", "/hadoopfs/fs1/kudu/master")), subject.getRoleConfigs(KuduRoles.KUDU_MASTER, hostGroup, getTemplatePreparationObject(hostGroup)));
assertEquals(List.of(config("fs_wal_dir", "/hadoopfs/fs1/kudu/tserver"), config("fs_data_dirs", "/hadoopfs/fs1/kudu/tserver")), subject.getRoleConfigs(KuduRoles.KUDU_TSERVER, hostGroup, getTemplatePreparationObject(hostGroup)));
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class NifiRegistryVolumeConfigProviderTest method testRoleConfigsWithOneVolumeAndStackVersion7211.
@Test
void testRoleConfigsWithOneVolumeAndStackVersion7211() {
when(cmTemplateProcessorMock.getStackVersion()).thenReturn("7.2.11");
HostgroupView hostGroup = hostGroupWithVolumeCount(1);
assertEquals(List.of(config("log_dir", "/hadoopfs/fs1/nifi-registry-log"), config("nifi.registry.working.directory", "/hadoopfs/fs1/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 NifiRegistryVolumeConfigProviderTest method testRoleConfigsWithOneVolume.
@Test
void testRoleConfigsWithOneVolume() {
HostgroupView hostGroup = hostGroupWithVolumeCount(1);
assertEquals(List.of(config("log_dir", "/hadoopfs/fs1/nifi-registry-log")), subject.getRoleConfigs(NifiRoles.NIFI_NODE, hostGroup, getTemplatePreparationObject(hostGroup)));
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class OozieRoleConfigProviderTest method getTemplatePreparationObject.
static TemplatePreparationObject getTemplatePreparationObject(String inputJson, CmTemplateProcessor cmTemplateProcessor, int numMasters) {
List<String> hosts = new ArrayList<>();
for (int i = 0; i < numMasters; i++) {
hosts.add("master" + i + ".blah.timbuk2.dev.cldr.");
}
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, hosts);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2);
RDSConfig rdsConfig = new RDSConfig();
rdsConfig.setType(DatabaseType.OOZIE.toString());
rdsConfig.setConnectionPassword("testpassword");
rdsConfig.setConnectionUserName("testuser");
rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/ooziedb");
return Builder.builder().withHostgroupViews(Set.of(master, worker)).withRdsConfigs(Set.of(rdsConfig)).withBlueprintView(new BlueprintView(inputJson, "CDP", "1.0", cmTemplateProcessor)).withCloudPlatform(CloudPlatform.GCP).build();
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class DataDiscoveryServiceCloudStorageRoleConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(boolean includeLocations) {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2);
List<StorageLocationView> locations = new ArrayList<>();
if (includeLocations) {
locations.add(new StorageLocationView(getDataDiscoveryServiceFileSystemUri()));
}
S3FileSystemConfigurationsView fileSystemConfigurationsView = new S3FileSystemConfigurationsView(new S3FileSystem(), locations, false);
return Builder.builder().withFileSystemConfigurationView(fileSystemConfigurationsView).withHostgroupViews(Set.of(master, worker)).build();
}
Aggregations