private void handleFetchMetaDataEvent(int execId, HttpServletRequest req, HttpServletResponse resp, Map<String, Object> respMap) throws ServletException { int startByte = getIntParam(req, "offset"); int length = getIntParam(req, "length"); resp.setContentType("text/plain"); resp.setCharacterEncoding("utf-8"); int attempt = getIntParam(req, "attempt", 0); String jobId = getParam(req, "jobId"); try { JobMetaData result = flowRunnerManager.readJobMetaData(execId, jobId, attempt, startByte, length); respMap.putAll(result.toObject()); } catch (Exception e) { logger.error(e); respMap.put("error", e.getMessage()); } }