[ https://issues.apache.org/jira/browse/FLINK-2388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14636741#comment-14636741 ]
ASF GitHub Bot commented on FLINK-2388: --------------------------------------- Github user ebautistabar commented on a diff in the pull request: https://github.com/apache/flink/pull/930#discussion_r35202994 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java --- @@ -580,6 +581,34 @@ public ExecutionContext getExecutionContext() { return result; } + /** + * Returns the a stringified version of the user-defined accumulators. + * @return an Array containing the StringifiedAccumulatorResult objects + */ + public StringifiedAccumulatorResult[] getAccumulatorResultsStringified() { + + Map<String, Accumulator<?, ?>> accumulatorMap = aggregateUserAccumulators(); + + int num = accumulatorMap.size(); + StringifiedAccumulatorResult[] resultStrings = new StringifiedAccumulatorResult[num]; + + int i = 0; + for (Map.Entry<String, Accumulator<?, ?>> entry : accumulatorMap.entrySet()) { + + StringifiedAccumulatorResult result; + Accumulator<?, ?> value = entry.getValue(); + if (value != null) { + result = new StringifiedAccumulatorResult(entry.getKey(), value.getClass().getSimpleName(), value.toString()); + } else { + result = new StringifiedAccumulatorResult(entry.getKey(), "null", "null"); --- End diff -- Why do you use the string `"null"` instead of `null`? > JobManager should try retrieving jobs from archive > -------------------------------------------------- > > Key: FLINK-2388 > URL: https://issues.apache.org/jira/browse/FLINK-2388 > Project: Flink > Issue Type: Task > Components: JobManager > Reporter: Enrique Bautista Barahona > > I was following the quickstart guide with the WordCount example and, when I > entered the "analyze" page for the job, nothing came up. Apparently the > JobManagerInfoServlet fails with a NullPointerException. > I've been reading the code and I've seen the problem is in the processing of > the RequestAccumulatorResultsStringified message in JobManager. There's a > TODO where the accumulators should be retrieved from the archive. > As I wanted to know more about Flink internals, I decided to try and fix it. > I've later seen that there's currently ongoing work in that part of the code, > so I guess maybe it's not needed, but if you want I could submit a PR. If you > have already taken it into account and will solve it shortly, please feel > free to close the issue. > If you want to take a look, the commit is here: > https://github.com/ebautistabar/flink/commit/8536352b21fb6c78ad8840b0397509df04358c6b -- This message was sent by Atlassian JIRA (v6.3.4#6332)