{"action":"created","issue":{"url":"https://api.github.com/repos/apache/flink/issues/6770","repository_url":"https://api.github.com/repos/apache/flink","labels_url":"https://api.github.com/repos/apache/flink/issues/6770/labels{/name}","comments_url":"https://api.github.com/repos/apache/flink/issues/6770/comments","events_url":"https://api.github.com/repos/apache/flink/issues/6770/events","html_url":"https://github.com/apache/flink/pull/6770","id":364347934,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NTU2NjY3","number":6770,"title":" [FLINK-10002] [Webfrontend] WebUI shows jm/tm logs more friendly.","user":{"login":"zhangxinyu1","id":12528894,"node_id":"MDQ6VXNlcjEyNTI4ODk0","avatar_url":"https://avatars2.githubusercontent.com/u/12528894?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangxinyu1","html_url":"https://github.com/zhangxinyu1","followers_url":"https://api.github.com/users/zhangxinyu1/followers","following_url":"https://api.github.com/users/zhangxinyu1/following{/other_user}","gists_url":"https://api.github.com/users/zhangxinyu1/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangxinyu1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangxinyu1/subscriptions","organizations_url":"https://api.github.com/users/zhangxinyu1/orgs","repos_url":"https://api.github.com/users/zhangxinyu1/repos","events_url":"https://api.github.com/users/zhangxinyu1/events{/privacy}","received_events_url":"https://api.github.com/users/zhangxinyu1/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-09-27T07:54:46Z","updated_at":"2018-10-31T10:00:11Z","closed_at":"2018-10-31T10:00:11Z","author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/apache/flink/pulls/6770","html_url":"https://github.com/apache/flink/pull/6770","diff_url":"https://github.com/apache/flink/pull/6770.diff","patch_url":"https://github.com/apache/flink/pull/6770.patch"},"body":"## What is the purpose of the change\r\nThis 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.\r\n![image](https://user-images.githubusercontent.com/12528894/47417697-20b36b00-d768-11e8-8268-35990c08bc22.png)\r\n![image](https://user-images.githubusercontent.com/12528894/47417728-30cb4a80-d768-11e8-82ee-94d39edca151.png)\r\n![image](https://user-images.githubusercontent.com/12528894/47417747-388aef00-d768-11e8-86b9-ae7489742c20.png)\r\n![image](https://user-images.githubusercontent.com/12528894/47417777-480a3800-d768-11e8-8652-c9f47a45c225.png)\r\n\r\n\r\nThis pr adds 6 new REST APIs:\r\n\r\n- For JobManager\r\n`/jobmanager/log?filename=xxx&start=0&size=10240`    Return logs of the current log  file or a given file in the range.\r\n`/jobmanager/loglist`    Return the list of historical log filename.\r\n`/jobmanager/stdout?start=0&size=10240`    Return the stdout data in the range\r\n\r\n- For TaskManager\r\n`/taskmanagers/:taskmanagerid/log?filename=xxx&start=0&size=10240`    Return logs of the current log file or a given file in the range.\r\n`/taskmanagers/:taskmanagerid/loglist`    Return the list of historical log filename.\r\n`/taskmanagers/:taskmanagerid/stdout?start=0&size=10240`    Return the stdout data in the range\r\n\r\n## Brief change log\r\nThis pr mainly add 6 APIs in new (WebMonitorEndpoint) REST API. Besides, some related frontend codes are changed, such as\r\n\r\n1.  `JobManagerLogFileHandler` is used to handle the request to fetch stdout and log file of job manager. The related headers are `JobManagerLogFileHeaders` and `JobManagerStdoutFileHeaders`.\r\n2.  `JobManagerLogListHandler` is used to handle the request to fetch log list of job manager. The related header is `JobManagerLogListHeaders`, and return a `LogListInfo` value.\r\n3. `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`.\r\n4.  `TaskManagerLogListHandler` is used to handle the request to fetch log list of a given task manager. The related header is `TaskManagerLogListHeaders`.\r\n5.  `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.\r\n\r\n## Verifying this change\r\nNo tests.\r\n\r\n## Does this pull request potentially affect one of the following parts:\r\n\r\n  - Dependencies (does it add or upgrade a dependency): no\r\n  - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no\r\n  - The serializers: no\r\n  - The runtime per-record code paths (performance sensitive): no \r\n  - Anything that affects deployment or recovery: no\r\n  - The S3 file system connector: no\r\n\r\n## Documentation\r\n\r\n  - Does this pull request introduce a new feature? yes\r\n  - If yes, how is the feature documented? JavaDocs\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/flink/issues/comments/434628064","html_url":"https://github.com/apache/flink/pull/6770#issuecomment-434628064","issue_url":"https://api.github.com/repos/apache/flink/issues/6770","id":434628064,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDYyODA2NA==","user":{"login":"zhangxinyu1","id":12528894,"node_id":"MDQ6VXNlcjEyNTI4ODk0","avatar_url":"https://avatars2.githubusercontent.com/u/12528894?v=4","gravatar_id":"","url":"https://api.github.com/users/zhangxinyu1","html_url":"https://github.com/zhangxinyu1","followers_url":"https://api.github.com/users/zhangxinyu1/followers","following_url":"https://api.github.com/users/zhangxinyu1/following{/other_user}","gists_url":"https://api.github.com/users/zhangxinyu1/gists{/gist_id}","starred_url":"https://api.github.com/users/zhangxinyu1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zhangxinyu1/subscriptions","organizations_url":"https://api.github.com/users/zhangxinyu1/orgs","repos_url":"https://api.github.com/users/zhangxinyu1/repos","events_url":"https://api.github.com/users/zhangxinyu1/events{/privacy}","received_events_url":"https://api.github.com/users/zhangxinyu1/received_events","type":"User","site_admin":false},"created_at":"2018-10-31T10:00:11Z","updated_at":"2018-10-31T10:00:11Z","author_association":"NONE","body":"> I think we missed an important thing. We should offer file size to user. If not, the parameters 'start', 'end' or 'size' would be useless since the user may have no idea how to set these parameters.\r\n\r\nMaybe we can set the start=0 and size=fileSize as the default value when user choose a log file."}}
{"actor":{"display_login":"zhangxinyu1"}}