GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/1790
[FLINK-2732] Display TM logs in Dashboard
This PR allows the TM logs to be displayed in the Dashboard.
The page displaying information about a single TaskManager now has two
additional tabs (previously only metrics), log and stdout, similarly to the
JobManager page.
When this tabs are accessed, a TaskManagerLogHandler is called that roughly
does the following:
* get the TM ID from the REST API call
* ask JM for the TM gateway belonging to this ID
* tell the TM to upload his logs to the Blob store, and to return the
BlobKey
* send the BlobKey to the JM , asking for the path to the log file
* display file in the Dashboard
Should the BlobService not be available (e.g when the start-local script is
used), a proper message is displayed instead of the log.
At all times only a single version of the TM log/out file exists in the
Blob store; whenever the log is requested the old entry is deleted, if the file
has changed. This is handled by the TaskManagerLogHandler. To prevent
race-conditions when spamming the refresh button, only a single transfer can be
active for each TM. Should the user hit refresh while a transfer is in
progress, "loading..." will be displayed instead of the log.
When the TM uploads it's log a separate Thread is created to do that, so
that the TM isn't blocked for a while if the file is too big. Similarly, the
handler doesn't block while waiting the the TM upload, and instead uses a
FutureCallback to handle the finished upload.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 2732_taskmanager_logs
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/1790.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1790
----
commit 3ffe3d7fc310559a3deaf223f2dd78bc05b670b2
Author: zentol <[email protected]>
Date: 2016-03-14T17:55:42Z
[FLINK-2732] Display TM logs in Dashboard
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---