use of com.sequenceiq.common.api.filesystem.WasbFileSystem in project cloudbreak by hortonworks.
the class CloudStorageParametersConverter method wasbToFileSystem.
public WasbFileSystem wasbToFileSystem(WasbCloudStorageV1Parameters source) {
WasbFileSystem wasbFileSystem = new WasbFileSystem();
wasbFileSystem.setSecure(source.isSecure());
wasbFileSystem.setAccountName(source.getAccountName());
wasbFileSystem.setAccountKey(source.getAccountKey());
return wasbFileSystem;
}
use of com.sequenceiq.common.api.filesystem.WasbFileSystem in project cloudbreak by hortonworks.
the class WasbFileSystemToWasbCloudStorageParametersConverterTest method createWasbFileSystem.
private WasbFileSystem createWasbFileSystem() {
WasbFileSystem wasb = new WasbFileSystem();
wasb.setAccountKey(TEST_ACCOUNT_KEY);
wasb.setAccountName(TEST_ACCOUNT_NAME);
return wasb;
}
use of com.sequenceiq.common.api.filesystem.WasbFileSystem in project cloudbreak by hortonworks.
the class FileSystemConverter method legacyConvertFromConfiguration.
private List<CloudFileSystemView> legacyConvertFromConfiguration(FileSystem source) {
try {
CloudFileSystemView fileSystemView;
if (source.getType().isAdls()) {
AdlsFileSystem adlsFileSystem = source.getConfigurations().get(AdlsFileSystem.class);
fileSystemView = convertAdlsLegacy(adlsFileSystem);
} else if (source.getType().isGcs()) {
GcsFileSystem gcsFileSystem = source.getConfigurations().get(GcsFileSystem.class);
fileSystemView = convertGcsLegacy(gcsFileSystem);
} else if (source.getType().isS3()) {
S3FileSystem s3FileSystem = source.getConfigurations().get(S3FileSystem.class);
fileSystemView = convertS3Legacy(s3FileSystem);
} else if (source.getType().isEfs()) {
EfsFileSystem efsFileSystem = source.getConfigurations().get(EfsFileSystem.class);
fileSystemView = convertEfsLegacy(efsFileSystem);
} else if (source.getType().isWasb()) {
WasbFileSystem wasbFileSystem = source.getConfigurations().get(WasbFileSystem.class);
fileSystemView = convertWasbLegacy(wasbFileSystem);
} else if (source.getType().isAdlsGen2()) {
AdlsGen2FileSystem adlsGen2FileSystem = source.getConfigurations().get(AdlsGen2FileSystem.class);
fileSystemView = convertAdlsGen2Legacy(adlsGen2FileSystem);
} else if (source.getType().isGcs()) {
GcsFileSystem gcsFileSystem = source.getConfigurations().get(GcsFileSystem.class);
fileSystemView = convertGcsLegacy(gcsFileSystem);
} else {
return Collections.emptyList();
}
return List.of(fileSystemView);
} catch (IOException e) {
LOGGER.warn("Error occurred when tried to convert filesystem object: {}", e.getMessage());
}
return Collections.emptyList();
}
use of com.sequenceiq.common.api.filesystem.WasbFileSystem in project cloudbreak by hortonworks.
the class TemplateCoreTestUtil method wasbFileSystem.
public static WasbFileSystem wasbFileSystem(boolean secure) {
WasbFileSystem wasbFileSystem = new WasbFileSystem();
wasbFileSystem.setAccountKey("accountkey");
wasbFileSystem.setAccountName("accountname");
wasbFileSystem.setSecure(secure);
return wasbFileSystem;
}
Aggregations