首页 > 其他 > 详细

Flume

时间:2014-01-30 11:04:57      阅读:468      评论:0      收藏:0      [点我收藏+]

Step1.download tar packages from apache website.

Step2.extract the file and set the environment.

Vim /etc/profile

Export FLUME_HOME=/home/hadoop/flume1.4

Export PATH=$PATH:$FLUME_HOME/bin

Source /etc/profile

Step3:

Start a agent to put dir to avro.

flume-ng agent -n agent1 -f confs/avrotest.conf

flume-ng avro-client -H namenode -p 55555 -F /home/hadoop/data/xml/*.*

flume-ng avro-client -H namenode -p 55555 -F /home/hadoop/data/xml/*.zip

传输的过程,先把数据传送到avro形式,然后再使用avro source - hdfs sink.

先开启hdfs conf的flume,然后再开启avro source的conf.

flume-ng agent -n agent2 -f $FLUME_HOME/confs/avrosink.conf

flume-ng agent -n agent3 -f $FLUME_HOME/confs/hdfssink.conf

   

flume-ng agent -n agent1 -f $FLUME_HOME/confs/avrotest.conf

   

./flume-ng agent -n agent1 -f /home/yaxiaohu/flumeconf/flume-dest.conf

./flume-ng agent -n agent -f /home/yaxiaohu/flumeconf/flume-source.conf

./flume-ng agent -n agent-1 -f /home/yaxiaohu/flumeconf/evantest.conf

   

Actually it might be tricky to use the directory spooling source to read a
compressed archive. It‘s possible, but you would definitely need to write
your own deserializer.

Flume is an event-oriented streaming system, it‘s not really optimized to
be a plain file transfer mechanism like FTP.

 

Flume

原文:http://www.cnblogs.com/huaxiaoyao/p/3536457.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!