Search in sources :

Example 1 with StatusDetails

use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails in project cloudbreak by hortonworks.

the class NetworkCheckerConclusionStepTest method createNetworkReportResponse.

private RPCResponse<NodeStatusReport> createNetworkReportResponse(NetworkDetails networkDetails) {
    StatusDetails statusDetails = StatusDetails.newBuilder().setHost("host1").build();
    NodeStatus nodeStatus = NodeStatus.newBuilder().setStatusDetails(statusDetails).setNetworkDetails(networkDetails).build();
    NodeStatusReport nodeStatusReport = NodeStatusReport.newBuilder().addNodes(nodeStatus).build();
    RPCResponse<NodeStatusReport> response = new RPCResponse<>();
    response.setResult(nodeStatusReport);
    return response;
}
Also used : StatusDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails) NodeStatusReport(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatusReport) RPCResponse(com.sequenceiq.cloudbreak.client.RPCResponse) NodeStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus)

Example 2 with StatusDetails

use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails in project cloudbreak by hortonworks.

the class NodeServicesCheckerConclusionStepTest method createNodeStatusResponse.

private RPCResponse<NodeStatusReport> createNodeStatusResponse(HealthStatus saltBootstrapServiceStatus) {
    StatusDetails statusDetails = StatusDetails.newBuilder().setHost("host1").build();
    ServiceStatus serviceStatus = ServiceStatus.newBuilder().setName("salt-bootstrap").setStatus(saltBootstrapServiceStatus).build();
    ServicesDetails servicesDetails = ServicesDetails.newBuilder().addInfraServices(serviceStatus).build();
    NodeStatus nodeStatus = NodeStatus.newBuilder().setStatusDetails(statusDetails).setServicesDetails(servicesDetails).build();
    NodeStatusReport nodeStatusReport = NodeStatusReport.newBuilder().addNodes(nodeStatus).build();
    RPCResponse<NodeStatusReport> response = new RPCResponse<>();
    response.setResult(nodeStatusReport);
    return response;
}
Also used : ServiceStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus) StatusDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails) NodeStatusReport(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatusReport) RPCResponse(com.sequenceiq.cloudbreak.client.RPCResponse) NodeStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus) ServicesDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServicesDetails)

Example 3 with StatusDetails

use of com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails in project cloudbreak by hortonworks.

the class SaltCheckerConclusionStepTest method createSaltPingResponse.

private RPCResponse<SaltHealthReport> createSaltPingResponse(HealthStatus masterServiceStatus, HealthStatus minionHealthStatus) {
    StatusDetails pingResponses = StatusDetails.newBuilder().setHost("host1").setStatus(minionHealthStatus).setStatusReason("bigproblem").build();
    SaltMinionsHealth saltMinionsHealth = SaltMinionsHealth.newBuilder().addPingResponses(pingResponses).build();
    ServiceStatus serviceStatus = ServiceStatus.newBuilder().setName("salt-bootstrap").setStatus(masterServiceStatus).build();
    SaltMasterHealth saltMasterHealth = SaltMasterHealth.newBuilder().addServices(serviceStatus).build();
    SaltHealthReport saltHealthReport = SaltHealthReport.newBuilder().setMaster(saltMasterHealth).setMinions(saltMinionsHealth).build();
    RPCResponse<SaltHealthReport> response = new RPCResponse<>();
    response.setResult(saltHealthReport);
    return response;
}
Also used : SaltMinionsHealth(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMinionsHealth) SaltHealthReport(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltHealthReport) ServiceStatus(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus) StatusDetails(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails) RPCResponse(com.sequenceiq.cloudbreak.client.RPCResponse) SaltMasterHealth(com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMasterHealth)

Aggregations

StatusDetails (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.StatusDetails)3 RPCResponse (com.sequenceiq.cloudbreak.client.RPCResponse)3 NodeStatus (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatus)2 NodeStatusReport (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.NodeStatusReport)2 ServiceStatus (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServiceStatus)2 SaltHealthReport (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltHealthReport)1 SaltMasterHealth (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMasterHealth)1 SaltMinionsHealth (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.SaltMinionsHealth)1 ServicesDetails (com.cloudera.thunderhead.telemetry.nodestatus.NodeStatusProto.ServicesDetails)1