Repository: flink
Updated Branches:
  refs/heads/release-0.9 c4f3f4886 -> a300eec63


[FLINK-2219] [webfrontend] Fix IllegalArgumentException and decrease 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.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/a300eec6
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/a300eec6
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/a300eec6

Branch: refs/heads/release-0.9
Commit: a300eec6325b376de55c8de919aac485cb1e5c9b
Parents: c4f3f48
Author: Ufuk Celebi <u...@apache.org>
Authored: Tue Jun 16 10:30:07 2015 +0200
Committer: Ufuk Celebi <u...@apache.org>
Committed: Tue Jun 16 10:34:54 2015 +0200

----------------------------------------------------------------------
 .../jobmanager/web/JobManagerInfoServlet.java      | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/a300eec6/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/JobManagerInfoServlet.java
----------------------------------------------------------------------
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/JobManagerInfoServlet.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/JobManagerInfoServlet.java
index 3fc3c82..82ab63e 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/JobManagerInfoServlet.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/JobManagerInfoServlet.java
@@ -156,7 +156,12 @@ public class JobManagerInfoServlet extends HttpServlet {
                        }
                        else if("groupvertex".equals(req.getParameter("get"))) {
                                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)),
                                                new Timeout(timeout));
@@ -169,11 +174,11 @@ public class JobManagerInfoServlet extends HttpServlet {
                                }else {
                                        final JobResponse jobResponse = 
(JobResponse) result;
 
-                                       if(jobResponse instanceof JobFound && 
groupvertexId != null){
+                                       if(jobResponse instanceof JobFound && 
groupVertexId != null){
                                                ExecutionGraph archivedJob = 
((JobFound)jobResponse).executionGraph();
 
                                                
writeJsonForArchivedJobGroupvertex(resp.getWriter(), archivedJob,
-                                                               
JobVertexID.fromHexString(groupvertexId));
+                                                               
JobVertexID.fromHexString(groupVertexId));
                                        } else {
                                                LOG.warn("DoGet:groupvertex: 
Could not find job for job ID " + jobId);
                                        }
@@ -359,7 +364,7 @@ public class JobManagerInfoServlet extends HttpServlet {
         * Writes Json with the job counts
         *
         * @param wrt
-        * @param counts
+        * @param jobCounts
         */
        private void writeJsonForJobCounts(PrintWriter wrt, Tuple3<Integer, 
Integer, Integer> jobCounts) {
 
@@ -454,11 +459,11 @@ public class JobManagerInfoServlet extends HttpServlet {
                                                wrt.write(", \"userConfig\": " 
+ ucString + "}");
                                        }
                                        else {
-                                               
LOG.info("GlobalJobParameters.toMap() did not return anything");
+                                               
LOG.debug("GlobalJobParameters.toMap() did not return anything");
                                        }
                                }
                                else {
-                                       LOG.info("No GlobalJobParameters were 
set in the execution config");
+                                       LOG.debug("No GlobalJobParameters were 
set in the execution config");
                                }
                                wrt.write("},");
                        } else {

Reply via email to