F:\apache-flume-1.9.0-bin\test\mysql2kafka.conf
a1.channels = ch-1
a1.sources = src-1
a1.sinks = k1
###########sql source#################
# For each one of the sources, the type is defined
a1.sources.src-1.type = org.keedio.flume.source.SQLSource
a1.sources.src-1.hibernate.connection.url = jdbc:mysql://xxxxx:19860/sms
# Hibernate Database connection properties
a1.sources.src-1.hibernate.connection.user = root
a1.sources.src-1.hibernate.connection.password = *
a1.sources.src-1.hibernate.connection.autocommit = true
a1.sources.src-1.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
a1.sources.src-1.hibernate.connection.driver_class = com.mysql.jdbc.Driver
a1.sources.src-1.run.query.delay=5000
a1.sources.src-1.status.file.path = ./
a1.sources.src-1.status.file.name = sqlSource.status
a1.sources.src-1.delimiter.entry = |
# Custom query
a1.sources.src-1.start.from = 0
a1.sources.src-1.custom.query = SELECT putintime,"园区A" as yuanqu,"设备B" as shebei,msgcont FROM 201801cont where putintime> $@$ ORDER BY putintime DESC
a1.sources.src-1.batch.size = 100
a1.sources.src-1.max.rows = 200
a1.sources.src-1.hibernate.connection.provider_class = org.hibernate.connection.C3P0ConnectionProvider
a1.sources.src-1.hibernate.c3p0.min_size=1
a1.sources.src-1.hibernate.c3p0.max_size=10
a1.sources.src-1.delimiter.entry = ;
a1.sources.src-1.enclose.by.quotes = false
################################################################
a1.channels.ch-1.type = memory
a1.channels.ch-1.capacity = 10000
a1.channels.ch-1.transactionCapacity = 10000
a1.channels.ch-1.byteCapacityBufferPercentage = 20
a1.channels.ch-1.byteCapacity = 800000################################################################
a1.sinks.k1.type = org.apache.flume.sink.kafka.KafkaSink
a1.sinks.k1.topic = flumetestmsg
a1.sinks.k1.brokerList = 10.255.30.132:9092
a1.sinks.k1.requiredAcks = 1
a1.sinks.k1.batchSize = 20
a1.sinks.k1.channel = c1a1.sinks.k1.channel = ch-1
a1.sources.src-1.channels=ch-1
flume-ng agent -n a1 -c conf -f test\mysql2kafka.conf
惠惠街 每天千款优惠劵秒杀