当前位置:网站首页>Nifi fast installation and file synchronization
Nifi fast installation and file synchronization
2022-04-23 16:43:00 【A hundred nights】
Nifi In short, it is a data pull 、 A system for data processing and data distribution .
Nifi Running requires JVM, need jdk,nifi 1.x The above needs jdk8 above ,0.x need jdk7 above .
This article is in Centos 7 Install in nifi-1.8.0-bin.tar.gz
Download address :nifi.apache.org/download (xx.tar.gz yes Linux edition ,xx.zip yes Windows edition )
User manual :http://nifi.apache.org/docs.html
install
1. Download installation package
wget -b http://mirror.bit.edu.cn/apache/nifi/1.8.0/nifi-1.8.0-bin.tar.gz
2. Unzip the installation package
tar -zxf nifi-1.8.0-bin.tar.gz
3. modify nifi/conf Under the table of contents nifi.properties file
Modify host number and port number
nifi.web.http.host= Host number
nifi.web.http.port= Service port number [ Customize ]
# web properties #
nifi.web.war.directory=./lib
nifi.web.http.host=192.168.197.106 // Change to your own host ip
nifi.web.http.port=8182 // Default 8080, Prevent port occupation , It can be modified to other ports
nifi.web.http.network.interface.default=
nifi.web.https.host=
nifi.web.https.port=
nifi.web.https.network.interface.default=
nifi.web.jetty.working.directory=./work/jetty
nifi.web.jetty.threads=200
nifi.web.max.header.size=16 KB
nifi.web.proxy.context.path=
nifi.web.proxy.host=
4. Service startup
Get into nifi/bin Catalog , function nifi.sh file , The front and rear operation commands are as follows
./nifi.sh run // The front desk operation
./nifi.sh start // Background operation
The following prompt appears: the service is started successfully ,
Java home: /opt/soft/jdk180
NiFi home: /opt/soft/nifi-1.8.0
Bootstrap Config File: /opt/soft/nifi-1.8.0/conf/bootstrap.conf
see nifi Start state
./nifi.sh stauts
-----------------------------------------------------------------------------------------------------------
Java home: /opt/soft/jdk180
NiFi home: /opt/soft/nifi-1.8.0
Bootstrap Config File: /opt/soft/nifi-1.8.0/conf/bootstrap.conf
2021-05-01 17:24:49,589 INFO [main] org.apache.nifi.bootstrap.Command Apache NiFi is currently running, listening to Bootstrap on port 43069, PID=2099
5. Service closing
If it's a foreground operation , direct Ctrl+C Exit Service .
If it's running in the background , Access to nifi/bin Catalog , Execute the following command
./nifi.sh stop
6.web UI
Service startup 1-5 Minutes later , Can open web see ,http:192.168.197.106:8182/nifi, As shown in the figure .
Use
File synchronization
Realization : take /opt/act.log Synchronize file contents to /opt/data Empty directory , And keep the source file .
Processor required GetFile ( Read and delete files ) + PutFile( Save the file )
Drag and drop a... In the toolbar Processor Go to the canvas , Input ’local’, choice ’GetFile’ processor , Click on ADD Add to canvas , The same operation creates a ’PutFile’ processor .
To configure GetFile processor
1. Select processor , Right click selection “configure”,“settings” The admission “success”, Automatically terminate the relationship .
2.“properties” Attribute configuration .
- Input Directory: Enter the source directory
- File Filter: File filter
- Keep Source File: Do you want to keep the source file , Default false
- Recurse Subdirectories: Whether to pull the files in the subdirectory , Default true
After configuration , Click on ‘apply’ Save application .
To configure PutFile processor
1. Select processor , Right click selection “configure”, stay “settings” The admission “failure” and “success”.
2.“properties” Attribute configuration
- Directory: Target directory
- Conflict Resolution Strategy: Specify the operation after a file with the same name exists . Optional value :replace Replace existing files ,fail Execution failure , Don't generate files ,ignore Ignore .
- Create Missing Directories: Specify whether the target directory does not exist or not to create a directory . Optional value :true newly build ,false No new .
After configuration , Click on ‘apply’ Save application .
Connecting the processor
1. Move the mouse to ’GetFile’ On , The following arrow appears , Click and drag to ’PutFile’ On .
2. To configure “Settings”, Set up name:demo1, Increase priority ,‘FirstInFirstOutPrioritizer’. Click on ’add’, Create connection .
3. Right click the canvas and select ’Start‘, Visible data flow .GetFile Read file output 7.36KB,PutFile Write files to the target directory ,7.36KB, Also visible in the target directory act.log file .
版权声明
本文为[A hundred nights]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231401521069.html
边栏推荐
- 计组 | 【七 输入/输出系统】知识点与例题
- NVIDIA graphics card driver error
- Use if else to judge in sail software - use the title condition to judge
- File system read and write performance test practice
- MySQL master-slave synchronization pit avoidance version tutorial
- Use case execution of robot framework
- 昆腾全双工数字无线收发芯片KT1605/KT1606/KT1607/KT1608适用对讲机方案
- PHP 零基础入门笔记(13):数组相关函数
- MySql主从复制
- Modify the test case name generated by DDT
猜你喜欢
LVM and disk quota
Mock test
1959年高考数学真题
Installation and management procedures
Set cell filling and ranking method according to the size of the value in the soft report
RAID磁盘阵列与RAID5的创建
DDT + Excel for interface test
JIRA screenshot
Creation of RAID disk array and RAID5
TypeError: set_figure_params() got an unexpected keyword argument ‘figsize‘
随机推荐
Use if else to judge in sail software - use the title condition to judge
最詳細的背包問題!!!
昆腾全双工数字无线收发芯片KT1605/KT1606/KT1607/KT1608适用对讲机方案
ESXi封装网卡驱动
Real time operation of vim editor
LVM与磁盘配额
文件操作详解(2)
Nacos detailed explanation, something
MySQL personal learning summary
MySQL master-slave replication
Postman batch production body information (realize batch modification of data)
PHP 零基础入门笔记(13):数组相关函数
Summary according to classification in sail software
计算饼状图百分比
Gartner announces emerging technology research: insight into the meta universe
浅谈 NFT项目的价值、破发、收割之争
Esxi encapsulated network card driver
Cartoon: what are IAAs, PAAS, SaaS?
UWA Pipeline 功能详解|可视化配置自动测试
English | day15, 16 x sentence true research daily sentence (clause disconnection, modification)