[
https://issues.apache.org/jira/browse/FLUME-2842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15024691#comment-15024691
]
Gonzalo Herreros commented on FLUME-2842:
-----------------------------------------
I'm using 1.6.0 and cannot reproduce it with neither udp or tcp.
What I have noticed is that the logger sink seems to truncate the message
printed both hex and text.
The headers are not added to the body if keepFields is none. (i've used your
configuration). When the headers are added to the body, the printed headers are
empty.
This is what I get, i.e.
15/11/24 09:35:18 INFO sink.LoggerSink: Event: { headers:{host=cdh1,
Severity=5, Facility=1, priority=13, timestamp=1448379318000} body: 74 65 73 74
3A 20 54 65 73 74 69 6E 67 20 46 6C test: Testing Fl }
> Priority in syslog messages is always present
> ---------------------------------------------
>
> Key: FLUME-2842
> URL: https://issues.apache.org/jira/browse/FLUME-2842
> Project: Flume
> Issue Type: Bug
> Components: Sinks+Sources
> Affects Versions: v1.6.0, v1.5.2
> Environment: - Linux xxxx 3.2.0-89-generic #127-Ubuntu SMP Tue Jul 28
> 09:28:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
> - Flume 1.6.0
> Source code repository: https://git-wip-us.apache.org/repos/asf/flume.git
> Revision: 2561a23240a71ba20bf288c7c2cda88f443c2080
> Compiled by hshreedharan on Mon May 11 11:15:44 PDT 2015
> From source with checksum b29e416802ce9ece3269d34233baf43f
> Reporter: Thebault Julien
>
> Hello,
> The priority field is always present in my body and i don t know why.
> I try to change the keepFields directive (false, none), however the facility
> is always append.
> {code:xml}
> 20 nov. 2015 22:07:43,780 INFO
> [SinkRunner-PollingRunner-DefaultSinkProcessor]
> (org.apache.flume.sink.LoggerSink.process:94) - Event: {
> headers:{Severity=4, Facility=1} body: 3C 31 32 3E 27 00 00 00 02 5F 69 64 00
> 19 00 00 <12>'...._id.... }
> {code}
> {code:title=flume.conf|borderStyle=solid}
> agent_k.sources = r1 r2
> agent_k.sinks = k1 k2
> agent_k.channels = c1 c2
> # Describe/Configure the source.
> agent_k.sources.r1.type = syslogudp
> agent_k.sources.r1.bind = 0.0.0.0
> agent_k.sources.r1.port = 9090
> agent_k.sources.r1.keepFields = none
> # Describe/Configure the channel.
> agent_k.channels.c1.type = file
> agent_k.channels.c1.checkpointDir = /hdfs/01/flume/xxx/tag/checkpoint/
> agent_k.channels.c1.dataDirs = /hdfs/01/flume/xxx/tag/datadirs/
> # Describe/Configure the sink.
> agent_k.sinks.k1.type = logger
> # Bind the source and sink to the channel.
> agent_k.sources.r1.channels = c1
> agent_k.sinks.k1.channel = c1
> {code}
> {code:title=client.py|borderStyle=solid}
> import logging, logging.handlers
> from bson import BSON
> from bson import Binary
> from bson import ObjectId
> rootLogger = logging.getLogger('')
> rootLogger.setLevel(logging.DEBUG)
> socketHandler = logging.handlers.SysLogHandler(address=('xxx', 9090))
> rootLogger.addHandler(socketHandler)
> number = 2
> def log():
> start = time.time()
> for i in xrange(number):
> msg = Binary(BSON.encode({'_id': str(ObjectId())}))
> rootLogger.warning(msg)
> {code}
> Thanks
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)