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;
}
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;
}
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;
}
Aggregations