Search in sources :

Example 1 with ContainerErrorEvent

use of com.datatorrent.stram.api.StramEvent.ContainerErrorEvent in project apex-core by apache.

the class StreamingContainerParent method reportError.

@Override
public void reportError(String containerId, int[] operators, String msg, LogFileInformation logFileInfo) throws IOException {
    EventGroupId groupId = getGroupIdForNewGroupingRequest(containerId);
    if (operators == null || operators.length == 0) {
        dagManager.recordEventAsync(new ContainerErrorEvent(containerId, msg, logFileInfo, groupId));
    } else {
        for (int operator : operators) {
            OperatorInfo operatorInfo = dagManager.getOperatorInfo(operator);
            if (operatorInfo != null) {
                dagManager.recordEventAsync(new OperatorErrorEvent(operatorInfo.name, operator, containerId, msg, logFileInfo, groupId));
            }
        }
    }
    log(containerId, msg);
}
Also used : OperatorInfo(com.datatorrent.stram.webapp.OperatorInfo) EventGroupId(org.apache.apex.engine.events.grouping.GroupingRequest.EventGroupId) ContainerErrorEvent(com.datatorrent.stram.api.StramEvent.ContainerErrorEvent) OperatorErrorEvent(com.datatorrent.stram.api.StramEvent.OperatorErrorEvent)

Aggregations

ContainerErrorEvent (com.datatorrent.stram.api.StramEvent.ContainerErrorEvent)1 OperatorErrorEvent (com.datatorrent.stram.api.StramEvent.OperatorErrorEvent)1 OperatorInfo (com.datatorrent.stram.webapp.OperatorInfo)1 EventGroupId (org.apache.apex.engine.events.grouping.GroupingRequest.EventGroupId)1