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

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

zhangxinyu1 opened a new pull request #6770:  [FLINK-10002] [Webfrontend] WebUI 
shows jm/tm logs more friendly.
URL: https://github.com/apache/flink/pull/6770
 
 
   ## What is the purpose of the change
   This commit makes WebUI show jm/tm logs more friendly. WebUI can show 
historical logs by inputing a filename and a offset range to read of the file, 
shown as follows.
   
![image](https://user-images.githubusercontent.com/12528894/47417697-20b36b00-d768-11e8-8268-35990c08bc22.png)
   
![image](https://user-images.githubusercontent.com/12528894/47417728-30cb4a80-d768-11e8-82ee-94d39edca151.png)
   
![image](https://user-images.githubusercontent.com/12528894/47417747-388aef00-d768-11e8-86b9-ae7489742c20.png)
   
![image](https://user-images.githubusercontent.com/12528894/47417777-480a3800-d768-11e8-8652-c9f47a45c225.png)
   
   
   This pr adds 6 new REST APIs:
   
   - For JobManager
   `/jobmanager/log?filename=xxx&start=0&size=10240`    Return logs of the 
current log  file or a given file in the range.
   `/jobmanager/loglist`    Return the list of historical log filename.
   `/jobmanager/stdout?start=0&size=10240`    Return the stdout data in the 
range
   
   - For TaskManager
   `/taskmanagers/:taskmanagerid/log?filename=xxx&start=0&size=10240`    Return 
logs of the current log file or a given file in the range.
   `/taskmanagers/:taskmanagerid/loglist`    Return the list of historical log 
filename.
   `/taskmanagers/:taskmanagerid/stdout?start=0&size=10240`    Return the 
stdout data in the range
   
   ## Brief change log
   This pr mainly add 6 APIs in new (WebMonitorEndpoint) REST API. Besides, 
some related frontend codes are changed, such as
   
   1.  `JobManagerLogFileHandler` is used to handle the request to fetch stdout 
and log file of job manager. The related headers are `JobManagerLogFileHeaders` 
and `JobManagerStdoutFileHeaders`.
   2.  `JobManagerLogListHandler` is used to handle the request to fetch log 
list of job manager. The related header is `JobManagerLogListHeaders`, and 
return a `LogListInfo` value.
   3. `TaskManagerLogHandler` is used to handle the request to fetch stdout and 
log file of a given task manager. The related headers are 
`TaskManagerLogFileHeaders` and `TaskManagerStdoutFileHeaders`.
   4.  `TaskManagerLogListHandler` is used to handle the request to fetch log 
list of a given task manager. The related header is `TaskManagerLogListHeaders`.
   5.  `FileOffsetRange` is designed to identify a range of log files, which 
includes a start offset and an end offset. `LogFilenameQueryParameter`, 
`LogSizeQueryParameter` and `LogStartOffsetQueryParameter` are the parameters 
of requests.
   
   ## Verifying this change
   No tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no 
     - Anything that affects deployment or recovery: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? yes
     - If yes, how is the feature documented? JavaDocs
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> WebUI shows logs unfriendly, especially when the amount of logs is large
> ------------------------------------------------------------------------
>
>                 Key: FLINK-10002
>                 URL: https://issues.apache.org/jira/browse/FLINK-10002
>             Project: Flink
>          Issue Type: Improvement
>          Components: Webfrontend
>            Reporter: zhangxinyu
>            Assignee: zhangxinyu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>         Attachments: image-2018-09-10-11-38-07-973.png
>
>
> When a streaming job run for a long time, the amount of logs may be very 
> large. The current WebUI shows all content of logs. It will cost much time to 
> download logs from task managers. and the browser cannot display the logs.
> Therefore, I suggest that Flink uses DailyRollingAppender to split logs by 
> default, and task manager provides an API that can get logs based on a 
> parameter of time interval. In this way WebUI can display logs based on time 
> interval.



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

Reply via email to