Flume 官网生肉变熟肉过程--测试你的Flume 是否和HDFS能正常交互

测试专用Demo

修改Flume 的配置文件 我用的CDH 版本的 CM (Clouder Manager) 来修改的配置进行的测试:

1、打开 Flume

 

 

2、点击配置修改配置文件

 

 

3、粘贴测试Demo内容到 

Agent Default Group 

# 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    source 配置
a1.sources.r1.type = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

# Describe the sink					sink 类型配置
a1.sinks.k1.type = logger

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

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

 

4、上agent 节点执行

查看agnet 通过 Flume 下的 实例 查看

yum -y install telnet-0.17-64.el7.x86_64

telnet localhost 44444

5、观察Hdfs 是否有 Flume 文件生成

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值