window下安装flume

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013086062/article/details/78589341
本教程是在已经安装了jdk1.8以后的基础上进行的操作.
3.在conf文件夹中新建example.conf文件
# 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 = netcat
a1.sources.r1.bind = localhost
a1.sources.r1.port = 44444

# Describe the sink
a1.sinks.k1.type = logger

# 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

4.打开cmd进入到apache-flume-1.6.0-bin\bin目录下,运行如下命令
flume-ng.cmd agent -conf ../conf -conf-file ../conf/example.conf -name a1 -property flume.root.logger=INFO,console

5.在另一个cmd窗口中,输入telnet 44444,如果连接成功,将会进入可输入状态,输入任何字符,可以在第一个cmd的窗口中看到输入的内容.


其实在windows安装flume是很简单的,但是在安装的时候,遇到了下面的问题:
处理 -File“E:\Program”失败,因为该文件不具有 '.ps1' 扩展名。请指定一个有效的 Windows PowerShell 脚本文件名,然后重试。
解决方法:
将flume的安装包放到磁盘的根目录下.

最后:如果telnet服务不能使用,使用https://jingyan.baidu.com/article/870c6fc3cd6fa9b03fe4bee4.html去开启telnet服务.


猜你喜欢

转载自blog.csdn.net/u013086062/article/details/78589341