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(FullHttpRequest 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);
}
use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.
the class RemoteUsageRegistryHandler method registerStream.
@POST
@Path("/registerStream")
public void registerStream(HttpRequest request, HttpResponder responder) throws Exception {
Iterator<MethodArgument> arguments = parseArguments(request);
ProgramId programId = deserializeNext(arguments);
StreamId streamId = deserializeNext(arguments);
usageRegistry.register(programId, streamId);
responder.sendStatus(HttpResponseStatus.OK);
}
use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.
the class RemotePrivilegesHandler method listPrivileges.
@POST
@Path("/listPrivileges")
public void listPrivileges(HttpRequest request, HttpResponder responder) throws Exception {
Iterator<MethodArgument> arguments = parseArguments(request);
Principal principal = deserializeNext(arguments);
LOG.trace("Listing privileges for principal {}", principal);
Set<Privilege> privileges = privilegesManager.listPrivileges(principal);
LOG.debug("Returning privileges for principal {} as {}", principal, privileges);
responder.sendJson(HttpResponseStatus.OK, privileges);
}
use of co.cask.cdap.common.internal.remote.MethodArgument 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);
}
use of co.cask.cdap.common.internal.remote.MethodArgument in project cdap by caskdata.
the class RemoteRuntimeStoreHandler method setStart.
@POST
@Path("/setStart")
public void setStart(HttpRequest request, HttpResponder responder) throws Exception {
Iterator<MethodArgument> arguments = parseArguments(request);
ProgramId program = deserializeNext(arguments);
String pid = deserializeNext(arguments);
long startTime = deserializeNext(arguments);
String twillRunId = deserializeNext(arguments);
Map<String, String> runtimeArgs = deserializeNext(arguments);
Map<String, String> systemArgs = deserializeNext(arguments);
store.setStart(program, pid, startTime, twillRunId, runtimeArgs, systemArgs);
responder.sendStatus(HttpResponseStatus.OK);
}
Aggregations