use of com.sequenceiq.common.model.FileSystemType in project cloudbreak by hortonworks.
the class CloudStorageManifester method addIdBrokerIdentity.
private void addIdBrokerIdentity(SdxCloudStorageRequest cloudStorage, CloudStorageRequest cloudStorageRequest) {
StorageIdentityBase idBroker = new StorageIdentityBase();
idBroker.setType(CloudIdentityType.ID_BROKER);
FileSystemType fileSystemType = cloudStorage.getFileSystemType();
if (isFileSystemConfigured(fileSystemType)) {
if (fileSystemType.isS3()) {
idBroker.setS3(cloudStorage.getS3());
} else if (fileSystemType.isWasb()) {
idBroker.setWasb(cloudStorage.getWasb());
} else if (fileSystemType.isAdlsGen2()) {
idBroker.setAdlsGen2(cloudStorage.getAdlsGen2());
} else if (fileSystemType.isGcs()) {
idBroker.setGcs(cloudStorage.getGcs());
}
cloudStorageRequest.getIdentities().add(idBroker);
}
}
use of com.sequenceiq.common.model.FileSystemType in project cloudbreak by hortonworks.
the class CloudStorageConfigDetails method calculateStorageName.
private String calculateStorageName(String storageName, String fileSystemTypeName) {
FileSystemType fileSystemType = FileSystemType.valueOf(fileSystemTypeName);
String postfix = fileSystemType.getPostFix();
if (StringUtils.isEmpty(postfix)) {
return storageName;
} else {
return StringUtils.substringBefore(storageName, postfix);
}
}
use of com.sequenceiq.common.model.FileSystemType in project cloudbreak by hortonworks.
the class CloudStorageConfigDetails method calculateSubFolder.
private String calculateSubFolder(String storageName, String fileSystemTypeName) {
FileSystemType fileSystemType = FileSystemType.valueOf(fileSystemTypeName);
String postfix = fileSystemType.getPostFix();
if (StringUtils.isEmpty(postfix)) {
return "";
} else {
return StringUtils.substringAfter(storageName, postfix);
}
}
Aggregations