A1.sources =r1a1.sinks=K1a1.channels=C1 #使用内置kafka Sourcea1.sources.r1.type=Org.apache.flume.source.kafka.kafkasource#kafka Connected Zookeepera1.sources.r1.zookeeperConnect= localhost:2181A1.sources.r1.topic= kkt-test-topica1.sources.r1.batchSize= -A1.sources.r1.channels=C1 #这里写到hdfs中a1. Sinks.k1.channel=C1a1.sinks.k1.type=Hdfsa1.sinks.k1.hdfs.path=hdfs://Iz94rak63uyz/user/flumeA1.sinks.k1.hdfs.writeFormat =Texta1.sinks.k1.hdfs.fileType=DataStreama1.sinks.k1.hdfs.rollInterval=0a1.sinks.k1.hdfs.rollSize=1000000A1.sinks.k1.hdfs.rollCount=0a1.sinks.k1.hdfs.batchSize= +A1.sinks.k1.hdfs.txnEventMax= +A1.sinks.k1.hdfs.callTimeout=60000A1.sinks.k1.hdfs.appendTimeout=60000# Use a channelwhichBuffers EventsinchMemorya1.channels.c1.type=memorya1.channels.c1.capacity= +a1.channels.c1.transactionCapacity= +# Bind The source and sink to the Channela1.sources.r1.channels=C1a1.sinks.k1.channel= C1
To start the flume command:
Flume-ng Agent--conf-file flume.conf--name a1-dflume.root.logger=info,console--conf = conf
Flume reading data from the Kafka