use of com.sequenceiq.cloudbreak.template.filesystem.gcs.GcsFileSystemConfigurationsView 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());
}
Aggregations