当前位置:网站首页>Flume common commands and basic operations
Flume common commands and basic operations
2022-07-05 12:33:00 【JKing_ one hundred and sixty-eight】
flume There are three major categories of components :
source Components , specify data source channel Components , As a cache , Connect source and sink sink Components , Specify the data destination
Case study 1: Use flume Acquisition from 44444 Data from port
1) Ready to configure
# Declare three components a1 = agent1
a1.sources = r1
a1.channels = c1
a1.sinks = k1
# Definition source Information
# r1 type , What kind of data to monitor
a1.sources.r1.type = netcat
# monitor ip
a1.sources.r1.bind = 192.168.88.161
# Port number
a1.sources.r1.port = 44444
# r1 Connect to c1
a1.sources.r1.channels = c1
# Definition channel Information
a1.channels.c1.type = memory
# Definition sink Information
# Set the type Print... In the terminal
a1.sinks.k1.type = logger
# To which channel
a1.sinks.k1.channel = c12) Write configuration
1) open flume The installation directorycd /export/server/apache-flume-1.9.0-bin/conf2) Create a profiletouch intro_source_netcat_sink_logger.conf3) hold Top configuration Write to file ( Remember to delete the Chinese Notes )vim intro_source_netcat_sink_logger.conf
3) start-up Flume
flume-ng agent -f /export/server/apache-flume-1.9.0-bin/conf/intro_source_netcat_sink_logger.conf -n a1 -Dflume.root.logger=INFO,console4) towards 44444 Port send data
# install telnet
yum install telnet
# towards 44444 Port send data
telnet 192.168.88.161 44444Case study 2: Use flume Acquisition from kafka The data of
1) Ready to configure
a1.sources = r1
a1.channels = c1
a1.sinks = k1
a1.sources.r1.type = TAILDIR
a1.sources.r1.channels = c1
a1.sources.r1.positionFile = /export/data/momo_data/taildir_position.json
a1.sources.r1.filegroups = f1
a1.sources.r1.filegroups.f1 = /export/data/momo_data/MOMO_DATA.dat
a1.channels.c1.type = memory
a1.sinks.k1.type=org.apache.flume.sink.kafka.KafkaSink
a1.sinks.k1.kafka.bootstrap.servers=node1:9092,node2:9092,node3:9092
a1.sinks.k1.kafka.topic=MOMO_MSG
a1.sinks.k1.channel=c12) Write configuration
1) open flume The installation directorycd /export/server/apache-flume-1.9.0-bin/conf2) Create a profiletouch intro_source_netcat_sink_logger.conf3) hold Top configuration Write to file ( Remember to delete the Chinese Notes )vim intro_source_netcat_sink_logger.conf
3) Use flume Acquisition from kafka The data of
1) start-up kafkanohup kafka-server-start.sh /export/server/kafka_2.12-2.4.1/config/server.properties&2) establish topicskafka-topics.sh --create --bootstrap-server node1.itcast.cn:9092 --topic MOMO_MSG --partitions 3 --replication-factor 23) start-up flumeflume-ng agent -f /export/server/apache-flume-1.9.0-bin/conf/source_taildir_sink_kafka.conf -n a1 -Dflume.root.logger=INFO,console4) start-up kafka consumer Through this, the consumer checks that the data is actually written to this MOMO_MSGkafka-console-consumer.sh --bootstrap-server node1.itcast.cn:9092 --topic MOMO_MSG5) Start production data jarcd /export/data/momo_init/ java -jar MoMo_DataGen.jar MoMo_Data.xlsx /export/data/momo_data/ 1000
边栏推荐
- About cache exceptions: solutions for cache avalanche, breakdown, and penetration
- Pytoch through datasets Imagefolder loads datasets directly from files
- ZABBIX customized monitoring disk IO performance
- Get the variable address of structure member in C language
- Yum only downloads the RPM package of the software to the specified directory without installing it
- Reinforcement learning - learning notes 3 | strategic learning
- MySQL installation, Windows version
- GPON technical standard analysis I
- Introduction to GNN
- Embedded software architecture design - message interaction
猜你喜欢

MySQL storage engine

Detailed steps for upgrading window mysql5.5 to 5.7.36

Summary of C language learning problems (VS)

Yum only downloads the RPM package of the software to the specified directory without installing it

16 channel water lamp experiment based on Proteus (assembly language)

Pytorch two-layer loop to realize the segmentation of large pictures

强化学习-学习笔记3 | 策略学习

Tabbar configuration at the bottom of wechat applet

About cache exceptions: solutions for cache avalanche, breakdown, and penetration

Storage Basics
随机推荐
MVVM framework part I lifecycle
Video networkState 属性
Learning items
About cache exceptions: solutions for cache avalanche, breakdown, and penetration
Clear neo4j database data
Pytoch counts the number of the same elements in the tensor
byte2String、string2Byte
End to end neural network
ZABBIX agent2 installation
Pytoch monolayer bidirectional_ LSTM implements MNIST and fashionmnist data classification
Yum only downloads the RPM package of the software to the specified directory without installing it
Select drop-down box realizes three-level linkage of provinces and cities in China
7月华清学习-1
Swift - add navigation bar
Automated test lifecycle
Resnet+attention project complete code learning
Complete activity switching according to sliding
Differences between IPv6 and IPv4 three departments including the office of network information technology promote IPv6 scale deployment
Get data from the database when using JMeter for database assertion
Two minutes will take you to quickly master the project structure, resources, dependencies and localization of flutter