目录
百战程序员,全站22050+开发课程+文档 ,学习精选优质好课快人一步!观看视频 快捷键ALT+N

大数据全系列 教程

1869个小节阅读:466.8k

收藏
全部开发者教程

408考研

JAVA全系列 教程

面向对象的程序设计语言

Python全系列 教程

Python3.x版本,未来主流的版本

人工智能 教程

顺势而为,AI创新未来

大厂算法 教程

算法,程序员自我提升必经之路

C++ 教程

一门通用计算机编程语言

微服务 教程

目前业界流行的框架组合

web前端全系列 教程

通向WEB技术世界的钥匙

大数据全系列 教程

站在云端操控万千数据

AIGC全能工具班

A

A A

White Night

阅读(259)
赞(0)

2.4 Source实战

2.4.1 Exec Source案例

Exec source在启动时运行给定的Unix命令,并期望该进程继续在标准输出上生成数据。 如果进程出于任何原因退出,源也将退出,不会产生进一步的数据。 这意味着配置,如cat[命名管道]或tail-F[文件]将产生所需的结果。

参数如下:

Property NameDefaultDescription
channels 
typeThe component type name, needs to be exec
commandThe command to execute
shellA shell invocation used to run the command. e.g. /bin/sh -c. Required only for commands relying on shell features like wildcards, back ticks, pipes etc.
batchSize20The max number of lines to read and send to the channel at a time
batchTimeout3000Amount of time (in milliseconds) to wait, if the buffer size was not reached, before data is pushed downstream

具体操作步骤如下:

  1. 先停到node3上的flume。
  2. 将node3上netcat-logger.conf拷贝exec-logger.conf,并修改:

  1. 启动flume

  2. 在node3的另外的一个连接窗口向/root/log.txt文件中不断添加文本,观察flume日志的变化

     

北京市昌平区回龙观镇南店村综合商业楼2楼226室

©2014-2023 百战卓越(北京)科技有限公司 All Rights Reserved.

京ICP备14032124号-2