1.下载编译flume-ng-sql-source 下载地址:https://github.com/keedio/flume-ng-sql-source.git
安装说明文档编译和拷贝jar包
2.编写flume-ng 配置文件
1.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://172.16.43.21:3306/test
# Hibernate Database connection properties
a1.sources.src-1.hibernate.connection.user = hadoop
a1.sources.src-1.hibernate.connection.password = hadoop
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=50