use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class ZeppelinCloudStorageRoleConfigProviderTest method assertZeppelinStorageValues.
protected void assertZeppelinStorageValues(String storagePath) {
List<StorageLocationView> locations = new ArrayList<>();
StorageLocation zeppelinNotebookDir = new StorageLocation();
zeppelinNotebookDir.setProperty("zeppelin.notebook.dir");
zeppelinNotebookDir.setValue(storagePath);
locations.add(new StorageLocationView(zeppelinNotebookDir));
BaseFileSystemConfigurationsView fileSystemConfigurationsView;
if (storagePath.startsWith("s3a")) {
fileSystemConfigurationsView = new S3FileSystemConfigurationsView(new S3FileSystem(), locations, false);
} else if (storagePath.startsWith("gcs")) {
fileSystemConfigurationsView = new GcsFileSystemConfigurationsView(new GcsFileSystem(), locations, false);
} else {
fileSystemConfigurationsView = new AdlsGen2FileSystemConfigurationsView(new AdlsGen2FileSystem(), locations, false);
}
TemplatePreparationObject preparationObject = getTemplatePreparationObject(fileSystemConfigurationsView);
String inputJson = getBlueprintText("input/clouderamanager-ds.bp");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject);
List<ApiClusterTemplateConfig> zeppelinStorageConfigs = roleConfigs.get("zeppelin-ZEPPELIN_SERVER-BASE");
assertEquals(1, zeppelinStorageConfigs.size());
assertEquals("zeppelin.notebook.dir", zeppelinStorageConfigs.get(0).getName());
assertEquals(storagePath, zeppelinStorageConfigs.get(0).getValue());
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class TemplateCoreTestUtil method storageLocationViewsWithDuplicatedKey.
public static List<StorageLocationView> storageLocationViewsWithDuplicatedKey() {
List<StorageLocationView> storageLocations = new ArrayList<>();
storageLocations.add(storageLocationView(storageLocation(0)));
StorageLocation storageLocation = storageLocation(1);
storageLocation.setConfigFile("0_file");
storageLocations.add(storageLocationView(storageLocation));
return storageLocations;
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class TemplateCoreTestUtil method storageLocation.
public static StorageLocation storageLocation(int i) {
StorageLocation storageLocation = new StorageLocation();
storageLocation.setValue(i + "_test/test/end");
storageLocation.setProperty(i + "_property");
storageLocation.setConfigFile(i + "_file");
return storageLocation;
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class HiveMetastoreCloudStorageServiceConfigProviderTest method getHiveWarehouseStorageLocation.
protected StorageLocation getHiveWarehouseStorageLocation() {
StorageLocation hmsWarehouseDir = new StorageLocation();
hmsWarehouseDir.setProperty("hive.metastore.warehouse.dir");
hmsWarehouseDir.setValue("s3a://bucket/hive/warehouse");
return hmsWarehouseDir;
}
use of com.sequenceiq.cloudbreak.domain.StorageLocation in project cloudbreak by hortonworks.
the class HiveMetastoreCloudStorageServiceConfigProviderTest method getHiveWarehouseExternalStorageLocation.
protected StorageLocation getHiveWarehouseExternalStorageLocation() {
StorageLocation hmsExternalWarehouseDir = new StorageLocation();
hmsExternalWarehouseDir.setProperty("hive.metastore.warehouse.external.dir");
hmsExternalWarehouseDir.setValue("s3a://bucket/hive/warehouse/external");
return hmsExternalWarehouseDir;
}
Aggregations