kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-4829) Improve logging of StreamTask commits
Date Fri, 16 Jun 2017 00:24:01 GMT

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

ASF GitHub Bot commented on KAFKA-4829:
---------------------------------------

GitHub user guozhangwang opened a pull request:

    https://github.com/apache/kafka/pull/3354

    KAFKA-4829: Improve log4j on Streams thread / task-level

    These are the following improvements I made:
    
    1. On stream thread level, INFO will be demonstrating `Completed xx tasks in yy ms` or
`Completed rebalance with xx state in yy ms`, 
    2. On Stream thread cache level, INFO on `Flushed xx records`.
    3. On Stream thread level, DEBUG on internal batched operations like `created xx tasks`,
and TRACE on individual operation like `created x task`.
    4. Also using `isTraceEnabled` on the critical path to reduce overhead of creating `Object[]`.
    5. Minor cleanups in the code.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/guozhangwang/kafka K4829-tasks-log4j

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/3354.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 #3354
    
----
commit 00459c20ae097b9da86ba15ed1511ab3f39c9830
Author: Guozhang Wang <wangguoz@gmail.com>
Date:   2017-06-16T00:16:20Z

    improve log4j levels

----


> Improve logging of StreamTask commits
> -------------------------------------
>
>                 Key: KAFKA-4829
>                 URL: https://issues.apache.org/jira/browse/KAFKA-4829
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>    Affects Versions: 0.10.2.0
>            Reporter: Steven Schlansker
>            Priority: Minor
>              Labels: user-experience
>
> Currently I see this every commit interval:
> {code}
> 2017-02-28T21:27:16.659Z INFO <> [StreamThread-1] o.a.k.s.p.internals.StreamThread
- stream-thread [StreamThread-1] Committing task StreamTask 1_31
> 2017-02-28T21:27:16.659Z INFO <> [StreamThread-1] o.a.k.s.p.internals.StreamThread
- stream-thread [StreamThread-1] Committing task StreamTask 2_31
> {code}
> We have ~10 tasks in our topology, 4 topics, and 32 partitions per topic.
> This means every commit interval we log a few hundred lines of the above
> which is an order of magnitude chattier than anything else in the log
> during normal operations.
> To improve visibility of important messages, we should reduce the chattiness of normal
commits and highlight abnormal commits.  An example proposal:
> existing message is fine at TRACE level for diagnostics
> {{TRACE o.a.k.s.p.i.StreamThread - Committing task StreamTask 1_31}}
> normal fast case, wrap them all up into one summary line
> {{INFO o.a.k.s.p.i.StreamThreads - 64 stream tasks committed in 25ms}}
> some kind of threshold / messaging in case it doesn't complete quickly or logs an exception
> {{ERROR o.a.k.s.p.i.StreamThread - StreamTask 1_32 did not commit in 100ms}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message