Search in sources :

Example 1 with TerminateExecutionOperation

use of com.hazelcast.jet.impl.operation.TerminateExecutionOperation in project hazelcast by hazelcast.

the class LightMasterContext method cancelInvocations.

private void cancelInvocations() {
    if (invocationsCancelled.compareAndSet(false, true)) {
        for (MemberInfo memberInfo : executionPlanMap.keySet()) {
            // Termination is fire and forget. If the termination isn't handled (e.g. due to a packet loss or
            // because the execution wasn't yet initialized at the target), it will be fixed by the
            // CheckLightJobsOperation.
            TerminateExecutionOperation op = new TerminateExecutionOperation(jobId, jobId, CANCEL_FORCEFUL);
            nodeEngine.getOperationService().createInvocationBuilder(JetServiceBackend.SERVICE_NAME, op, memberInfo.getAddress()).invoke();
        }
    }
}
Also used : MemberInfo(com.hazelcast.internal.cluster.MemberInfo) TerminateExecutionOperation(com.hazelcast.jet.impl.operation.TerminateExecutionOperation)

Aggregations

MemberInfo (com.hazelcast.internal.cluster.MemberInfo)1 TerminateExecutionOperation (com.hazelcast.jet.impl.operation.TerminateExecutionOperation)1