Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building Big Data Pipelines with Apache Beam

You're reading from  Building Big Data Pipelines with Apache Beam

Product type Book
Published in Jan 2022
Publisher Packt
ISBN-13 9781800564930
Pages 342 pages
Edition 1st Edition
Languages
Author (1):
Jan Lukavský Jan Lukavský
Profile icon Jan Lukavský

Table of Contents (13) Chapters

Preface Section 1 Apache Beam: Essentials
Chapter 1: Introduction to Data Processing with Apache Beam Chapter 2: Implementing, Testing, and Deploying Basic Pipelines Chapter 3: Implementing Pipelines Using Stateful Processing Section 2 Apache Beam: Toward Improving Usability
Chapter 4: Structuring Code for Reusability Chapter 5: Using SQL for Pipeline Implementation Chapter 6: Using Your Preferred Language with Portability Section 3 Apache Beam: Advanced Concepts
Chapter 7: Extending Apache Beam's I/O Connectors Chapter 8: Understanding How Runners Execute Pipelines Other Books You May Enjoy

Task 21 – Implementing our own splittable DoFn – a streaming file source

In this task, we will see how to implement all aspects of a splittable DoFn process and we will see how to use its power and extensibility. So, let's create a streaming source from a plain filesystem! We will explain what we mean by that in the following problem definition.

The problem definition

We want to create a streaming-like source from a directory on a filesystem that will work by watching a specified directory for new files. Once a new file appears, it will grab it and output its content split into individual (text) lines for downstream processing. The source will compute a watermark as a maximal timestamp for all of the files in the specified directory. For simplicity, ignore recursive sub-directories and treat all files as immutable.

Let's illustrate that in the following discussion for clarity.

Discussing the problem decomposition

The problem effectively consists...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}