Flume入门安装部署

1.参数配置

Flume的安装非常简单,只需要解压即可,当然,前提是已有hadoop环境

上传安装包到数据源所在节点上

然后解压  tar -zxvf apache-flume-1.8.0-bin.tar.gz

  • 根据数据采集的需求配置采集方案,描述在配置文件中(文件名可任意自定义)
  • 指定采集方案配置文件,在相应的节点上启动flume agen

2.启动命令

bin/flume-ng agent -c ./conf

commands:

  help                      显示本帮助信息

  agent                     启动一个agent进程

  avro-client                 启动一个用于测试avro source的客户端(能够发送avro序列化流)

  version                    显示当前flume的版本信息

 

global options:   全局通用选项

  --conf,-c <conf>          指定flume的系统配置文件所在目录

  --classpath,-C <cp>        添加额外的jar路径

  --dryrun,-d               不去真实启动flume agent,而是打印当前命令

  --plugins-path <dirs>       指定插件(jar)所在路径

 

  -Dproperty=value          传入java环境参数

  -Xproperty=value          传入所需的JVM配置参数

 

agent options:

  --name,-n <name>          agent的别名(在用户采集方案配置文件中)

  --conf-file,-f <file>          指定用户采集方案配置文件的路径

  --zkConnString,-z <str>      指定zookeeper的连接地址

  --zkBasePath,-p <path>      指定用户配置文件所在的zookeeper path,比如:/flume/config

  --no-reload-conf            关闭配置文件动态加载

  --help,-h                   display help text

 

avro-client options:

  --rpcProps,-P <file>   RPC client properties file with server connection params

  --host,-H <host>     avro序列化数据所要发往的目标主机(avro source所在机器)

  --port,-p <port>      avro序列化数据所要发往的目标主机的端口号

  --dirname <dir>      需要被序列化发走的数据所在目录(提前准备好测试数据放在一个文件中)

  --filename,-F <file>   需要被序列化发走的数据所在文件(default: std input)

  --headerFile,-R <file>  存储header key-value的文件

  --help,-h             帮助信息

 

  Either --rpcProps or both --host and --port must be specified.

 

Note that if <conf> directory is specified, then it is always included first

in the classpath.

开启内置监控功能

-Dflume.monitoring.type=http -Dflume.monitoring.port=34545

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值