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

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

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

    https://github.com/apache/flink/pull/5341#discussion_r166222787
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/webmonitor/WebMonitorEndpoint.java
 ---
    @@ -473,10 +476,55 @@ public WebMonitorEndpoint(
                
handlers.add(Tuple2.of(SubtaskCurrentAttemptDetailsHeaders.getInstance(), 
subtaskCurrentAttemptDetailsHandler));
                
handlers.add(Tuple2.of(JobVertexTaskManagersHeaders.getInstance(), 
jobVertexTaskManagersHandler));
     
    -           // This handler MUST be added last, as it otherwise masks all 
subsequent GET handlers
                optWebContent.ifPresent(
                        webContent -> 
handlers.add(Tuple2.of(WebContentHandlerSpecification.getInstance(), 
webContent)));
     
    +           // load the log and stdout file handler for the main cluster 
component
    +           final WebMonitorUtils.LogFileLocation logFileLocation = 
WebMonitorUtils.LogFileLocation.find(clusterConfiguration);
    +
    +           final ChannelInboundHandler logFileHandler;
    +
    +           if (logFileLocation.logFile == null) {
    +                   logFileHandler = new ConstantTextHandler("(log file 
unavailable)");
    +           } else {
    +                   ChannelInboundHandler staticFileServerHandler;
    +                   try {
    +                           staticFileServerHandler = new 
StaticFileServerHandler<>(
    +                                   leaderRetriever,
    +                                   restAddressFuture,
    +                                   timeout,
    +                                   logFileLocation.logFile);
    +                   } catch (IOException e) {
    +                           log.info("Cannot load log file handler.", e);
    +                           staticFileServerHandler = new 
ConstantTextHandler("(log file unavailable)");
    +                   }
    +
    +                   logFileHandler = staticFileServerHandler;
    +           }
    +
    +           final ChannelInboundHandler stdoutFileHandler;
    +
    +           if (logFileLocation.stdOutFile == null) {
    --- End diff --
    
    True, will change it.


> Serve main cluster components log and stdout file
> -------------------------------------------------
>
>                 Key: FLINK-8495
>                 URL: https://issues.apache.org/jira/browse/FLINK-8495
>             Project: Flink
>          Issue Type: Sub-task
>          Components: REST, Webfrontend
>    Affects Versions: 1.5.0
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Major
>              Labels: flip-6
>             Fix For: 1.5.0
>
>
> The {{WebMonitorEndpoint}} should be able to serve the main cluster 
> components log and stdout file via the web ui.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to