Search in sources :

Example 16 with JetService

use of com.hazelcast.jet.impl.JetService in project hazelcast-jet by hazelcast.

the class CancelExecutionOperation method run.

@Override
public void run() throws Exception {
    JetService service = getService();
    JobExecutionService executionService = service.getJobExecutionService();
    Address callerAddress = getCallerAddress();
    ExecutionContext ctx = executionService.assertExecutionContext(callerAddress, jobId(), executionId, this);
    ctx.cancelExecution();
}
Also used : JetService(com.hazelcast.jet.impl.JetService) JobExecutionService(com.hazelcast.jet.impl.JobExecutionService) ExecutionContext(com.hazelcast.jet.impl.execution.ExecutionContext) Address(com.hazelcast.nio.Address)

Example 17 with JetService

use of com.hazelcast.jet.impl.JetService in project hazelcast-jet by hazelcast.

the class CancelJobOperation method run.

@Override
public void run() throws Exception {
    JetService service = getService();
    JobCoordinationService coordinationService = service.getJobCoordinationService();
    coordinationService.cancelJob(jobId());
}
Also used : JetService(com.hazelcast.jet.impl.JetService) JobCoordinationService(com.hazelcast.jet.impl.JobCoordinationService)

Example 18 with JetService

use of com.hazelcast.jet.impl.JetService in project hazelcast-jet by hazelcast.

the class GetJobStatusOperation method run.

@Override
public void run() throws Exception {
    JetService service = getService();
    response = service.getJobCoordinationService().getJobStatus(jobId());
}
Also used : JetService(com.hazelcast.jet.impl.JetService)

Example 19 with JetService

use of com.hazelcast.jet.impl.JetService in project hazelcast-jet by hazelcast.

the class GetJobSubmissionTimeOperation method run.

@Override
public void run() throws Exception {
    JetService service = getService();
    response = service.getJobCoordinationService().getJobSubmissionTime(jobId());
}
Also used : JetService(com.hazelcast.jet.impl.JetService)

Example 20 with JetService

use of com.hazelcast.jet.impl.JetService in project hazelcast-jet by hazelcast.

the class InitExecutionOperation method run.

@Override
public void run() {
    ILogger logger = getLogger();
    JetService service = getService();
    Address caller = getCallerAddress();
    logger.fine("Initializing execution plan for " + jobAndExecutionId(jobId(), executionId) + " from " + caller);
    ExecutionPlan plan = deserializePlan(serializedPlan);
    service.getJobExecutionService().initExecution(jobId(), executionId, caller, coordinatorMemberListVersion, participants, plan);
}
Also used : JetService(com.hazelcast.jet.impl.JetService) ExecutionPlan(com.hazelcast.jet.impl.execution.init.ExecutionPlan) Address(com.hazelcast.nio.Address) ILogger(com.hazelcast.logging.ILogger)

Aggregations

JetService (com.hazelcast.jet.impl.JetService)28 Test (org.junit.Test)9 MockPS (com.hazelcast.jet.core.TestProcessors.MockPS)6 JetInstance (com.hazelcast.jet.JetInstance)5 Job (com.hazelcast.jet.Job)5 JobConfig (com.hazelcast.jet.config.JobConfig)5 StuckProcessor (com.hazelcast.jet.core.TestProcessors.StuckProcessor)5 JobCoordinationService (com.hazelcast.jet.impl.JobCoordinationService)5 JetConfig (com.hazelcast.jet.config.JetConfig)4 STARTING (com.hazelcast.jet.core.JobStatus.STARTING)4 JobRepository (com.hazelcast.jet.impl.JobRepository)4 MasterContext (com.hazelcast.jet.impl.MasterContext)4 Address (com.hazelcast.nio.Address)4 CompletableFuture (java.util.concurrent.CompletableFuture)4 CountDownLatch (java.util.concurrent.CountDownLatch)4 Future (java.util.concurrent.Future)4 Assert.assertEquals (org.junit.Assert.assertEquals)4 Assert.assertNotNull (org.junit.Assert.assertNotNull)4 Assert.assertTrue (org.junit.Assert.assertTrue)4 Assert.fail (org.junit.Assert.fail)4