예제 #1
0
 @GET
 @Path(
     "/namespaces/{namespace-id}/apps/{app-id}/{program-type}/{program-id}/runs/{run-id}/logs/prev")
 public void runIdPrev(
     HttpRequest request,
     HttpResponder responder,
     @PathParam("namespace-id") String namespaceId,
     @PathParam("app-id") String appId,
     @PathParam("program-type") String programType,
     @PathParam("program-id") String programId,
     @PathParam("run-id") String runId,
     @QueryParam("max") @DefaultValue("50") int maxEvents,
     @QueryParam("fromOffset") @DefaultValue("") String fromOffsetStr,
     @QueryParam("escape") @DefaultValue("true") boolean escape,
     @QueryParam("filter") @DefaultValue("") String filterStr,
     @QueryParam("adapterid") String adapterId) {
   LoggingContext loggingContext =
       LoggingContextHelper.getLoggingContextWithRunId(
           namespaceId,
           appId,
           programId,
           ProgramType.valueOfCategoryName(programType),
           runId,
           adapterId);
   RunRecord runRecord =
       programStore.getRun(
           Id.Program.from(
               namespaceId, appId, ProgramType.valueOfCategoryName(programType), programId),
           runId);
   doPrev(responder, loggingContext, maxEvents, fromOffsetStr, escape, filterStr, runRecord);
 }
예제 #2
0
 @GET
 @Path("/namespaces/{namespace-id}/apps/{app-id}/{program-type}/{program-id}/runs/{run-id}/logs")
 public void getRunIdLogs(
     HttpRequest request,
     HttpResponder responder,
     @PathParam("namespace-id") String namespaceId,
     @PathParam("app-id") String appId,
     @PathParam("program-type") String programType,
     @PathParam("program-id") String programId,
     @PathParam("run-id") String runId,
     @QueryParam("start") @DefaultValue("-1") long fromTimeSecsParam,
     @QueryParam("stop") @DefaultValue("-1") long toTimeSecsParam,
     @QueryParam("escape") @DefaultValue("true") boolean escape,
     @QueryParam("filter") @DefaultValue("") String filterStr,
     @QueryParam("adapterid") String adapterId) {
   LoggingContext loggingContext =
       LoggingContextHelper.getLoggingContextWithRunId(
           namespaceId,
           appId,
           programId,
           ProgramType.valueOfCategoryName(programType),
           runId,
           adapterId);
   RunRecord runRecord =
       programStore.getRun(
           Id.Program.from(
               namespaceId, appId, ProgramType.valueOfCategoryName(programType), programId),
           runId);
   doGetLogs(
       responder,
       loggingContext,
       fromTimeSecsParam,
       toTimeSecsParam,
       escape,
       filterStr,
       runRecord);
 }