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

Ewen Cheslack-Postava commented on KAFKA-6889:
----------------------------------------------

Globs might be nice, but it looks like the services are just using it 
incorrectly in the first place. You shouldn't put all log files for all 
subclasses into the base class. Each Service class should make sure it includes 
the logs that it actually generates. From a quick glance at the base class, the 
JMX logs and the streams stderr/stdout stuff is all it guarantees will be 
there. Subclasses should override the value of `logs` for their own class.

Also, while less ideal than a glob, you can always construct the `logs` list 
dynamically, e.g. to handle a dynamic number of log files on the same node.

One of the reasons to avoid globs is that people tend to do excessively 
expensive things like just collecting everything by default, which becomes 
exceedingly expensive for passing tests.

> Fix Streams system test to only specify used log files
> ------------------------------------------------------
>
>                 Key: KAFKA-6889
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6889
>             Project: Kafka
>          Issue Type: Task
>          Components: streams, system tests
>            Reporter: Matthias J. Sax
>            Priority: Minor
>              Labels: beginner, easyfix
>
> In `streams.py` the class `StreamsTestBaseService` lists many log files that 
> are only used in certain tests. For all tests, that do not use those log 
> files, during the test run WARN messages are produced:
> {noformat}
> [WARNING - 2018-05-09 13:51:22,065 - test - compress_service_logs - 
> lineno:131]: Error compressing log /mnt/streams/streams.stdout.0-6: service 
> <StreamsSmokeTestJobRunnerService-0-140502617565072: num_nodes: 1, nodes: 
> ['worker7']>: ubuntu@worker7: Command 'cd "$(dirname 
> /mnt/streams/streams.stdout.0-6)" && f="$(basename 
> /mnt/streams/streams.stdout.0-6)" && tar czf "$f.tgz" "$f" && rm -rf 
> /mnt/streams/streams.stdout.0-6' returned non-zero exit status 2. Remote 
> error message: tar: streams.stdout.0-6: Cannot stat: No such file or directory
> tar: Exiting with failure status due to previous errors
> {noformat}
> Those message spam the output and might be miss leading. We should update the 
> Streams system tests accordingly such that each test only specifies the 
> log-file names it actually uses to avoid the WARN message.



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

Reply via email to