use of com.sequenceiq.common.api.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class FluentConfigServiceTest method testCreateFluentConfigClusterLogsCollectionWithoutDatabus.
@Test
public void testCreateFluentConfigClusterLogsCollectionWithoutDatabus() {
// GIVEN
Telemetry telemetry = new Telemetry();
setClusterLogsCollection(telemetry);
// WHEN
FluentConfigView result = underTest.createFluentConfigs(DEFAULT_FLUENT_CLUSTER_DETAILS, false, true, REGION_SAMPLE, telemetry);
// THEN
assertFalse(result.isEnabled());
assertFalse(result.isClusterLogsCollection());
}
use of com.sequenceiq.common.api.telemetry.model.Telemetry 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.telemetry.model.Telemetry in project cloudbreak by hortonworks.
the class CloudStorageFolderResolverServiceTest method testUpdateStorageLocationS3.
@Test
public void testUpdateStorageLocationS3() {
// GIVEN
Telemetry telemetry = createTelemetry();
// WHEN
underTest.updateStorageLocation(telemetry, FluentClusterType.DATAHUB.value(), "mycluster", "crn:cdp:cloudbreak:us-west-1:someone:stack:12345");
// THEN
assertEquals("s3://mybucket/cluster-logs/datahub/mycluster_12345", telemetry.getLogging().getStorageLocation());
}
use of com.sequenceiq.common.api.telemetry.model.Telemetry 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.telemetry.model.Telemetry 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());
}
Aggregations