Search in sources :

Example 1 with SdxRepairInProgressEvent

use of com.sequenceiq.datalake.flow.repair.event.SdxRepairInProgressEvent in project cloudbreak by hortonworks.

the class SdxRepairStartHandler method doAccept.

@Override
protected Selectable doAccept(HandlerEvent<SdxRepairStartRequest> event) {
    SdxRepairStartRequest request = event.getData();
    Long sdxId = request.getResourceId();
    String userId = request.getUserId();
    try {
        repairService.startSdxRepair(sdxId, request.getRepairSettings());
    } catch (Exception e) {
        LOGGER.error("Sdx repair start failed, sdxId: {}, error: {}", sdxId, e.getMessage());
        return new SdxRepairCouldNotStartEvent(sdxId, userId, e);
    }
    return new SdxRepairInProgressEvent(sdxId, userId);
}
Also used : SdxRepairStartRequest(com.sequenceiq.datalake.flow.repair.event.SdxRepairStartRequest) SdxRepairCouldNotStartEvent(com.sequenceiq.datalake.flow.repair.event.SdxRepairCouldNotStartEvent) SdxRepairInProgressEvent(com.sequenceiq.datalake.flow.repair.event.SdxRepairInProgressEvent)

Aggregations

SdxRepairCouldNotStartEvent (com.sequenceiq.datalake.flow.repair.event.SdxRepairCouldNotStartEvent)1 SdxRepairInProgressEvent (com.sequenceiq.datalake.flow.repair.event.SdxRepairInProgressEvent)1 SdxRepairStartRequest (com.sequenceiq.datalake.flow.repair.event.SdxRepairStartRequest)1