use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxRepairAction method action.
@Override
public SdxTestDto action(TestContext testContext, SdxTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, format(" Starting repair on SDX: %s ", testDto.getName()));
Log.whenJson(LOGGER, " SDX repair request: ", testDto.getSdxRepairRequest(hostGroups));
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().repairCluster(testDto.getName(), testDto.getSdxRepairRequest(hostGroups));
testDto.setFlow("SDX repair", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX repair response: ", detailedResponse);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxRepairCustomAction method action.
@Override
public SdxCustomTestDto action(TestContext testContext, SdxCustomTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, format(" Starting repair on SDX Internal: %s ", testDto.getName()));
Log.whenJson(LOGGER, " SDX Custom repair request: ", testDto.getSdxRepairRequest());
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().repairCluster(testDto.getName(), testDto.getSdxRepairRequest());
testDto.setFlow("SDX Custom repair", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX Custom repair response: ", detailedResponse);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxRepairInternalAction method action.
@Override
public SdxInternalTestDto action(TestContext testContext, SdxInternalTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, format(" Starting repair on SDX Internal: %s ", testDto.getName()));
Log.whenJson(LOGGER, " SDX Internal repair request: ", testDto.getSdxRepairRequest(hostGroups));
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().repairCluster(testDto.getName(), testDto.getSdxRepairRequest(hostGroups));
testDto.setFlow("SDX Internal repair", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX Internal repair response: ", detailedResponse);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxStartCustomAction method action.
@Override
public SdxCustomTestDto action(TestContext testContext, SdxCustomTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, format(" Starting custom SDX: %s ", testDto.getName()));
Log.whenJson(LOGGER, " SDX start custom request: ", testDto.getRequest());
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().startByName(testDto.getName());
testDto.setFlow("SDX start", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX start custom response: ", detailedResponse);
return testDto;
}
use of com.sequenceiq.flow.api.model.FlowIdentifier in project cloudbreak by hortonworks.
the class SdxStopCustomAction method action.
@Override
public SdxCustomTestDto action(TestContext testContext, SdxCustomTestDto testDto, SdxClient client) throws Exception {
Log.when(LOGGER, format(" Stop custom SDX: %s ", testDto.getName()));
Log.whenJson(LOGGER, " SDX stop custom request: ", testDto.getRequest());
FlowIdentifier flowIdentifier = client.getDefaultClient().sdxEndpoint().stopByName(testDto.getName());
testDto.setFlow("SDX stop", flowIdentifier);
SdxClusterDetailResponse detailedResponse = client.getDefaultClient().sdxEndpoint().getDetail(testDto.getName(), Collections.emptySet());
testDto.setResponse(detailedResponse);
Log.whenJson(LOGGER, " SDX stop custom response: ", detailedResponse);
return testDto;
}
Aggregations