1.flume之avro
2.flume之exec
[root@hadoop101 conf]# ../bin/flume-ng agent --conf conf --conf-file template-exec.conf --name a1 -Dflume.root.logger=INFO,console
3.flume之Spooling Directory
[root@hadoop101 conf]# cp template-avro.conf template-spooling.conf
[root@hadoop101 conf]# vi template-spooling.conf
配置内容如下:
[root@hadoop101 conf]# ../bin/flume-ng agent --conf conf --conf-file template-spooling.conf --name a1 -Dflume.root.logger=INFO,console
4.flume之netcat source
[root@hadoop101 conf]# cp template-avro.conf template-netcat.conf
[root@hadoop101 conf]# vi template-netcat.conf
配置内容如下:
[root@hadoop101 conf]# ../bin/flume-ng agent --conf conf --conf-file template-netcat.conf --name a1 -Dflume.root.logger=INFO,console
5.Sequence Generator Source --序列发生源
[root@hadoop101 conf]# cp template-avro.conf template-sequence.conf
[root@hadoop101 conf]# vi template-sequence.conf
[root@hadoop101 conf]# ../bin/flume-ng agent --conf conf --conf-file template-sequence.conf --name a1 -Dflume.root.logger=INFO,console
6.HTTP source
[root@hadoop101 conf]# cp template-avro.conf template-http.conf
[root@hadoop101 conf]# vi template-http.conf
[root@hadoop101 conf] con ../bin/flume-ng agent --conf conf --conf-file template-http.conf --name a1 -Dflume.root.logger=INFO,console
[root@hadoop101 conf]# curl -X POST -d '[{"headers":{"a":"a1","b":"b1"},"body":"hello http-flume"}]'http://0.0.0.0:8888
再另开一个页面