Search in sources :

Example 1 with MethodArgument

use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.

the class RemoteRuntimeStoreHandler method addWorkflowNodeState.

@POST
@Path("/addWorkflowNodeState")
public void addWorkflowNodeState(HttpRequest request, HttpResponder responder) throws Exception {
    Iterator<MethodArgument> arguments = parseArguments(request);
    ProgramRunId workflowRunId = deserializeNext(arguments);
    WorkflowNodeStateDetail nodeStateDetail = deserializeNext(arguments);
    store.addWorkflowNodeState(workflowRunId, nodeStateDetail);
    responder.sendStatus(HttpResponseStatus.OK);
}
Also used : MethodArgument(co.cask.cdap.common.internal.remote.MethodArgument) ProgramRunId(co.cask.cdap.proto.id.ProgramRunId) WorkflowNodeStateDetail(co.cask.cdap.proto.WorkflowNodeStateDetail) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST)

Example 2 with MethodArgument

use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.

the class RemoteRuntimeStoreHandler method setSuspend.

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

Example 3 with MethodArgument

use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.

the class RemoteRuntimeStoreHandler method setResume.

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

Example 4 with MethodArgument

use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.

the class RemoteRuntimeStoreHandler method updateWorkflowToken.

@POST
@Path("/updateWorkflowToken")
public void updateWorkflowToken(HttpRequest request, HttpResponder responder) throws Exception {
    Iterator<MethodArgument> arguments = parseArguments(request);
    ProgramRunId workflowRunId = deserializeNext(arguments);
    WorkflowToken token = deserializeNext(arguments);
    store.updateWorkflowToken(workflowRunId, token);
    responder.sendStatus(HttpResponseStatus.OK);
}
Also used : MethodArgument(co.cask.cdap.common.internal.remote.MethodArgument) WorkflowToken(co.cask.cdap.api.workflow.WorkflowToken) ProgramRunId(co.cask.cdap.proto.id.ProgramRunId) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST)

Example 5 with MethodArgument

use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.

the class RemoteLineageWriterHandler method addStreamAccess.

@POST
@Path("/addStreamAccess")
public void addStreamAccess(HttpRequest request, HttpResponder responder) throws Exception {
    Iterator<MethodArgument> arguments = parseArguments(request);
    ProgramRunId run = deserializeNext(arguments);
    StreamId stream = deserializeNext(arguments);
    AccessType accessType = deserializeNext(arguments);
    NamespacedEntityId component = deserializeNext(arguments);
    lineageWriter.addAccess(run, stream, accessType, component);
    responder.sendStatus(HttpResponseStatus.OK);
}
Also used : StreamId(co.cask.cdap.proto.id.StreamId) NamespacedEntityId(co.cask.cdap.proto.id.NamespacedEntityId) MethodArgument(co.cask.cdap.common.internal.remote.MethodArgument) ProgramRunId(co.cask.cdap.proto.id.ProgramRunId) AccessType(co.cask.cdap.data2.metadata.lineage.AccessType) Path(javax.ws.rs.Path) POST(javax.ws.rs.POST)

Aggregations

MethodArgument (co.cask.cdap.common.internal.remote.MethodArgument)25 POST (javax.ws.rs.POST)24 Path (javax.ws.rs.Path)24 ProgramId (co.cask.cdap.proto.id.ProgramId)8 ProgramRunId (co.cask.cdap.proto.id.ProgramRunId)8 EntityId (co.cask.cdap.proto.id.EntityId)6 Principal (co.cask.cdap.proto.security.Principal)6 AccessType (co.cask.cdap.data2.metadata.lineage.AccessType)4 DatasetId (co.cask.cdap.proto.id.DatasetId)4 NamespacedEntityId (co.cask.cdap.proto.id.NamespacedEntityId)4 StreamId (co.cask.cdap.proto.id.StreamId)4 Action (co.cask.cdap.proto.security.Action)4 WorkflowToken (co.cask.cdap.api.workflow.WorkflowToken)2 WorkflowNodeStateDetail (co.cask.cdap.proto.WorkflowNodeStateDetail)2 AuthorizationPrivilege (co.cask.cdap.proto.security.AuthorizationPrivilege)2 Privilege (co.cask.cdap.proto.security.Privilege)2 BadRequestException (co.cask.cdap.common.BadRequestException)1 BasicThrowable (co.cask.cdap.proto.BasicThrowable)1 ProgramRunStatus (co.cask.cdap.proto.ProgramRunStatus)1 JsonElement (com.google.gson.JsonElement)1