Flume版本为Flume-ng 1.5,配置文件如下。在生成的HDFS文件中,总是有“
SEQ!org.apache.hadoop.io.LongWritable"org.apache.hadoop.io.BytesWritable??H謺NSA???y”信息,
配置文件如下,
# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = spooldir
a1.sources.r1.fileHeader = true
#a1.sources.r1.deserializer.outputCharset=UTF-8
a1.sources.r1.spoolDir = /opt/personal/file/access
a1.sources.r1.channels = c1
# Describe the sink
a1.sinks.k1.type = hdfs
a1.sinks.k1.channel = c1
a1.sinks.k1.hdfs.path = hdfs://node143:9000/access/events
a1.sinks.k1.hdfs.filePrefix =