use of com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class AzureCloudProvider method getFileSystemType.
@Override
public FileSystemType getFileSystemType() {
AdlsCloudStorageV1Parameters adlsCloudStorageV1Parameters = new AdlsCloudStorageV1Parameters();
AdlsGen2CloudStorageV1Parameters adlsGen2CloudStorageV1Parameters = new AdlsGen2CloudStorageV1Parameters();
WasbCloudStorageV1Parameters wasbCloudStorageV1Parameters = new WasbCloudStorageV1Parameters();
FileSystemType fileSystemType;
switch(azureProperties.getCloudStorage().getFileSystemType()) {
case "WASB_INTEGRATED":
case "WASB":
fileSystemType = wasbCloudStorageV1Parameters.getType();
break;
case "ADLS":
fileSystemType = adlsCloudStorageV1Parameters.getType();
break;
case "ADLS_GEN_2":
fileSystemType = adlsGen2CloudStorageV1Parameters.getType();
break;
default:
LOGGER.warn("The given {} File System Type is not in the list of Azure file system types. So we use the default one; {}", azureProperties.getCloudStorage().getFileSystemType(), "ADLS_GEN_2");
fileSystemType = adlsGen2CloudStorageV1Parameters.getType();
break;
}
return fileSystemType;
}
use of com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageValidationUtilTest method testIsCloudStorageConfiguredWhenAdlsNotNull.
@Test
public void testIsCloudStorageConfiguredWhenAdlsNotNull() {
CloudStorageRequest cloudStorageRequest = new CloudStorageRequest();
StorageIdentityBase storageIdentityBase = new StorageIdentityBase();
storageIdentityBase.setAdls(new AdlsCloudStorageV1Parameters());
cloudStorageRequest.setIdentities(List.of(storageIdentityBase));
cloudStorageRequest.setLocations(List.of(new StorageLocationBase()));
boolean actual = underTest.isCloudStorageConfigured(cloudStorageRequest);
Assert.assertTrue(actual);
}
use of com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageParametersConverter method adlsFileSystemToParameters.
public AdlsCloudStorageV1Parameters adlsFileSystemToParameters(AdlsFileSystem source) {
AdlsCloudStorageV1Parameters adlsCloudStorageV1Parameters = new AdlsCloudStorageV1Parameters();
adlsCloudStorageV1Parameters.setClientId(source.getClientId());
adlsCloudStorageV1Parameters.setAccountName(source.getAccountName());
adlsCloudStorageV1Parameters.setCredential(source.getCredential());
adlsCloudStorageV1Parameters.setTenantId(source.getTenantId());
return adlsCloudStorageV1Parameters;
}
Aggregations