flume配置
# Name the components on this agent
a1.sources = source1
a1.sinks = oss1
a1.channels = c1
# Describe/configure the source
a1.sources.source1.type = org.apache.flume.source.kafka.KafkaSource
a1.sources.source1.kafka.bootstrap.servers = xxxxxx:9092
a1.sources.source1.topic = topic名称
a1.sources.source1.groupId = flume
a1.sources.source1.kafka.consumer.timeout.ms = 100
#earliest
#当各分区下有已提交的offset时,从提交的offset开始消费;无提交的offset时,从头开始消费
#latest
#当各分区下有已提交的offset时,从提交的offset开始消费;无提交的offset时,消费新产生的该分区下的数据
#none
#topic各分区都存在已提交的offset时,从offset后开始消费;只要有一个分区不存在已提交的offset,则抛出异常
a1.sources.source1.kafka.consumer.auto.offset.reset = earliest
# Describe the sink
a1.sinks.oss1.type = hdfs
a1.sinks.oss1.hdfs.path = (oss地址)oss://bucket名称/kafka-flume-oss-test/%{
topic}/