Search in sources :

Example 6 with ProgramRunStatus

use of co.cask.cdap.proto.ProgramRunStatus in project cdap by caskdata.

the class RemoteRuntimeStoreHandler method setStop.

@POST
@Path("/setStop")
public void setStop(HttpRequest request, HttpResponder responder) throws Exception {
    Iterator<MethodArgument> arguments = parseArguments(request);
    ProgramId program = deserializeNext(arguments);
    String pid = deserializeNext(arguments);
    long endTime = deserializeNext(arguments);
    ProgramRunStatus runStatus = deserializeNext(arguments);
    BasicThrowable failureCause = deserializeNext(arguments);
    store.setStop(program, pid, endTime, runStatus, failureCause);
    responder.sendStatus(HttpResponseStatus.OK);
}
Also used : ProgramRunStatus(co.cask.cdap.proto.ProgramRunStatus) MethodArgument(co.cask.cdap.common.internal.remote.MethodArgument) ProgramId(co.cask.cdap.proto.id.ProgramId) BasicThrowable(co.cask.cdap.proto.BasicThrowable) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST)

Aggregations

ProgramRunStatus (co.cask.cdap.proto.ProgramRunStatus)6 BasicThrowable (co.cask.cdap.proto.BasicThrowable)3 RunRecord (co.cask.cdap.proto.RunRecord)2 Nullable (javax.annotation.Nullable)2 ServiceListenerAdapter (org.apache.twill.internal.ServiceListenerAdapter)2 ProgramController (co.cask.cdap.app.runtime.ProgramController)1 RuntimeInfo (co.cask.cdap.app.runtime.ProgramRuntimeService.RuntimeInfo)1 BadRequestException (co.cask.cdap.common.BadRequestException)1 MethodArgument (co.cask.cdap.common.internal.remote.MethodArgument)1 MDSKey (co.cask.cdap.data2.dataset2.lib.table.MDSKey)1 RunRecordMeta (co.cask.cdap.internal.app.store.RunRecordMeta)1 Id (co.cask.cdap.proto.Id)1 ProgramId (co.cask.cdap.proto.id.ProgramId)1 POST (javax.ws.rs.POST)1 Path (javax.ws.rs.Path)1 HttpResponse (org.apache.http.HttpResponse)1 Test (org.junit.Test)1