use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class TestUtil method storageLocation.
public static StorageLocation storageLocation(String configFile, int i) {
StorageLocation storageLocation = new StorageLocation();
storageLocation.setValue("random.value." + i);
storageLocation.setProperty("random.property." + i);
storageLocation.setConfigFile(configFile);
return storageLocation;
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class StorageLocationV4RequestToStorageLocationConverter method convert.
public StorageLocation convert(StorageLocationV4Request source) {
StorageLocation storageLocation = new StorageLocation();
storageLocation.setConfigFile(source.getPropertyFile());
storageLocation.setProperty(source.getPropertyName());
storageLocation.setValue(source.getValue());
return storageLocation;
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class S3ConfigProviderTest method getStorageLocation.
protected StorageLocation getStorageLocation(String property, String value) {
StorageLocation hmsWarehouseDir = new StorageLocation();
hmsWarehouseDir.setProperty(property);
hmsWarehouseDir.setValue(value);
return hmsWarehouseDir;
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation 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.domain.StorageLocation 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