Search in sources :

Example 1 with AdlsCloudStorageV1Parameters

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;
}
Also used : AdlsGen2CloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters) WasbCloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters) AdlsCloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters) FileSystemType(com.sequenceiq.common.model.FileSystemType)

Example 2 with AdlsCloudStorageV1Parameters

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);
}
Also used : CloudStorageRequest(com.sequenceiq.common.api.cloudstorage.CloudStorageRequest) AdlsCloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters) StorageIdentityBase(com.sequenceiq.common.api.cloudstorage.StorageIdentityBase) StorageLocationBase(com.sequenceiq.common.api.cloudstorage.StorageLocationBase) Test(org.junit.Test)

Example 3 with AdlsCloudStorageV1Parameters

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;
}
Also used : AdlsCloudStorageV1Parameters(com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters)

Aggregations

AdlsCloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.AdlsCloudStorageV1Parameters)3 CloudStorageRequest (com.sequenceiq.common.api.cloudstorage.CloudStorageRequest)1 StorageIdentityBase (com.sequenceiq.common.api.cloudstorage.StorageIdentityBase)1 StorageLocationBase (com.sequenceiq.common.api.cloudstorage.StorageLocationBase)1 AdlsGen2CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters)1 WasbCloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.WasbCloudStorageV1Parameters)1 FileSystemType (com.sequenceiq.common.model.FileSystemType)1 Test (org.junit.Test)1