Flume使用namespace操作
来源:互联网 发布:美甲软件 编辑:程序博客网 时间:2024/05/16 13:56
参考:
(1)官方文档:http://flume.apache.org/FlumeUserGuide.html
1、举例
(1)编辑flume-conf.properties文件
内容如下:
# 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 = exec
a1.sources.r1.command= tail -F /home/jifei_yang/testflume/data_dir/taildata/tailflume.txt
# Describe the sink
a1.sinks.k1.type = hdfs
#hdfs sink间隔多长将临时文件滚动成最终目标文件,单位:秒;
a1.sinks.k1.hdfs.rollInterval= 60
a1.sinks.k1.hdfs.rollSize= 0
a1.sinks.k1.hdfs.rollCount= 0
a1.sinks.k1.hdfs.path= hdfs://nameservice1test/user/piqiang_wei/testflume/%Y-%m-%d-%H
a1.sinks.k1.hdfs.useLocalTimeStamp= true
a1.sinks.k1.hdfs.fileType= DataStream
#当目前被打开的临时文件在该参数指定的时间(秒)内,没有任何数据写入,
#则将该临时文件关闭并重命名成目标文件;
a1.sinks.k1.hdfs.idleTimeout= 30
a1.sinks.k1.hdfs.kerberosPrincipal= log2hadoop
a1.sinks.k1.hdfs.kerberosKeytab= /home/jifei_yang/testflume/conf/log2hadoop_bgp_apple.keytab
# 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
2、注意
(1)、红色是需要在原来的基础上修改的地方
将原来的ip:8020-----》nameservice1test(命名空间)
(2)、提交命令
flume-ng agent --conf /home/jifei_yang/testflume/configs/piqiang_wei --conf-file /home/jifei_yang/testflume/my_properties/flume-conf.properties --name a1 -Dflume.root.logger=DEBUG,console
红色部分是新添加的配置目录,需要创建!
(3)、在目录下添加xml文件
目录:/home/jifei_yang/testflume/configs/piqiang_wei
文件:
这些文件是在namenode所在机器的目录(/etc/Hadoop/conf)下获取!
注:测试通过,可以按需修改使用!
- Flume使用namespace操作
- flume操作
- nameSpace 使用
- namespace 使用
- namespace使用
- flume使用
- flume使用
- Flume使用
- C# Namespace详解-Namespace使用
- flume学习:Flume Interceptors的使用
- C++namespace的使用
- 合理使用namespace
- Struts2 namespace的使用
- 需善于使用namespace
- namespace 使用简单示例
- C++ namespace 使用
- C++ namespace的使用
- namespace 真正的使用
- this的理解
- 洛谷 P3225 [HNOI2012]矿场搭建
- Java 核心基础技术(二)
- UVA
- 一起做RGB-D SLAM (2)
- Flume使用namespace操作
- 混合高斯模型的EM求解(Mixtures of Gaussians)及Python实现源码
- uploadfive详解
- 【cocos2dx】TMXTiledMap增加碰撞体
- 骄傲的代价
- sql优化思路整理
- View 绘制流程
- android UiAutomator修改UiAutomatorHelper生成测试报告
- maven常用命令