Skip to content

Commit

Permalink
[FLINK-2219] [webfrontend] Fix IllegalArgumentException and decrease …
Browse files Browse the repository at this point in the history
…log level

- Pressing the state button in the job history view (like SCHEDULED, FINISHED)
  sends a "null" (String) as group vertex ID, which results in an
  IllegalArgumentException. Fixed by check and early return.

- The JM log is flooded by INFO-level messages when no GlobalJobParameters are
  set (common case). Fixed by decreasing the log level of these message to
  DEBUG.
  • Loading branch information
uce committed Jun 16, 2015
1 parent b14ec17 commit f916819
Showing 1 changed file with 11 additions and 6 deletions.
Expand Up @@ -156,7 +156,12 @@ else if("job".equals(req.getParameter("get"))) {
} }
else if("groupvertex".equals(req.getParameter("get"))) { else if("groupvertex".equals(req.getParameter("get"))) {
String jobId = req.getParameter("job"); String jobId = req.getParameter("job");
String groupvertexId = req.getParameter("groupvertex"); String groupVertexId = req.getParameter("groupvertex");

// No group vertex specified
if (groupVertexId.equals("null")) {
return;
}


response = Patterns.ask(archive, new RequestJob(JobID.fromHexString(jobId)), response = Patterns.ask(archive, new RequestJob(JobID.fromHexString(jobId)),
new Timeout(timeout)); new Timeout(timeout));
Expand All @@ -169,11 +174,11 @@ else if("groupvertex".equals(req.getParameter("get"))) {
}else { }else {
final JobResponse jobResponse = (JobResponse) result; final JobResponse jobResponse = (JobResponse) result;


if(jobResponse instanceof JobFound && groupvertexId != null){ if(jobResponse instanceof JobFound && groupVertexId != null){
ExecutionGraph archivedJob = ((JobFound)jobResponse).executionGraph(); ExecutionGraph archivedJob = ((JobFound)jobResponse).executionGraph();


writeJsonForArchivedJobGroupvertex(resp.getWriter(), archivedJob, writeJsonForArchivedJobGroupvertex(resp.getWriter(), archivedJob,
JobVertexID.fromHexString(groupvertexId)); JobVertexID.fromHexString(groupVertexId));
} else { } else {
LOG.warn("DoGet:groupvertex: Could not find job for job ID " + jobId); LOG.warn("DoGet:groupvertex: Could not find job for job ID " + jobId);
} }
Expand Down Expand Up @@ -359,7 +364,7 @@ public int compare(ExecutionGraph o1, ExecutionGraph o2) {
* Writes Json with the job counts * Writes Json with the job counts
* *
* @param wrt * @param wrt
* @param counts * @param jobCounts
*/ */
private void writeJsonForJobCounts(PrintWriter wrt, Tuple3<Integer, Integer, Integer> jobCounts) { private void writeJsonForJobCounts(PrintWriter wrt, Tuple3<Integer, Integer, Integer> jobCounts) {


Expand Down Expand Up @@ -454,11 +459,11 @@ private void writeJsonForArchivedJob(PrintWriter wrt, ExecutionGraph graph) {
wrt.write(", \"userConfig\": " + ucString + "}"); wrt.write(", \"userConfig\": " + ucString + "}");
} }
else { else {
LOG.info("GlobalJobParameters.toMap() did not return anything"); LOG.debug("GlobalJobParameters.toMap() did not return anything");
} }
} }
else { else {
LOG.info("No GlobalJobParameters were set in the execution config"); LOG.debug("No GlobalJobParameters were set in the execution config");
} }
wrt.write("},"); wrt.write("},");
} else { } else {
Expand Down

0 comments on commit f916819

Please sign in to comment.