Building Modern Data Streaming
Apps
Tim Spann
Principal Developer Advocate
10-May-2023
3
FLiPN-FLaNK Stack
Tim Spann
@PaasDev // Blog: www.datainmotion.dev
Principal Developer Advocate.
Princeton Future of Data Meetup.
ex-Pivotal, ex-Hortonworks, ex-StreamNative, ex-PwC
https://github.com/tspannhw/EverythingApacheNiFi
https://medium.com/@tspann
Apache NiFi x Apache Kafka x Apache Flink x Java
4
FLiP Stack Weekly
This week in Apache NiFi, Apache Flink, Apache
Pulsar, Apache Spark, Apache Iceberg, Python,
Java and Open Source friends.
https://bit.ly/32dAJft
© 2023 Cloudera, Inc. All rights reserved. 5
Future of Data - Princeton + Virtual
@PaasDev
https://www.meetup.com/futureofdata-princeton/
From Big Data to AI to Streaming to Containers to
Cloud to Analytics to Cloud Storage to Fast Data to
Machine Learning to Microservices to ...
STREAMING
7
What is Real-Time?
8
Streaming From … To …
Data distribution as a first class citizen
IOT
Devices
LOG DATA
SOURCES
ON-PREM
DATA SOURCES
BIG DATA CLOUD
SERVICES
CLOUD BUSINESS
PROCESS SERVICES *
CLOUD DATA*
ANALYTICS /SERVICE
(Cloudera DW)
App
Logs
Laptops
/Servers Mobile
Apps
Security
Agents
CLOUD
WAREHOUSE
UNIVERSAL
DATA DISTRIBUTION
(Ingest, Transform, Deliver)
Ingest
Processors
Ingest
Gateway
Router, Filter &
Transform
Processors
Destination
Processors
© 2023 Cloudera, Inc. All rights reserved. 9
BUILDING REAL-TIME REQUIRES A TEAM
© 2023 Cloudera, Inc. All rights reserved. 10
End to End Streaming Pipeline Example
Enterprise
sources
Weather
Errors
Aggregates
Alerts
Stocks
ETL
Analytics
Clickstream Market data
Machine logs Social
SQL
APACHE PULSAR
Apache Pulsar
● Serverless computing framework.
● Unbounded storage, multi-tiered
architecture, and tiered-storage.
● Streaming & Pub/Sub messaging
semantics.
● Multi-protocol support.
● Open Source
● Cloud-Native
Streaming
Consumer
Consumer
Consumer
Subscription
Shared
Failover
Consumer
Consumer
Subscription
In case of failure in
Consumer B-0
Consumer
Consumer
Subscription
Exclusive
X
Consumer
Consumer
Key-Shared
Subscription
Pulsar
Topic/Partition
Messaging
Messages - the Basic Unit of Apache Pulsar
Component Description
Value / data payload The data carried by the message. All Pulsar messages contain raw bytes, although message data
can also conform to data schemas.
Key Messages are optionally tagged with keys, used in partitioning and also is useful for things like
topic compaction.
Properties An optional key/value map of user-defined properties.
Producer name The name of the producer who produces the message. If you do not specify a producer name, the
default name is used.
Sequence ID Each Pulsar message belongs to an ordered sequence on its topic. The sequence ID of the
message is its order in that sequence.
Data Offloaders
(Tiered Storage)
Client Libraries
Apache Pulsar Ecosystem
hub.streamnative.io
Connectors
(Sources & Sinks)
Protocol Handlers
Pulsar Functions
(Lightweight Stream
Processing)
Processing Engines
… and more!
… and more!
APACHE KAFKA
© 2023 Cloudera, Inc. All rights reserved. 17
What is Apache Kafka?
Distributed: horizontally scalable
Partitioned: the data is split-up and distributed across the brokers
Replicated: allows for automatic failover
Unique: Kafka does not track the consumption of messages (the consumers do)
Fast: designed from the ground up with a focus on performance and throughput
Kafka was built at Linkedin in 2011
Open sourced as an Apache project
© 2023 Cloudera, Inc. All rights reserved. 18
Yes, Franz, It’s Kafka
Let’s do a metamorphosis on your data. Don’t fear changing data.
You don’t need to be a brilliant writer to stream
data.
Franz Kafka was a German-speaking
Bohemian novelist and short-story
writer, widely regarded as one of the
major figures of 20th-century
literature. His work fuses elements
of realism and the fantastic.
Wikipedia
© 2023 Cloudera, Inc. All rights reserved. 19
What is Can You Do With Apache Kafka?
Web site activity: track page views, searches, etc. in real time
Events & log aggregation: particularly in distributed systems where messages
come from multiple sources
Monitoring and metrics: aggregate statistics from distributed applications and
build a dashboard application
Stream processing: process raw data, clean it up, and forward it on to another
topic or messaging system
Real-time data ingestion: fast processing of a very large volume of messages
© 2023 Cloudera, Inc. All rights reserved. 20
Kafka Terms
● Kafka is a publish/subscribe messaging system comprised of the following
components:
○ Topic: a message feed
○ Producer: a process that publishes messages to a topic
○ Consumer: a process that subscribes to a topic and processes its
messages
○ Broker: a server in a Kafka cluster
© 2023 Cloudera, Inc. All rights reserved. 21
• Highly reliable distributed
messaging system
• Decouple applications,
enables many-to-many
patterns
• Publish-Subscribe
semantics
• Horizontal scalability
• Efficient implementation
to operate at speed with
big data volumes
• Organized by topic to
support several use cases
Source
System
Source
System
Source
System
Kafka
Fraud
Detection
Security
Systems
Real-Time
Monitoring
Many-To-Many
Publish-Subscribe
EVENTS
APACHE FLINK
© 2023 Cloudera, Inc. All rights reserved. 23
Flink SQL
https://www.datainmotion.dev/2021/04/cloudera-sql-stream-builder-ssb-updated.html
● Streaming Analytics
● Continuous SQL
● Continuous ETL
● Complex Event Processing
● Standard SQL Powered by Apache Calcite
24
Flink SQL
-- specify Kafka partition key on output
SELECT foo AS _eventKey FROM sensors
-- use event time timestamp from kafka
-- exactly once compatible
SELECT eventTimestamp FROM sensors
-- nested structures access
SELECT foo.’bar’ FROM table; -- must quote nested
column
-- timestamps
SELECT * FROM payments
WHERE eventTimestamp > CURRENT_TIMESTAMP-interval
'10' second;
-- unnest
SELECT b.*, u.*
FROM bgp_avro b,
UNNEST(b.path) AS u(pathitem)
-- aggregations and windows
SELECT card,
MAX(amount) as theamount,
TUMBLE_END(eventTimestamp, interval '5' minute) as
ts
FROM payments
WHERE lat IS NOT NULL
AND lon IS NOT NULL
GROUP BY card,
TUMBLE(eventTimestamp, interval '5' minute)
HAVING COUNT(*) > 4 -- >4==fraud
-- try to do this ksql!
SELECT us_west.user_score+ap_south.user_score
FROM kafka_in_zone_us_west us_west
FULL OUTER JOIN kafka_in_zone_ap_south ap_south
ON us_west.user_id = ap_south.user_id;
Key Takeaway: Rich SQL grammar with advanced time and aggregation tools
DATAFLOW
APACHE NIFI
What is Apache NiFi?
Apache NiFi is a scalable, real-time streaming data platform
that collects, curates, and analyzes data so customers gain key
insights for immediate actionable intelligence.
© 2023 Cloudera, Inc. All rights reserved. 27
Apache NiFi
Enable easy ingestion, routing, management and delivery of any data anywhere (Edge, cloud, data
center) to any downstream system with built in end-to-end security and provenance
ACQUIRE PROCESS DELIVER
• Over 300 Prebuilt Processors
• Easy to build your own
• Parse, Enrich & Apply Schema
• Filter, Split, Merger & Route
• Throttle & Backpressure
• Guaranteed Delivery
• Full data provenance from acquisition to
delivery
• Diverse, Non-Traditional Sources
• Eco-system integration
Advanced tooling to industrialize flow development
(Flow Development Life Cycle)
FTP
SFTP
HL7
UDP
XML
HTTP
EMAIL
HTML
IMAGE
SYSLO
G
FTP
SFTP
HL7
UDP
XML
HTTP
EMAIL
HTML
IMAGE
SYSLO
G
HASH
MERGE
EXTRACT
DUPLICATE
SPLIT
ROUTE TEXT
ROUTE CONTENT
ROUTE CONTEXT
CONTROL RATE
DISTRIBUTE LOAD
GEOENRICH
SCAN
REPLACE
TRANSLATE
CONVERT
ENCRYPT
TALL
EVALUATE
EXECUTE
© 2023 Cloudera, Inc. All rights reserved. 28
FDLC: Flow Development Lifecycle
NiFi Cluster
Node 1 Node x
Tests cluster
Registry
..
NiFi Cluster
Node 1 Node x
Production cluster
Registry
..
NiFi Cluster
Node 1 Node x
Dev cluster
Registry
..
Dev Ops chain
NiFi CLI, NiPyAPI,
Jenkins
1- push
new flow
version
2- get new
version of
the flow
3 & 6 - automated testing /
promotion (naming
convention, scheduling,
variable replacement)
4- push
new flow
version
5- get new
version of
the flow
7- push
new flow
version
© 2023 Cloudera, Inc. All rights reserved. 29
Provenance
30
Extensibility
● Built from the ground up with extensions in mind
● Service-loader pattern for…
○ Processors
○ Controller Services
○ Reporting Tasks
○ Prioritizers
● Extensions packaged as NiFi Archives (NARs)
○ Deploy NiFi lib directory and restart
○ Same model as standard components
31
Custom Processors
https://github.com/tspannhw/nifi-extracttext-processor
https://github.com/tspannhw/nifi-tensorflow-processor
https://github.com/tspannhw/nifi-nlp-processor
https://github.com/tspannhw/nifi-convertjsontoddl-processor
https://github.com/tspannhw/nifi-corenlp-processor
https://github.com/tspannhw/nifi-imageextractor-processor
https://github.com/tspannhw/nifi-attributecleaner-processor
https://github.com/tspannhw/linkextractorprocessor
https://github.com/tspannhw/GetWebCamera
https://github.com/tspannhw/nifi-langdetect-processor
https://github.com/tspannhw/nifi-postimage-processor
© 2023 Cloudera, Inc. All rights reserved. 32
STATELESS
ENGINE
● See also Parameters
● Docker
● YARN
● Kubernetes (K8)
● Stateful NiFi clusters
● Apache OpenWhisk
(FaaS)
● AWS Lambda, …
{"registryUrl": "http://tspann-mbp15-hw14277:18080",
"bucketId": "140b30f0-5a47-4747-9021-19d4fde7f993",
"flowId": "0540e1fd-c7ca-46fb-9296-e37632021945",
"ssl": {
"keystoreFile": "","keystorePass": "","keyPass": "","keystoreType": "",
"truststoreFile":
"/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home/lib/sec
urity/cacerts",
"truststorePass": "changeit", "truststoreType": "JKS"
},
"parameters": {
"broker" : "4.317.852.100:9092",
"topic" : "iot",
"group_id" : "nifi-stateless-kafka-consumer",
"DestinationDirectory" : "/tmp/nifistateless/output2/",
"output_dir": "/Users/tspann/Documents/nifi-1.10.0-SNAPSHOT/logs/output"
}
}
© 2023 Cloudera, Inc. All rights reserved. 33
Parquet
Reader/
Writers
● Native Record
Processors for Apache
Parquet Files!
● CVS <-> Parquet
● XML <-> Parquet
● AVRO <-> Parquet
● JSON <-> Parquet
● More...
© 2023 Cloudera, Inc. All rights reserved. 34
Post Slack
Post Images to Slack
© 2023 Cloudera, Inc. All rights reserved. 35
Remote Input Port
● Put Remote Connections for
Site-To-Site (S2S) Anywhere!
● Not only top level
● Drop down simplicity
© 2023 Cloudera, Inc. All rights reserved. 36
NiFi Load Balancing
• Improve NiFi cluster throughput
• Defined at connection level
• Configurable balancing strategies
• Critical for scale up paradigm in
Kubernetes
© 2023 Cloudera, Inc. All rights reserved. 37
List Fetch Patterns
• Use load balancing
feature to distribute some
type of list
• Distribute files to ingest
from an ftp ( List file +
fetch files )
• Distribute rows to ingest
from a DB
• Distribute files to ingest
from S3
Node 1 (Primary)
List Files
Node 2
Get Files
FTP
File 1
File 2
File 3
Get files
File 4
File names
File fetch
38
Site-to-Site (S2S)
● Send data from a NiFi instance/cluster to one or multiple NiFi instances/clusters
● Preferred communications protocol when NiFi on both ends
● 2-way secure protocol, push & pull, high availability and load balancing
Apache NiFi Pulsar Connector
https://streamnative.io/apache-nifi-connector/
© 2023 Cloudera, Inc. All rights reserved. 40
ReadyFlow
Gallery
• Cloudera provided
flow definitions
• Cover most common
data flow use cases
• Optimized to work
with CDP
sources/destinations
• Can be deployed and
adjusted as needed
© 2023 Cloudera, Inc. All rights reserved. 41
Flow
Catalog
• Central repository for
flow definitions
• Import existing NiFi
flows
• Manage flow
definitions
• Initiate flow
deployments
Apache NiFi with Python Custom Processors
Python as a 1st class citizen
© 2023 Cloudera, Inc. All rights reserved. 43
Processing one billion events per second with
NiFi
RESOURCES AND WRAP-UP
45
Streaming Tech Debt Tips
● Version Control All Assets
● Operationalize with K8
● Use DevOps and APIs
● Latest Java and Python
● Stream Sizing (NiFi, Kafka, Flink)
● Unit and Integration Test
● Backup everything
● Scale in 3s
46
Streaming Resources
● https://dzone.com/articles/real-time-stream-processing-with-hazelcast-and-
streamnative
● https://flipstackweekly.com/
● https://www.datainmotion.dev/
● https://www.flankstack.dev/
● https://github.com/tspannhw
● https://medium.com/@tspann
● https://medium.com/@tspann/predictions-for-streaming-in-2023-ad4d7395
d714
● https://www.apachecon.com/acna2022/slides/04_Spann_Tim_Citizen_Stre
aming_Engineer.pdf
47
https://github.com/tspannhw https://www.datainmotion.dev/
48
Resources
© 2023 Cloudera, Inc. All rights reserved. 49
50
TH N Y U

OSSNA Building Modern Data Streaming Apps

  • 1.
    Building Modern DataStreaming Apps Tim Spann Principal Developer Advocate 10-May-2023
  • 3.
    3 FLiPN-FLaNK Stack Tim Spann @PaasDev// Blog: www.datainmotion.dev Principal Developer Advocate. Princeton Future of Data Meetup. ex-Pivotal, ex-Hortonworks, ex-StreamNative, ex-PwC https://github.com/tspannhw/EverythingApacheNiFi https://medium.com/@tspann Apache NiFi x Apache Kafka x Apache Flink x Java
  • 4.
    4 FLiP Stack Weekly Thisweek in Apache NiFi, Apache Flink, Apache Pulsar, Apache Spark, Apache Iceberg, Python, Java and Open Source friends. https://bit.ly/32dAJft
  • 5.
    © 2023 Cloudera,Inc. All rights reserved. 5 Future of Data - Princeton + Virtual @PaasDev https://www.meetup.com/futureofdata-princeton/ From Big Data to AI to Streaming to Containers to Cloud to Analytics to Cloud Storage to Fast Data to Machine Learning to Microservices to ...
  • 6.
  • 7.
  • 8.
    8 Streaming From …To … Data distribution as a first class citizen IOT Devices LOG DATA SOURCES ON-PREM DATA SOURCES BIG DATA CLOUD SERVICES CLOUD BUSINESS PROCESS SERVICES * CLOUD DATA* ANALYTICS /SERVICE (Cloudera DW) App Logs Laptops /Servers Mobile Apps Security Agents CLOUD WAREHOUSE UNIVERSAL DATA DISTRIBUTION (Ingest, Transform, Deliver) Ingest Processors Ingest Gateway Router, Filter & Transform Processors Destination Processors
  • 9.
    © 2023 Cloudera,Inc. All rights reserved. 9 BUILDING REAL-TIME REQUIRES A TEAM
  • 10.
    © 2023 Cloudera,Inc. All rights reserved. 10 End to End Streaming Pipeline Example Enterprise sources Weather Errors Aggregates Alerts Stocks ETL Analytics Clickstream Market data Machine logs Social SQL
  • 11.
  • 12.
    Apache Pulsar ● Serverlesscomputing framework. ● Unbounded storage, multi-tiered architecture, and tiered-storage. ● Streaming & Pub/Sub messaging semantics. ● Multi-protocol support. ● Open Source ● Cloud-Native
  • 13.
    Streaming Consumer Consumer Consumer Subscription Shared Failover Consumer Consumer Subscription In case offailure in Consumer B-0 Consumer Consumer Subscription Exclusive X Consumer Consumer Key-Shared Subscription Pulsar Topic/Partition Messaging
  • 14.
    Messages - theBasic Unit of Apache Pulsar Component Description Value / data payload The data carried by the message. All Pulsar messages contain raw bytes, although message data can also conform to data schemas. Key Messages are optionally tagged with keys, used in partitioning and also is useful for things like topic compaction. Properties An optional key/value map of user-defined properties. Producer name The name of the producer who produces the message. If you do not specify a producer name, the default name is used. Sequence ID Each Pulsar message belongs to an ordered sequence on its topic. The sequence ID of the message is its order in that sequence.
  • 15.
    Data Offloaders (Tiered Storage) ClientLibraries Apache Pulsar Ecosystem hub.streamnative.io Connectors (Sources & Sinks) Protocol Handlers Pulsar Functions (Lightweight Stream Processing) Processing Engines … and more! … and more!
  • 16.
  • 17.
    © 2023 Cloudera,Inc. All rights reserved. 17 What is Apache Kafka? Distributed: horizontally scalable Partitioned: the data is split-up and distributed across the brokers Replicated: allows for automatic failover Unique: Kafka does not track the consumption of messages (the consumers do) Fast: designed from the ground up with a focus on performance and throughput Kafka was built at Linkedin in 2011 Open sourced as an Apache project
  • 18.
    © 2023 Cloudera,Inc. All rights reserved. 18 Yes, Franz, It’s Kafka Let’s do a metamorphosis on your data. Don’t fear changing data. You don’t need to be a brilliant writer to stream data. Franz Kafka was a German-speaking Bohemian novelist and short-story writer, widely regarded as one of the major figures of 20th-century literature. His work fuses elements of realism and the fantastic. Wikipedia
  • 19.
    © 2023 Cloudera,Inc. All rights reserved. 19 What is Can You Do With Apache Kafka? Web site activity: track page views, searches, etc. in real time Events & log aggregation: particularly in distributed systems where messages come from multiple sources Monitoring and metrics: aggregate statistics from distributed applications and build a dashboard application Stream processing: process raw data, clean it up, and forward it on to another topic or messaging system Real-time data ingestion: fast processing of a very large volume of messages
  • 20.
    © 2023 Cloudera,Inc. All rights reserved. 20 Kafka Terms ● Kafka is a publish/subscribe messaging system comprised of the following components: ○ Topic: a message feed ○ Producer: a process that publishes messages to a topic ○ Consumer: a process that subscribes to a topic and processes its messages ○ Broker: a server in a Kafka cluster
  • 21.
    © 2023 Cloudera,Inc. All rights reserved. 21 • Highly reliable distributed messaging system • Decouple applications, enables many-to-many patterns • Publish-Subscribe semantics • Horizontal scalability • Efficient implementation to operate at speed with big data volumes • Organized by topic to support several use cases Source System Source System Source System Kafka Fraud Detection Security Systems Real-Time Monitoring Many-To-Many Publish-Subscribe EVENTS
  • 22.
  • 23.
    © 2023 Cloudera,Inc. All rights reserved. 23 Flink SQL https://www.datainmotion.dev/2021/04/cloudera-sql-stream-builder-ssb-updated.html ● Streaming Analytics ● Continuous SQL ● Continuous ETL ● Complex Event Processing ● Standard SQL Powered by Apache Calcite
  • 24.
    24 Flink SQL -- specifyKafka partition key on output SELECT foo AS _eventKey FROM sensors -- use event time timestamp from kafka -- exactly once compatible SELECT eventTimestamp FROM sensors -- nested structures access SELECT foo.’bar’ FROM table; -- must quote nested column -- timestamps SELECT * FROM payments WHERE eventTimestamp > CURRENT_TIMESTAMP-interval '10' second; -- unnest SELECT b.*, u.* FROM bgp_avro b, UNNEST(b.path) AS u(pathitem) -- aggregations and windows SELECT card, MAX(amount) as theamount, TUMBLE_END(eventTimestamp, interval '5' minute) as ts FROM payments WHERE lat IS NOT NULL AND lon IS NOT NULL GROUP BY card, TUMBLE(eventTimestamp, interval '5' minute) HAVING COUNT(*) > 4 -- >4==fraud -- try to do this ksql! SELECT us_west.user_score+ap_south.user_score FROM kafka_in_zone_us_west us_west FULL OUTER JOIN kafka_in_zone_ap_south ap_south ON us_west.user_id = ap_south.user_id; Key Takeaway: Rich SQL grammar with advanced time and aggregation tools
  • 25.
  • 26.
    What is ApacheNiFi? Apache NiFi is a scalable, real-time streaming data platform that collects, curates, and analyzes data so customers gain key insights for immediate actionable intelligence.
  • 27.
    © 2023 Cloudera,Inc. All rights reserved. 27 Apache NiFi Enable easy ingestion, routing, management and delivery of any data anywhere (Edge, cloud, data center) to any downstream system with built in end-to-end security and provenance ACQUIRE PROCESS DELIVER • Over 300 Prebuilt Processors • Easy to build your own • Parse, Enrich & Apply Schema • Filter, Split, Merger & Route • Throttle & Backpressure • Guaranteed Delivery • Full data provenance from acquisition to delivery • Diverse, Non-Traditional Sources • Eco-system integration Advanced tooling to industrialize flow development (Flow Development Life Cycle) FTP SFTP HL7 UDP XML HTTP EMAIL HTML IMAGE SYSLO G FTP SFTP HL7 UDP XML HTTP EMAIL HTML IMAGE SYSLO G HASH MERGE EXTRACT DUPLICATE SPLIT ROUTE TEXT ROUTE CONTENT ROUTE CONTEXT CONTROL RATE DISTRIBUTE LOAD GEOENRICH SCAN REPLACE TRANSLATE CONVERT ENCRYPT TALL EVALUATE EXECUTE
  • 28.
    © 2023 Cloudera,Inc. All rights reserved. 28 FDLC: Flow Development Lifecycle NiFi Cluster Node 1 Node x Tests cluster Registry .. NiFi Cluster Node 1 Node x Production cluster Registry .. NiFi Cluster Node 1 Node x Dev cluster Registry .. Dev Ops chain NiFi CLI, NiPyAPI, Jenkins 1- push new flow version 2- get new version of the flow 3 & 6 - automated testing / promotion (naming convention, scheduling, variable replacement) 4- push new flow version 5- get new version of the flow 7- push new flow version
  • 29.
    © 2023 Cloudera,Inc. All rights reserved. 29 Provenance
  • 30.
    30 Extensibility ● Built fromthe ground up with extensions in mind ● Service-loader pattern for… ○ Processors ○ Controller Services ○ Reporting Tasks ○ Prioritizers ● Extensions packaged as NiFi Archives (NARs) ○ Deploy NiFi lib directory and restart ○ Same model as standard components
  • 31.
  • 32.
    © 2023 Cloudera,Inc. All rights reserved. 32 STATELESS ENGINE ● See also Parameters ● Docker ● YARN ● Kubernetes (K8) ● Stateful NiFi clusters ● Apache OpenWhisk (FaaS) ● AWS Lambda, … {"registryUrl": "http://tspann-mbp15-hw14277:18080", "bucketId": "140b30f0-5a47-4747-9021-19d4fde7f993", "flowId": "0540e1fd-c7ca-46fb-9296-e37632021945", "ssl": { "keystoreFile": "","keystorePass": "","keyPass": "","keystoreType": "", "truststoreFile": "/Library/Java/JavaVirtualMachines/amazon-corretto-11.jdk/Contents/Home/lib/sec urity/cacerts", "truststorePass": "changeit", "truststoreType": "JKS" }, "parameters": { "broker" : "4.317.852.100:9092", "topic" : "iot", "group_id" : "nifi-stateless-kafka-consumer", "DestinationDirectory" : "/tmp/nifistateless/output2/", "output_dir": "/Users/tspann/Documents/nifi-1.10.0-SNAPSHOT/logs/output" } }
  • 33.
    © 2023 Cloudera,Inc. All rights reserved. 33 Parquet Reader/ Writers ● Native Record Processors for Apache Parquet Files! ● CVS <-> Parquet ● XML <-> Parquet ● AVRO <-> Parquet ● JSON <-> Parquet ● More...
  • 34.
    © 2023 Cloudera,Inc. All rights reserved. 34 Post Slack Post Images to Slack
  • 35.
    © 2023 Cloudera,Inc. All rights reserved. 35 Remote Input Port ● Put Remote Connections for Site-To-Site (S2S) Anywhere! ● Not only top level ● Drop down simplicity
  • 36.
    © 2023 Cloudera,Inc. All rights reserved. 36 NiFi Load Balancing • Improve NiFi cluster throughput • Defined at connection level • Configurable balancing strategies • Critical for scale up paradigm in Kubernetes
  • 37.
    © 2023 Cloudera,Inc. All rights reserved. 37 List Fetch Patterns • Use load balancing feature to distribute some type of list • Distribute files to ingest from an ftp ( List file + fetch files ) • Distribute rows to ingest from a DB • Distribute files to ingest from S3 Node 1 (Primary) List Files Node 2 Get Files FTP File 1 File 2 File 3 Get files File 4 File names File fetch
  • 38.
    38 Site-to-Site (S2S) ● Senddata from a NiFi instance/cluster to one or multiple NiFi instances/clusters ● Preferred communications protocol when NiFi on both ends ● 2-way secure protocol, push & pull, high availability and load balancing
  • 39.
    Apache NiFi PulsarConnector https://streamnative.io/apache-nifi-connector/
  • 40.
    © 2023 Cloudera,Inc. All rights reserved. 40 ReadyFlow Gallery • Cloudera provided flow definitions • Cover most common data flow use cases • Optimized to work with CDP sources/destinations • Can be deployed and adjusted as needed
  • 41.
    © 2023 Cloudera,Inc. All rights reserved. 41 Flow Catalog • Central repository for flow definitions • Import existing NiFi flows • Manage flow definitions • Initiate flow deployments
  • 42.
    Apache NiFi withPython Custom Processors Python as a 1st class citizen
  • 43.
    © 2023 Cloudera,Inc. All rights reserved. 43 Processing one billion events per second with NiFi
  • 44.
  • 45.
    45 Streaming Tech DebtTips ● Version Control All Assets ● Operationalize with K8 ● Use DevOps and APIs ● Latest Java and Python ● Stream Sizing (NiFi, Kafka, Flink) ● Unit and Integration Test ● Backup everything ● Scale in 3s
  • 46.
    46 Streaming Resources ● https://dzone.com/articles/real-time-stream-processing-with-hazelcast-and- streamnative ●https://flipstackweekly.com/ ● https://www.datainmotion.dev/ ● https://www.flankstack.dev/ ● https://github.com/tspannhw ● https://medium.com/@tspann ● https://medium.com/@tspann/predictions-for-streaming-in-2023-ad4d7395 d714 ● https://www.apachecon.com/acna2022/slides/04_Spann_Tim_Citizen_Stre aming_Engineer.pdf
  • 47.
  • 48.
  • 49.
    © 2023 Cloudera,Inc. All rights reserved. 49
  • 50.