use of co.cask.cdap.proto.id.ProgramRunId in project cdap by caskdata.
the class PreviewHttpHandler method getPreviewLogsPrev.
@GET
@Path("/previews/{preview-id}/logs/prev")
public void getPreviewLogsPrev(HttpRequest request, HttpResponder responder, @PathParam("namespace-id") String namespaceId, @PathParam("preview-id") String previewId, @QueryParam("max") @DefaultValue("50") int maxEvents, @QueryParam("fromOffset") @DefaultValue("") String fromOffsetStr, @QueryParam("escape") @DefaultValue("true") boolean escape, @QueryParam("filter") @DefaultValue("") String filterStr, @QueryParam("format") @DefaultValue("text") String format, @QueryParam("suppress") List<String> suppress) throws Exception {
ProgramRunId runId = getProgramRunId(namespaceId, previewId);
RunRecordMeta runRecord = getRunRecord(namespaceId, previewId);
LoggingContext loggingContext = LoggingContextHelper.getLoggingContextWithRunId(namespaceId, previewId, runId.getProgram(), runId.getType(), runId.getRun(), runRecord.getSystemArgs());
doPrev(responder, loggingContext, maxEvents, fromOffsetStr, escape, filterStr, runRecord, format, suppress);
}
use of co.cask.cdap.proto.id.ProgramRunId 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);
}
use of co.cask.cdap.proto.id.ProgramRunId 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);
}
use of co.cask.cdap.proto.id.ProgramRunId 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);
}
use of co.cask.cdap.proto.id.ProgramRunId in project cdap by caskdata.
the class RemoteLineageWriterHandler method addDatasetAccess.
@POST
@Path("/addDatasetAccess")
public void addDatasetAccess(HttpRequest request, HttpResponder responder) throws Exception {
Iterator<MethodArgument> arguments = parseArguments(request);
ProgramRunId run = deserializeNext(arguments);
DatasetId datasetInstance = deserializeNext(arguments);
AccessType accessType = deserializeNext(arguments);
NamespacedEntityId component = deserializeNext(arguments);
lineageWriter.addAccess(run, datasetInstance, accessType, component);
responder.sendStatus(HttpResponseStatus.OK);
}
Aggregations