- There’s a problem with the underlying stream, and we need to restart the server, reset offsets, or recreate a topic
- We want to ingest data from different streams into the same table.
- Discover a mistake in the Pinot ingestion configuration, and Pinot is throwing exceptions and you’re not able to ingest any more data.
pauseConsumption
and resumeConsumption
APIs, which are used to pause and resume ingestion of a stream. watch the following video, or complete the tutorial below, starting with the Prerequites.
For changes to the table configuration, you don’t need to pause and resume; use the
forceCommit API
.
Pinot Version | 1.0.0 |
---|---|
Code | startreedata/pinot-recipes/pause-resume |
Prerequisites
You will need to install Docker to follow the code examples in this guide.Navigate to recipe
- If you haven’t already, download recipes.
- In terminal, go to the recipe by running the following command:
Launch Pinot Cluster
You can spin up a Pinot Cluster by running the following command:Data generator
This recipe contains a data generator that creates events with a timestamp, count, and UUID. You can generate data by running the following command:Kafka ingestion
We’re going to ingest this data into an Apache Kafka topic using the kcat command line tool. We’ll also usejq
to structure the data in the key:payload
structure that Kafka expects:
Pinot Schema and Table
Now let’s create a Pinot Schema and Table. First, the schema:The Pause/Resume workflow
We’re going to run the following workflow to sort this out:- Pause ingestion for the table
- Fix the transformation function
- Resume ingestion