Flume采集数据到Kafka,大约只有17MB/s
agent 配置文件:
b1.channels = c1
b1.sources = r1
b1.sinks = k1
b1.sources.r1.type = spooldir
b1.sources.r1.channels = c1
b1.sources.r1.spoolDir = /tmp/flumeSpool
b1.sources.r1.batchSize = 1000
b1.channels.c1.type = memory
b1.channels.c1.capacity = 10000
b1.channels.c1.transactionCapacity = 1000
b1.sinks.k1.channel = c1
b1.sinks.k1.batchSize = 1000
#b1.sinks.k1.type = null
b1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
b1.sinks.k1.kafka.partitioner.class = iie.kafka.producer.RandomPartitioner
b1.sinks.k1.topic=test
b1.sinks.k1.brokerList = localhost:9092
kafka topic一个分区
被采集数据文件大小:1.3GB
Flume日志信息,大约需要76s
2015-10-28 20:19:59,185 INFO kafka.client.ClientUtils$: Fetching metadata from broker id:0,host:localhost,port:9092 with correlation id 0 for 1 topic(s) Set(test)
2015-10-28 20:19:59,189 INFO kafka.producer.SyncProducer: Connected to localhost:9092 for producing
2015-10-28 20:19:59,232 INFO kafka.producer.SyncProducer: Disconnecting from localhost:9092
2015-10-28 20:19:59,424 INFO kafka.producer.SyncProducer: Connected to m103:9092 for producing
2015-10-28 20:21:15,416 INFO org.apache.flume.client.avro.ReliableSpoolingFileEventReader: Preparing to move file /tmp/flumeSpool/T_RZ_XWXX.1G to /tmp/flumeSpool/T_RZ_XWXX.1G.COMPLETED
|
|