use of com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class S3FileSystemToConverterS3CloudStorageV4Parameters method convert.
public S3CloudStorageV1Parameters convert(S3FileSystem source) {
S3CloudStorageV1Parameters fileSystemConfigurations = new S3CloudStorageV1Parameters();
fileSystemConfigurations.setInstanceProfile(source.getInstanceProfile());
return fileSystemConfigurations;
}
use of com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class FluentConfigServiceTest method testCreateFluentConfig.
@Test
public void testCreateFluentConfig() {
// GIVEN
Logging logging = new Logging();
logging.setStorageLocation("mybucket/cluster-logs/datahub/cl1");
logging.setS3(new S3CloudStorageV1Parameters());
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());
assertTrue(result.isCloudStorageLoggingEnabled());
assertEquals("cluster-logs/datahub/cl1", result.getLogFolderName());
assertEquals("mybucket", result.getS3LogArchiveBucketName());
assertEquals(Crn.Region.EU_1.getName(), result.toMap().get("environmentRegion"));
}
use of com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageFolderResolverServiceTest method createTelemetry.
private Telemetry createTelemetry() {
Telemetry telemetry = new Telemetry();
Logging logging = new Logging();
logging.setStorageLocation("s3://mybucket");
logging.setS3(new S3CloudStorageV1Parameters());
telemetry.setLogging(logging);
return telemetry;
}
use of com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class CloudStorageManifester method addLogIdentity.
private void addLogIdentity(CloudStorageRequest cloudStorageRequest, DetailedEnvironmentResponse environment) {
if (containsIdentityType(CloudIdentityType.LOG, cloudStorageRequest)) {
LOGGER.debug("Cloud storage log identity already set. Skip fetching it from environment.");
} else {
StorageIdentityBase log = new StorageIdentityBase();
log.setType(CloudIdentityType.LOG);
LoggingResponse logging = environment.getTelemetry().getLogging();
if (logging.getS3() != null) {
log.setS3(logging.getS3());
} else if (logging.getAdlsGen2() != null) {
log.setAdlsGen2(logging.getAdlsGen2());
} else if (logging.getGcs() != null) {
log.setGcs(logging.getGcs());
} else if (logging.getCloudwatch() != null) {
LOGGER.debug("Cloudwatch will act as s3 storage identity!");
S3CloudStorageV1Parameters s3CloudwatchParams = new S3CloudStorageV1Parameters();
s3CloudwatchParams.setInstanceProfile(logging.getCloudwatch().getInstanceProfile());
log.setS3(s3CloudwatchParams);
}
cloudStorageRequest.getIdentities().add(log);
}
}
use of com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters in project cloudbreak by hortonworks.
the class TelemetryApiConverter method convertS3.
private S3CloudStorageV1Parameters convertS3(S3CloudStorageParameters s3) {
S3CloudStorageV1Parameters s3CloudStorageV1Parameters = null;
if (s3 != null) {
s3CloudStorageV1Parameters = new S3CloudStorageV1Parameters();
s3CloudStorageV1Parameters.setInstanceProfile(s3.getInstanceProfile());
return s3CloudStorageV1Parameters;
}
return s3CloudStorageV1Parameters;
}
Aggregations