当前位置: 首页 > news >正文

珠海手机网站建设费用深圳高端网站建设公司

珠海手机网站建设费用,深圳高端网站建设公司,个人年终工作总结报告,吉林手机版建站系统价格前言 本节内容我们主要介绍一下Flume数据采集过程中,如何把多个数据采集点的数据聚合到一个地方供分析使用。我们使用hadoop101服务器采集nc数据,hadoop102采集文件数据,将hadoop101和hadoop102服务器采集的数据聚合到hadoop103服务器输出到…

前言

本节内容我们主要介绍一下Flume数据采集过程中,如何把多个数据采集点的数据聚合到一个地方供分析使用。我们使用hadoop101服务器采集nc数据,hadoop102采集文件数据,将hadoop101和hadoop102服务器采集的数据聚合到hadoop103服务器输出到控制台。其整体架构如下:

正文

①在hadoop101服务器的/opt/module/apache-flume-1.9.0/job/group1目录下创建job-nc-flume-avro.conf配置文件,用于监控nc发送的数据,通过avro sink传输到avro source

- job-nc-flume-avro.conf配置文件

# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /opt/module/apache-flume-1.9.0/a.log
a1.sources.r1.shell = /bin/bash -c
# Describe the sink
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = hadoop103
a1.sinks.k1.port = 4141
# Describe the channel
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

②在hadoop102服务器的/opt/module/apache-flume-1.9.0/job/group1目录下创建job-file-flume-avro.conf配置文件,用于监控目录/opt/module/apache-flume-1.9.0/a.log的数据,通过avro sink传输到avro source 

- job-file-flume-avro.conf配置文件

# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = exec
a1.sources.r1.command = tail -F /opt/module/apache-flume-1.9.0/a.log
a1.sources.r1.shell = /bin/bash -c
# Describe the sink
a1.sinks.k1.type = avro
a1.sinks.k1.hostname = hadoop103
a1.sinks.k1.port = 4141
# Describe the channel
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

③在hadoop103服务器的/opt/module/apache-flume-1.9.0/job/group1目录下创建job-avro-flume-console.conf配置文件,用户将avro source聚合的数据输出到控制台

- job-avro-flume-console.conf配置文件

# Name the components on this agent
a1.sources = r1
a1.sinks = k1
a1.channels = c1
# Describe/configure the source
a1.sources.r1.type = avro
a1.sources.r1.bind = hadoop103
a1.sources.r1.port = 4141
# Describe the sink
# Describe the sink
a1.sinks.k1.type = logger
# Describe the channel
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

④ 在hadoop103启动job-avro-flume-console.conf任务

- 命令:

bin/flume-ng agent -c conf/ -n a1 -f job/group1/job-avro-flume-console.conf -Dflume.root.logger=INFO,console

⑤在hadoop101启动job-nc-flume-avro.conf任务

- 命令:

bin/flume-ng agent -c conf/ -n a1 -f job/group1/job-nc-flume-avro.conf -Dflume.root.logger=INFO,console

⑥在hadoop102启动job-file-flume-avro.conf任务

- 命令:

bin/flume-ng agent -c conf/ -n a1 -f job/group1/job-file-flume-avro.conf -Dflume.root.logger=INFO,console

⑦使用nc工具向hadoop101发送数据

- nc发送数据

- hadoop103接收到数据

⑧在hadoop102的a.log中写入数据

- 写入数据

-  hadoop103接收到数据

结语

flume数据聚合就是为了将具有相同属性的数据聚合到一起,便于管理、分析、统计等。至此,关于Flume数据采集之采集数据聚合案例实战到这里就结束了,我们下期见。。。。。。

http://www.yayakq.cn/news/45196/

相关文章:

  • 咨询型网站wordpress 会员充值
  • 文案网站编辑怎么做宁波网站建设制作推广
  • 免费的网站加速器网站推广的英文content
  • 培训教育的网站怎么做直播网站创做
  • 微信公众号做留言网站网站怎么做关键词搜索
  • 做网站免费搭建国产apple
  • 家居设计网站模板建设公司经营范围
  • 如何在网站做qq群链接给我一个网页
  • 怎么推广自己做的网站建设银行app下载手机银行
  • 怎么检查网站有没有做跳转搜索引擎优化的对比
  • 企业门户网站方案网站建设代理都有哪些
  • 南昌百度网站快速排名烟台网站建设询问臻动传媒
  • win10虚拟目录 做网站网站备案是自己可以做吗
  • 网站和网页的区别oa软件下载
  • 建设网站需申请什么手续asp.net是做网站的吗
  • 网络教育网站建设电商小程序免费开店
  • 网站开发顶岗报告昆山网页网站制作
  • 做网站放什么wordpress虚拟物品销售
  • 适用于建设微型网站提供手机网站建设推荐
  • 类似织梦的建站cmswordpress 命令执行
  • 利用免费网站做SEO网页设计html实验总结
  • wordpress建设资源站点插件制作物流网站
  • 生成html网站地图c 网站开发案例
  • 设计网站一般要多少钱python app开发
  • 龙岩网站建设设计制作网站开发课程设计
  • 珠海知名网站芜湖网站 建设
  • 有固定ip怎么建设网站产品网站建设公司
  • 济南网站制作设计公司佛山网络公司 乐云seo
  • 杭州网站设计公司哪家好网站模板包含哪些内容
  • 网站推广软件哪个好wordpress 评论头像