use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class SchemaRegistryServiceConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(CmTemplateProcessor cmTemplateProcessor) {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 3);
BlueprintView blueprintView = new BlueprintView(null, null, null, cmTemplateProcessor);
RDSConfig rdsConfig = new RDSConfig();
rdsConfig.setType(DatabaseType.REGISTRY.toString());
rdsConfig.setDatabaseEngine(DatabaseVendor.POSTGRES);
rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/schema_registry");
rdsConfig.setConnectionUserName("schema_registry_server");
rdsConfig.setConnectionPassword("schema_registry_server_password");
return TemplatePreparationObject.Builder.builder().withBlueprintView(blueprintView).withHostgroupViews(Set.of(master, worker)).withRdsConfigs(Set.of(rdsConfig)).build();
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class StreamsMessagingManagerServiceConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(String internalFqdn, boolean ssl, CmTemplateProcessor cmTemplateProcessor) {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 3);
BlueprintView blueprintView = new BlueprintView(null, null, null, cmTemplateProcessor);
RDSConfig rdsConfig = new RDSConfig();
rdsConfig.setType(DatabaseType.STREAMS_MESSAGING_MANAGER.toString());
rdsConfig.setDatabaseEngine(DatabaseVendor.POSTGRES);
rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/smm");
rdsConfig.setConnectionUserName("smm_server");
rdsConfig.setConnectionPassword("smm_server_db_password");
return TemplatePreparationObject.Builder.builder().withBlueprintView(blueprintView).withHostgroupViews(Set.of(master, worker)).withRdsConfigs(Set.of(rdsConfig)).build();
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class Spark3OnYarnRoleConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(String... locations) {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2);
List<StorageLocationView> storageLocations = new ArrayList<>();
if (locations.length >= 1) {
StorageLocation hmsExternalWarehouseDir = new StorageLocation();
hmsExternalWarehouseDir.setProperty("hive.metastore.warehouse.external.dir");
hmsExternalWarehouseDir.setValue(locations[0]);
storageLocations.add(new StorageLocationView(hmsExternalWarehouseDir));
}
S3FileSystemConfigurationsView fileSystemConfigurationsView = new S3FileSystemConfigurationsView(new S3FileSystem(), storageLocations, false);
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 SqlStreamBuilderSnapperDatabaseConfigProviderTest method initTemplatePreparationObject.
private TemplatePreparationObject initTemplatePreparationObject(CmTemplateProcessor cmTemplateProcessor) {
HostgroupView manager = new HostgroupView("manager", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.CORE, 2);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 3);
BlueprintView blueprintView = new BlueprintView(null, null, null, cmTemplateProcessor);
RDSConfig rdsConfig = new RDSConfig();
rdsConfig.setType(DatabaseType.SQL_STREAM_BUILDER_SNAPPER.toString());
rdsConfig.setDatabaseEngine(DatabaseVendor.POSTGRES);
rdsConfig.setConnectionDriver(DatabaseVendor.POSTGRES.connectionDriver());
rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/eventador_snapper");
rdsConfig.setConnectionUserName("ssb_test_user");
rdsConfig.setConnectionPassword("ssb_test_pw");
return TemplatePreparationObject.Builder.builder().withBlueprintView(blueprintView).withHostgroupViews(Set.of(manager, master, worker)).withRdsConfigs(Set.of(rdsConfig)).build();
}
use of com.sequenceiq.cloudbreak.template.views.HostgroupView in project cloudbreak by hortonworks.
the class TezRoleConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject(String... locations) {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2);
List<StorageLocationView> storageLocations = new ArrayList<>();
if (locations.length >= 1) {
StorageLocation hmsExternalWarehouseDir = new StorageLocation();
hmsExternalWarehouseDir.setProperty("hive.metastore.warehouse.external.dir");
hmsExternalWarehouseDir.setValue(locations[0]);
storageLocations.add(new StorageLocationView(hmsExternalWarehouseDir));
}
S3FileSystemConfigurationsView fileSystemConfigurationsView = new S3FileSystemConfigurationsView(new S3FileSystem(), storageLocations, false);
return Builder.builder().withFileSystemConfigurationView(fileSystemConfigurationsView).withHostgroupViews(Set.of(master, worker)).build();
}
Aggregations