Search in sources :

Example 6 with WorkloadAnalyticsRequest

use of com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest in project cloudbreak by hortonworks.

the class TelemetryConverter method fillWARequestFromEnvironmentResponse.

private WorkloadAnalyticsRequest fillWARequestFromEnvironmentResponse(TelemetryResponse response, SdxClusterResponse sdxClusterResponse, Map<String, Object> waDefaultAttributes) {
    WorkloadAnalyticsRequest workloadAnalyticsRequest = null;
    if (response != null && response.getFeatures() != null && response.getFeatures().getWorkloadAnalytics() != null) {
        if (response.getFeatures().getWorkloadAnalytics().isEnabled()) {
            LOGGER.debug("Workload analytics feature is enabled. Filling telemetry request with datalake details.");
            workloadAnalyticsRequest = new WorkloadAnalyticsRequest();
            workloadAnalyticsRequest.setAttributes(enrichWithSdxData(waDefaultAttributes, sdxClusterResponse));
        } else {
            LOGGER.debug("Workload analytics feature is disabled.");
        }
    } else {
        if (telemetryPublisherDefaultValue) {
            LOGGER.debug("Filling workload analytics request (default).");
            workloadAnalyticsRequest = new WorkloadAnalyticsRequest();
            workloadAnalyticsRequest.setAttributes(enrichWithSdxData(waDefaultAttributes, sdxClusterResponse));
        } else {
            LOGGER.debug("Workload analytics feature is disabled (default value is false).");
        }
    }
    return workloadAnalyticsRequest;
}
Also used : WorkloadAnalyticsRequest(com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest)

Example 7 with WorkloadAnalyticsRequest

use of com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest in project cloudbreak by hortonworks.

the class TelemetryConverter method convertToRequest.

public TelemetryRequest convertToRequest(Telemetry telemetry) {
    TelemetryRequest telemetryRequest = new TelemetryRequest();
    if (telemetry != null) {
        LoggingRequest loggingRequest = createLoggingRequestFromSource(telemetry);
        MonitoringRequest monitoringRequest = createMonitoringRequestFromSource(telemetry);
        WorkloadAnalyticsRequest waRequest = createWorkloadAnalyticsRequestFromSource(telemetry);
        FeaturesRequest featuresRequest = createFeaturesRequestFromSource(telemetry);
        telemetryRequest.setWorkloadAnalytics(waRequest);
        telemetryRequest.setLogging(loggingRequest);
        telemetryRequest.setMonitoring(monitoringRequest);
        telemetryRequest.setFluentAttributes(telemetry.getFluentAttributes());
        telemetryRequest.setFeatures(featuresRequest);
    }
    return telemetryRequest;
}
Also used : TelemetryRequest(com.sequenceiq.common.api.telemetry.request.TelemetryRequest) WorkloadAnalyticsRequest(com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest) LoggingRequest(com.sequenceiq.common.api.telemetry.request.LoggingRequest) MonitoringRequest(com.sequenceiq.common.api.telemetry.request.MonitoringRequest) FeaturesRequest(com.sequenceiq.common.api.telemetry.request.FeaturesRequest)

Example 8 with WorkloadAnalyticsRequest

use of com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest in project cloudbreak by hortonworks.

the class StackToCreateFreeIpaRequestConverter method getWorkloadAnalyticsRequest.

private WorkloadAnalyticsRequest getWorkloadAnalyticsRequest(WorkloadAnalytics workloadAnalytics) {
    WorkloadAnalyticsRequest request = null;
    if (workloadAnalytics != null) {
        request = new WorkloadAnalyticsRequest();
        request.setAttributes(workloadAnalytics.getAttributes());
    }
    LOGGER.debug("Created workload analytics request {} from workload analytics {}", request, workloadAnalytics);
    return request;
}
Also used : WorkloadAnalyticsRequest(com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest)

Aggregations

WorkloadAnalyticsRequest (com.sequenceiq.common.api.telemetry.request.WorkloadAnalyticsRequest)8 FeaturesRequest (com.sequenceiq.common.api.telemetry.request.FeaturesRequest)3 LoggingRequest (com.sequenceiq.common.api.telemetry.request.LoggingRequest)3 TelemetryRequest (com.sequenceiq.common.api.telemetry.request.TelemetryRequest)3 S3CloudStorageV1Parameters (com.sequenceiq.common.api.cloudstorage.old.S3CloudStorageV1Parameters)2 WorkloadAnalytics (com.sequenceiq.common.api.telemetry.model.WorkloadAnalytics)2 Features (com.sequenceiq.common.api.telemetry.model.Features)1 Telemetry (com.sequenceiq.common.api.telemetry.model.Telemetry)1 MonitoringRequest (com.sequenceiq.common.api.telemetry.request.MonitoringRequest)1 EnvironmentFeatures (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentFeatures)1 EnvironmentTelemetry (com.sequenceiq.environment.environment.dto.telemetry.EnvironmentTelemetry)1 Test (org.junit.Test)1 Test (org.junit.jupiter.api.Test)1