GitHub user zentol opened a pull request:
https://github.com/apache/flink/pull/6009
[FLINK-9357][tests][yarn] Add margins to exception excerpts
## What is the purpose of the change
The yarn tests check the log files for exceptions to detect test failures.
If detected a test will fail and an excerpt from the logs will be printed.
The excerpt content is currently the stack of the detected exception. This
only works correctly if the stacktrace follows a specific formatting style; for
example if an exception message contains an empty line the output will be cut
off.
With this PR we also include the 10 lines before/after the found exception
to make this a bit more reliable. As a side-effect we also get a little
contextual information.
## Brief change log
* add a utilty `BufferingScanner` class to access previously read messages
* modify excerpt extraction to include lines before/after the exception
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zentol/flink 9357
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/6009.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 #6009
----
commit 8ab4d16163c999545b9cbc98121aff59cc74188d
Author: zentol <chesnay@...>
Date: 2018-05-11T20:09:21Z
[FLINK-9357][tests][yarn] Add margins to exception excerpts
----
---