You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Kyle Ambroff-Kao (JIRA)" <ji...@apache.org> on 2018/02/16 17:41:00 UTC

[jira] [Created] (KAFKA-6569) Reflection in OffsetIndex and TimeIndex construction

Kyle Ambroff-Kao created KAFKA-6569:
---------------------------------------

             Summary: Reflection in OffsetIndex and TimeIndex construction
                 Key: KAFKA-6569
                 URL: https://issues.apache.org/jira/browse/KAFKA-6569
             Project: Kafka
          Issue Type: Bug
          Components: core
            Reporter: Kyle Ambroff-Kao
            Assignee: Kyle Ambroff-Kao
         Attachments: after.png, before.png

kafka.log.AbstractIndex uses the Logging mixin to lazily initialize loggers for any concrete type that inherits from it. This works great, except that the LazyLogging trait uses reflection to compute the logger name.

When you have hundreds of thousands of log segments to load on startup the extra cost adds up.

I've attached flame graphs from broker startup on a broker that has about 12TB of log segments to load, and a second flame graph after changing AbstractIndex to statically initialize a logger.



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