[ https://issues.apache.org/jira/browse/FLUME-3144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123440#comment-16123440 ]
ASF GitHub Bot commented on FLUME-3144: --------------------------------------- GitHub user adenes opened a pull request: https://github.com/apache/flume/pull/151 FLUME-3144. Improve Log4jAppender's performance by allowing logging collection of messages `Log4jAppender` treats `Collection` messages as a special case making it possible to log collection of events in one Log4j log call. The appender sends these events to the receiving Flume instance as one batch with the `rpcClient.appendBatch()` method. New tests added: - logging of a collection of multiple strings, expect one `appendBatch()` call. - logging one string, expect one `append()` call. - logging of a singleton collection of a string, expect one `append()` call. - logging of an empty collection, expect that neither `append()` nor `appendBatch()` was called. - logging of a `String` and an arbitrary object in one collection with `AvroReflectionEnabled` set to `true` - logging of a `String` and an arbitrary object in one collection with `AvroReflectionEnabled` set to `false` You can merge this pull request into a Git repository by running: $ git pull https://github.com/adenes/flume FLUME-3144 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flume/pull/151.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 #151 ---- commit ba4a9a9793104be715d451cc06c42ac73a77e00e Author: Denes Arvay <de...@apache.org> Date: 2017-08-11T14:22:04Z FLUME-3144. Improve Log4jAppender's performance by allowing logging collection of messages Log4jAppender treats Collection messages as a special case making it possible to log Collection of events in one Log4j log call. The appender sends these events to the receiving Flume instance as one batch with the rpcClient.appendBatch() method. ---- > Improve Log4jAppender's performance by allowing logging collection of messages > ------------------------------------------------------------------------------ > > Key: FLUME-3144 > URL: https://issues.apache.org/jira/browse/FLUME-3144 > Project: Flume > Issue Type: Improvement > Affects Versions: 1.7.0 > Reporter: Denes Arvay > Assignee: Denes Arvay > > Currently it's only possible to send events one by one with the Log4j > appender. (Except if the events are wrapped in an avro record but it's quite > cumbersome and might need special handling on the receiving side) > As the Log4j methods can handle any {{Object}} I'd suggest to improve the > Log4j appender to treat {{Collection}} event as a special case and send its > content to Flume with one {{rpcClient.appendBatch()}} call. -- This message was sent by Atlassian JIRA (v6.4.14#64029)