private void ajaxFetchJobStats(final HttpServletRequest req, final HttpServletResponse resp, final HashMap<String, Object> ret, final User user, final ExecutableFlow exFlow) throws ServletException { final Project project = getProjectAjaxByPermission(ret, exFlow.getProjectId(), user, Type.READ); if (project == null) { return; } final String jobId = this.getParam(req, "jobid"); resp.setCharacterEncoding("utf-8"); try { final ExecutableNode node = exFlow.getExecutableNodePath(jobId); if (node == null) { ret.put("error", "Job " + jobId + " doesn't exist in " + exFlow.getExecutionId()); return; } final List<Object> jsonObj = this.executorManagerAdapter .getExecutionJobStats(exFlow, jobId, node.getAttempt()); ret.put("jobStats", jsonObj); } catch (final ExecutorManagerException e) { ret.put("error", "Error retrieving stats for job " + jobId); return; } }
final ExecutableNode node = exFlow.getExecutableNodePath(jobId); if (node == null) { ret.put("error",
node = flow.getExecutableNodePath(jobId); if (node == null) { page.add("errorMsg",
node = flow.getExecutableNodePath(jobId); if (node == null) { page.add("errorMsg",
public Status peekStatus(String jobId) { ExecutableNode node = flow.getExecutableNodePath(jobId); if (node != null) { return node.getStatus(); } return null; }
public File getJobLogFile(String jobId, int attempt) { ExecutableNode node = flow.getExecutableNodePath(jobId); File path = new File(execDir, node.getJobSource()); String logFileName = JobRunner.createLogFileName(node, attempt); File logFile = new File(path.getParentFile(), logFileName); if (!logFile.exists()) { return null; } return logFile; }
public File getJobAttachmentFile(String jobId, int attempt) { ExecutableNode node = flow.getExecutableNodePath(jobId); File path = new File(execDir, node.getJobSource()); String attachmentFileName = JobRunner.createAttachmentFileName(node, attempt); File attachmentFile = new File(path.getParentFile(), attachmentFileName); if (!attachmentFile.exists()) { return null; } return attachmentFile; }
public File getJobMetaDataFile(String jobId, int attempt) { ExecutableNode node = flow.getExecutableNodePath(jobId); File path = new File(execDir, node.getJobSource()); String metaDataFileName = JobRunner.createMetaDataFileName(node, attempt); File metaDataFile = new File(path.getParentFile(), metaDataFileName); if (!metaDataFile.exists()) { return null; } return metaDataFile; }
public synchronized BlockingStatus getBlockingStatus(String jobId) { if (cancelWatch) { return null; } ExecutableNode node = flow.getExecutableNodePath(jobId); if (node == null) { return null; } BlockingStatus blockingStatus = map.get(jobId); if (blockingStatus == null) { blockingStatus = new BlockingStatus(execId, jobId, node.getStatus()); map.put(jobId, blockingStatus); } return blockingStatus; }
private void ajaxFetchJobStats( HttpServletRequest req, HttpServletResponse resp, HashMap<String, Object> ret, User user, ExecutableFlow exFlow) throws ServletException { Project project = getProjectAjaxByPermission( ret, exFlow.getProjectId(), user, Type.READ); if (project == null) { return; } String jobId = this.getParam(req, "jobid"); resp.setCharacterEncoding("utf-8"); try { ExecutableNode node = exFlow.getExecutableNodePath(jobId); if (node == null) { ret.put("error", "Job " + jobId + " doesn't exist in " + exFlow.getExecutionId()); return; } List<Object> jsonObj = executorManager.getExecutionJobStats( exFlow, jobId, node.getAttempt()); ret.put("jobStats", jsonObj); } catch (ExecutorManagerException e) { ret.put("error", "Error retrieving stats for job " + jobId); return; } }
ExecutableNode node = exFlow.getExecutableNodePath(jobId); if (node == null) { ret.put("error", "Job " + jobId + " doesn't exist in " + exFlow.getExecutionId());
node = flow.getExecutableNodePath(jobId); if (node == null) { page.add("errorMsg", "Job " + jobId + " doesn't exist in " + flow.getExecutionId());