@GET @Path("/") public String fetchAllApplications() throws Exception { logger.info("start fetchAllApplications method ..."); SparkMonitorFacade facade = new SparkMonitorFacade(); List<HistoryVO> result = facade.getAllSparkApplication(); Gson gson = new Gson(); String toJson = gson.toJson(result); logger.debug("toJson = " + toJson); logger.info("finish fetchAllApplications method ..."); return toJson; }
@GET @Path("/{applicationId}/jobs") public String fetchApplicationJobs(@PathParam("applicationId") String applicationId) throws Exception { logger.info("start fetchApplicationJobs method ..."); logger.debug("applicationId = " + applicationId); SparkMonitorFacade facade = new SparkMonitorFacade(); List<JobVO> result = facade.getSparkApplicationJobs(applicationId); Gson gson = new Gson(); String toJson = gson.toJson(result); logger.debug("toJson = " + toJson); logger.info("finish fetchApplicationJobs method ..."); return toJson; }
@GET @Path("/{applicationId}/{jobId}/{stageId}") public String fetchStageDetail( @PathParam("applicationId") String applicationId, @PathParam("jobId") String jobId, @PathParam("stageId") String stageId) throws Exception { logger.info("start fetchStageDetail method ..."); logger.debug("application = " + applicationId + " jobId = " + jobId + " stageId = " + stageId); SparkMonitorFacade facade = new SparkMonitorFacade(); HistoryDetailStageVO historyDetailStage = facade.getHistoryDetailStageTask(applicationId, Integer.parseInt(stageId)); Gson gson = new Gson(); String toJson = gson.toJson(historyDetailStage); logger.debug("toJson = " + toJson); logger.info("finish fetchStageDetail method ..."); return toJson; }