Search in sources :

Example 1 with WorkloadAnalyticsResponse

use of com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse in project cloudbreak by hortonworks.

the class TelemetryConverter method createWorkloadAnalyticsResponseFromSource.

private WorkloadAnalyticsResponse createWorkloadAnalyticsResponseFromSource(Telemetry telemetry) {
    WorkloadAnalyticsResponse waResponse = null;
    if (telemetry.getWorkloadAnalytics() != null) {
        LOGGER.debug("Setting workload analytics telemetry settings (response).");
        WorkloadAnalytics workloadAnalytics = telemetry.getWorkloadAnalytics();
        waResponse = new WorkloadAnalyticsResponse();
        waResponse.setAttributes(workloadAnalytics.getAttributes());
    }
    return waResponse;
}
Also used : WorkloadAnalyticsResponse(com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse) WorkloadAnalytics(com.sequenceiq.common.api.telemetry.model.WorkloadAnalytics)

Example 2 with WorkloadAnalyticsResponse

use of com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse in project cloudbreak by hortonworks.

the class TelemetryConverter method convert.

public TelemetryResponse convert(Telemetry telemetry) {
    TelemetryResponse response = null;
    if (telemetry != null) {
        LoggingResponse loggingResponse = createLoggingResponseFromSource(telemetry);
        MonitoringResponse monitoringResponse = createMonitoringResponseFromSource(telemetry);
        WorkloadAnalyticsResponse waResponse = createWorkloadAnalyticsResponseFromSource(telemetry);
        response = new TelemetryResponse();
        response.setLogging(loggingResponse);
        response.setMonitoring(monitoringResponse);
        response.setWorkloadAnalytics(waResponse);
        response.setFluentAttributes(telemetry.getFluentAttributes());
        response.setRules(telemetry.getRules());
        createFeaturesResponseFromSource(response, telemetry.getFeatures());
    }
    return response;
}
Also used : TelemetryResponse(com.sequenceiq.common.api.telemetry.response.TelemetryResponse) WorkloadAnalyticsResponse(com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse) LoggingResponse(com.sequenceiq.common.api.telemetry.response.LoggingResponse) MonitoringResponse(com.sequenceiq.common.api.telemetry.response.MonitoringResponse)

Example 3 with WorkloadAnalyticsResponse

use of com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse in project cloudbreak by hortonworks.

the class TelemetryApiConverter method createWorkloadAnalyticsResponseFromSource.

private WorkloadAnalyticsResponse createWorkloadAnalyticsResponseFromSource(EnvironmentWorkloadAnalytics workloadAnalytics) {
    WorkloadAnalyticsResponse waResponse = null;
    if (workloadAnalytics != null) {
        waResponse = new WorkloadAnalyticsResponse();
        waResponse.setAttributes(workloadAnalytics.getAttributes());
    }
    return waResponse;
}
Also used : WorkloadAnalyticsResponse(com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse)

Aggregations

WorkloadAnalyticsResponse (com.sequenceiq.common.api.telemetry.response.WorkloadAnalyticsResponse)3 WorkloadAnalytics (com.sequenceiq.common.api.telemetry.model.WorkloadAnalytics)1 LoggingResponse (com.sequenceiq.common.api.telemetry.response.LoggingResponse)1 MonitoringResponse (com.sequenceiq.common.api.telemetry.response.MonitoringResponse)1 TelemetryResponse (com.sequenceiq.common.api.telemetry.response.TelemetryResponse)1