[
https://issues.apache.org/jira/browse/FLUME-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13468709#comment-13468709
]
Mike Percy commented on FLUME-1617:
-----------------------------------
CompressedStream doesn't support serializers. See FLUME-1247 for the task to
implement that, but I haven't been working on it, to be honest.
I believe this is the config that you want, to get compression within the Avro
container itself, which is the recommended approach:
agent.sinks.hdfsSink2.type = hdfs
agent.sinks.hdfsSink2.channel = memoryChannel2
agent.sinks.hdfsSink2.hdfs.path = hdfs://hadoop2-m1:8020/raw-events/%Y-%m-%d
agent.sinks.hdfsSink2.hdfs.filePrefix=load-events.%{hostname}.avro
agent.sinks.hdfsSink2.hdfs.rollInterval = 60
agent.sinks.hdfsSink2.hdfs.rollCount = 0
agent.sinks.hdfsSink2.hdfs.rollSize = 0
agent.sinks.hdfsSink2.hdfs.fileType = DataStream
agent.sinks.hdfsSink2.hdfs.batchSize = 1000
agent.sinks.hdfsSink2.serializer = avro_event
agent.sinks.hdfsSink2.serializer.compressionCodec = snappy
> Snappy compressed Avro files contain no data
> --------------------------------------------
>
> Key: FLUME-1617
> URL: https://issues.apache.org/jira/browse/FLUME-1617
> Project: Flume
> Issue Type: Bug
> Affects Versions: v1.2.0
> Reporter: Eran Kutner
>
> When configuring a sink to output Snappy compressed Avro files to HDFS like
> this:
> This is my sink config:
> agent.sinks.hdfsSink2.type = hdfs
> agent.sinks.hdfsSink2.channel = memoryChannel2
> agent.sinks.hdfsSink2.hdfs.path=hdfs://hadoop2-m1:8020/raw-events/%Y-%m-%d
> agent.sinks.hdfsSink2.hdfs.filePrefix=load-events.%{hostname}.avro
> agent.sinks.hdfsSink2.hdfs.rollInterval=60
> agent.sinks.hdfsSink2.hdfs.rollCount=0
> agent.sinks.hdfsSink2.hdfs.rollSize=0
> agent.sinks.hdfsSink2.hdfs.fileType=CompressedStream
> agent.sinks.hdfsSink2.hdfs.codeC=snappy
> agent.sinks.hdfsSink2.hdfs.writeFormat=Text
> agent.sinks.hdfsSink2.hdfs.batchSize=1000
> agent.sinks.hdfsSink2.serializer = avro_event
> The generated output files are very small and seem to contain only headers
> without any data.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira