flume的几种使用方式

    近期,听了王家林老师的2016年大数据Spark“蘑菇云”行动,需要将flume,kafka和Spark streaming进行整合。感觉一时难以上手,先从简单着手吧:

只为您设计更接底气、较有营销力的好网站,将营销策划与网页设计互相结合的专业机构,全网整合营销推广公司中较早掌握H5响应式网站技术的机构。一个好的品牌网站制作,不能只是一张名片,茫茫网海,想要快速吸引到您客户的眼球,必须全方位的展现出企业突出的优势,以求达到主动营销的效果,最终促成成交!

一、netcat方式+Logger日志显示

Flume 配置文件如下:

# example.conf: A single-node Flume configuration

# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1

# Describe/configure the source
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

# Describe the sink
a1.sinks.k1.type = logger

# Use a channel which buffers events in memory
a1.channels.c1.type = memory
a1.channels.c1.capacity = 1000
a1.channels.c1.transactionCapacity = 100

# Bind the source and sink to the channel
a1.sources.r1.channels = c1
a1.sinks.k1.channel = c1

flume的启动:

$ bin/flume-ng agent --conf conf --conf-file example.conf --name a1 -Dflume.root.logger=INFO,console

触发数据:

telnet localhost 44444

会在flume的控制台出现同样的字符。

二、flume级联方式

通过avro,在两台机器间传送数据,源头为netcat

当前标题:flume的几种使用方式
新闻来源:https://www.cdcxhl.com/article30/pijdso.html

成都网站建设公司_创新互联,为您提供网站制作品牌网站设计自适应网站全网营销推广网站设计公司网站改版

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

h5响应式网站建设