Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install and test the stand-alone version of Flume

Shulou Source: shulou.com Published: 2022-06-01 02:18:48 10月03日 Update

This article is about how to install and test a stand-alone version of Flume. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

# cd / usr/local/

# mkdir flume

# cd flume

Download the compressed package

# wget http://archive.cloudera.com/cdh6/cdh/5/flume-ng-1.6.0-cdh6.7.1.tar.gz

Decompression

# tar zxvf flume-ng-1.6.0-cdh6.7.1.tar.gz

Configure environment variables:

# vim / ect/profile

Export FLUME_HOME=/home/hadoop/app/cdh/flume-1.6.0-cdh6.7.1

Export PATH=$PATH:$FLUME_HOME/bin

Version verification:

# flume-ng version

Cd / usr/local/flume/example/

# cp / usr/local/flume/conf/flume-conf.properties.template / usr/local/flume/example/netcat.conf

/ / configure netcat.conf to obtain data input by another terminal in real time

# vim example/netcat.conf

# 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 that 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

/ / run FlumeAgent to listen on port 44444 of this machine

Flume-ng agent-c / usr/local/flume/conf/-f / usr/local/flume/example/netcat.conf-n A1-Dflume.root.logger=INFO,console

/ / Open another terminal, log in to 44444 of localhost through telnet, and enter test data

# telnet localhost 44444

/ / View the data collected by flume

Thank you for reading! This is the end of the article on "how to install and test the stand-alone version of Flume". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Testing data stand-alone stand-alone content more articles terminals input configuration good practical variables real-time situation articles versions environment see knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Linux Xiaomi Shulou Tech Info Microsoft OPPO Reno