You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/10/31 10:00:18 UTC

[GitHub] zhangxinyu1 opened a new pull request #6770: [FLINK-10002] [Webfrontend] WebUI shows jm/tm logs more friendly.

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:
users@infra.apache.org


With regards,
Apache Git Services