apache-nifi-tutorial
apache-nifi-tutorial
Basically, to learn about Apache NiFi in order to do a comparison with other tool:
About me
You can read more about me on my cv.
1
Videos with a technical background
Prior to starting my own labs, I saw some introductory videos (available on YouTube):
• "Matt Burgess discusses Open Source Software & Apache nifi" (yA)
2
Lab 1: Running Apache NiFi inside a Docker
container
For me, the best way to start learning a new technology is by running all the stuff related to them
inside a Docker container. By this way, I can abstract myself about the related installation
procedures and go directly to the point.
So, In this tutorial, I present the steps to work with Apache NiFi using Docker.
Prerequisites
1. Docker installed.
Start/Restart
First start:
Restart (if was started any time before with the command below and stopped):
Access to the UI
Open http://localhost:9090/nifi
Status
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
3a506cfec5ab apache/nifi:latest "/bin/sh -c ${NIFI_B…" 10 hours ago
Up 10 hours 8080/tcp, 8443/tcp, 10000/tcp, 0.0.0.0:9090->9090/tcp nifi
Stop
3
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED
STATUS PORTS NAMES
3a506cfec5ab apache/nifi:latest "/bin/sh -c ${NIFI_B…" 10 hours ago
Exited (137) 33 seconds ago nifi
4
Lab 2: Running Apache NiFi locally
Prerequisites
1. Java installed.
Installation
Start
$ nifi
Usage nifi {start|stop|run|restart|status|dump|install}
$ nifi start
Access to the UI
Open http://localhost:8080/nifi/
Status
$ nifi status
5
Stop
$ nifi stop
6
Lab 3: Building a simple Data Flow
Prerequisites
1. Docker installed.
7
Click on Add and the processor will be added to the canvas:
8
Step 2 - Adjust the propertie File Size to 2KB:
9
Step 4 - Add and configure processor 2 (Putfile)
Drag another processor into canvas. Search for PutFile:
10
Configure the Directory property to /tmp/nifi.
Configure Automatically Terminate RelationShips by checking the boxes failure and success.
11
Step 5 - Connect the processors
From GenerateFile to Putfile:
12
A connection will be create:
13
Step 6 - Start the processors
Click Ctrl to select both processors and start it.
14
Type the following command to see a list of the 9 generated files. This list will be actualized second
by second. As we configure in NiFi, a new file will be generated on every 5 seconds.
Conclusions
• NiFi UI is very simple and intuitive.
15
All references
Apache NiFi
GitHub
• apache/nifi
• nifi-docker/dockerhub
Documentation
• Apache NiFi User Guide
Other
YouTube videos
• yA: Matt Burgess discusses Open Source Software & Apache nifi
GitHub
• hortonworks-gallery/nifi-templates
• ndstreev/nifi-processor-examples
• aperepel/nifi-api-deploy
Community Forums/Meetups
• http://apache-nifi.1125220.n5.nabble.com/
• https://community.hortonworks.com/topics/Nifi.html
Stack Overflow
• automating NIFI template deployment
Books
• NiFi Fundamentals & Cookbook: 9-Use cases, covering various scenarios
Articles/ examples
• Getting Started
16
◦ NiFi page at Silver Cloud Computing
◦ Building a Custom Processor in Apache NiFi 1.5 for TensorFlow Using the Java API
• Automation/ Deployment
◦ Best practices for using Apache NiFi in real world projects - 3 takeaways
◦ Best practices and lessons learnt from Running Apache NiFi at Renault
• Architecture
• Events/ Meetups
◦ https://www.meetup.com/en-AU/Hadoop-User-Group-Vienna/events/248266228/
◦ Cloud Operations with Streaming Analytics using Apache Nifi and Apache Flink
◦ What are the main differences between Spring Cloud Data Flow and Apache Nifi?
17