use of com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class AdlsGen2FileSystemToAdlsGen2CloudStorageParametersConverter method convert.
public AdlsGen2CloudStorageV1Parameters convert(AdlsGen2FileSystem source) {
AdlsGen2CloudStorageV1Parameters adlsGen2CloudStorageParameters = new AdlsGen2CloudStorageV1Parameters();
adlsGen2CloudStorageParameters.setAccountName(source.getAccountName());
adlsGen2CloudStorageParameters.setAccountKey(source.getAccountKey());
adlsGen2CloudStorageParameters.setSecure(source.isSecure());
adlsGen2CloudStorageParameters.setManagedIdentity(source.getManagedIdentity());
return adlsGen2CloudStorageParameters;
}
use of com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class FluentConfigServiceTest method testCreateFluentConfigWithFullAdlsGen2Path.
@Test
public void testCreateFluentConfigWithFullAdlsGen2Path() {
// GIVEN
Logging logging = new Logging();
logging.setStorageLocation("abfs://mycontainer@myaccount.dfs.core.windows.net/my/custom/path");
AdlsGen2CloudStorageV1Parameters parameters = new AdlsGen2CloudStorageV1Parameters();
parameters.setAccountKey("myAccountKey");
parameters.setAccountName("myAccount");
logging.setAdlsGen2(parameters);
Telemetry telemetry = new Telemetry();
telemetry.setLogging(logging);
// WHEN
FluentConfigView result = underTest.createFluentConfigs(DEFAULT_FLUENT_CLUSTER_DETAILS, false, false, REGION_SAMPLE, telemetry);
// THEN
assertTrue(result.isEnabled());
assertEquals("myAccountKey", result.getAzureStorageAccessKey());
assertEquals("myaccount", result.getAzureStorageAccount());
assertEquals("/my/custom/path", result.getLogFolderName());
assertEquals("mycontainer", result.getAzureContainer());
}
use of com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class FluentConfigServiceTest method testCreateFluentConfigWithDoublePath.
@Test(expected = CloudbreakServiceException.class)
public void testCreateFluentConfigWithDoublePath() {
// GIVEN
Logging logging = new Logging();
logging.setStorageLocation("abfs://mycontainer/my/custom/path@myaccount.dfs.core.windows.net/my/custom/path");
AdlsGen2CloudStorageV1Parameters parameters = new AdlsGen2CloudStorageV1Parameters();
parameters.setAccountKey("myAccountKey");
logging.setAdlsGen2(parameters);
Telemetry telemetry = new Telemetry();
telemetry.setLogging(logging);
// WHEN
underTest.createFluentConfigs(DEFAULT_FLUENT_CLUSTER_DETAILS, false, false, REGION_SAMPLE, telemetry);
}
use of com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageFolderResolverServiceTest method testUpdateStorageLocationAdlsGen2WithPrefix.
@Test
public void testUpdateStorageLocationAdlsGen2WithPrefix() {
// GIVEN
Telemetry telemetry = createTelemetry();
telemetry.getLogging().setS3(null);
telemetry.getLogging().setAdlsGen2(new AdlsGen2CloudStorageV1Parameters());
telemetry.getLogging().setStorageLocation("abfs://mycontainer/prefix");
// WHEN
underTest.updateStorageLocation(telemetry, FluentClusterType.DATAHUB.value(), "mycluster", "crn:cdp:cloudbreak:us-west-1:someone:stack:12345");
// THEN
assertEquals("abfs://mycontainer@null.dfs.core.windows.net/prefix/cluster-logs/datahub/mycluster_12345", telemetry.getLogging().getStorageLocation());
}
use of com.sequenceiq.common.api.cloudstorage.old.AdlsGen2CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageFolderResolverServiceTest method testUpdateStorageLocationAdlsGen2WithoutScheme.
@Test
public void testUpdateStorageLocationAdlsGen2WithoutScheme() {
// GIVEN
Telemetry telemetry = createTelemetry();
telemetry.getLogging().setS3(null);
telemetry.getLogging().setAdlsGen2(new AdlsGen2CloudStorageV1Parameters());
telemetry.getLogging().setStorageLocation("abfs://mycontainer");
// WHEN
underTest.updateStorageLocation(telemetry, FluentClusterType.DATAHUB.value(), "mycluster", "crn:cdp:cloudbreak:us-west-1:someone:stack:12345");
// THEN
assertEquals("abfs://mycontainer@null.dfs.core.windows.net/cluster-logs/datahub/mycluster_12345", telemetry.getLogging().getStorageLocation());
}
Aggregations