[ 
https://issues.apache.org/jira/browse/FLINK-1179?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14311954#comment-14311954
 ] 

ASF GitHub Bot commented on FLINK-1179:
---------------------------------------

Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/374#discussion_r24315701
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmanager/web/SetupInfoServlet.java
 ---
    @@ -127,25 +134,42 @@ private void writeTaskmanagers(HttpServletResponse 
resp) throws IOException {
                                objInner.put("physicalMemory", 
instance.getResources().getSizeOfPhysicalMemory() >>> 20);
                                objInner.put("freeMemory", 
instance.getResources().getSizeOfJvmHeap() >>> 20);
                                objInner.put("managedMemory", 
instance.getResources().getSizeOfManagedMemory() >>> 20);
    +                           objInner.put("instanceID", instance.getId());
                                array.put(objInner);
                        }
                        catch (JSONException e) {
                                LOG.warn("Json object creation failed", e);
                        }
    -                   
    +
                }
                try {
                        obj.put("taskmanagers", array);
                } catch (JSONException e) {
                        LOG.warn("Json object creation failed", e);
                }
    -           
    +
                PrintWriter w = resp.getWriter();
                w.write(obj.toString());
        }
    -   
    +
    +   private void writeStackTraceOfTaskManager(String instanceIdStr, 
HttpServletResponse resp) throws IOException {
    --- End diff --
    
    The `RequestStackTrace` message may fail, if the task manager is not 
reachable.
    
    I suggest to surround this block with try / catch(Throwable) and forward 
the error message to the web client.
    
    The response JSON may then have two fields: "errorMessage" and 
"stackTrace". If "errorMessage" is defined, display the message, otherwise 
print the stack trace. 


> Add button to JobManager web interface to request stack trace of a TaskManager
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-1179
>                 URL: https://issues.apache.org/jira/browse/FLINK-1179
>             Project: Flink
>          Issue Type: New Feature
>          Components: JobManager
>            Reporter: Robert Metzger
>            Assignee: Chiwan Park
>            Priority: Minor
>              Labels: starter
>
> This is something I do quite often manually and I think it might be helpful 
> for users as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to