use of com.sequenceiq.common.api.filesystem.EfsFileSystem 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();
}
Aggregations