Running Pinot locally
This quick start guide will help you bootstrap a Pinot standalone instance on your local machine.
In this guide, you'll learn how to download and install Apache Pinot as a standalone instance.

Download Apache Pinot

First, let's download the Pinot distribution for this tutorial. You can either download a packaged release or build a distribution from the source code.
Prerequisites
Install JDK11 or higher (JDK16 is not yet supported) For JDK 8 support use Pinot 0.7.1 or compile from the source code.
You can build from source or download the distribution:
Download the release
Build from source
Download the latest binary release from Apache Pinot, or use this command
1
PINOT_VERSION=0.9.3 #set to the Pinot version you decide to use
2
3
wget https://downloads.apache.org/pinot/apache-pinot-$PINOT_VERSION/apache-pinot-$PINOT_VERSION-bin.tar.gz
Copied!
Once you have the tar file,
1
# untar it
2
tar -zxvf apache-pinot-$PINOT_VERSION-bin.tar.gz
3
4
# navigate to directory containing the launcher scripts
5
cd apache-pinot-$PINOT_VERSION-bin
Copied!
Follow these steps to checkout code from Github and build Pinot locally
Prerequisites
Install Apache Maven 3.6 or higher
1
# checkout pinot
2
git clone https://github.com/apache/pinot.git
3
cd pinot
4
5
# build pinot
6
mvn install package -DskipTests -Pbin-dist
7
8
# navigate to directory containing the setup scripts
9
cd pinot-distribution/target/apache-pinot-$PINOT_VERSION-bin/apache-pinot-$PINOT_VERSION-bin
Copied!
Add maven option -Djdk.version=8 when building with JDK 8
Note that Pinot scripts is located under pinot-distribution/target not target directory under root.
Now that we've downloaded Pinot, it's time to set up a cluster. There are two ways to do this:

Quick Start

Pinot comes with quick-start commands that launch instances of Pinot components in the same process and import pre-built datasets.
For example, the following quick-start launches Pinot with a baseball dataset pre-loaded:
1
./bin/pinot-admin.sh QuickStart -type batch
Copied!
For a list of all the available quick starts, see the Quick Start Examples.

Manual Cluster

If you want to play with bigger datasets (more than a few MB), you can launch all the components individually.
The video below is a step-by-step walk through for launching the individual components of Pinot and scaling them to multiple instances.
Neha Pawar from the Apache Pinot team shows you how to setup a Pinot cluster
You can find the commands that are shown in this video in the github.com/npawar/pinot-tutorial GitHub repository.
The examples below assume that you are using Java 8.
If you are using Java 11+ users, remove the GC settings insideJAVA_OPTS. So, for example, instead of:
1
export JAVA_OPTS="-Xms4G -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-controller.log"
Copied!
You'd have:
1
export JAVA_OPTS="-Xms4G -Xmx8G"
Copied!

Start Zookeeper

1
./bin/pinot-admin.sh StartZookeeper \
2
-zkPort 2191
Copied!
You can use Zooinspector to browse the Zookeeper instance.

Start Pinot Controller

1
export JAVA_OPTS="-Xms4G -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-controller.log"
2
./bin/pinot-admin.sh StartController \
3
-zkAddress localhost:2191 \
4
-controllerPort 9000
Copied!

Start Pinot Broker

1
export JAVA_OPTS="-Xms4G -Xmx4G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-broker.log"
2
./bin/pinot-admin.sh StartBroker \
3
-zkAddress localhost:2191
Copied!

Start Pinot Server

1
export JAVA_OPTS="-Xms4G -Xmx16G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -Xloggc:gc-pinot-server.log"
2
./bin/pinot-admin.sh StartServer \
3
-zkAddress localhost:2191
Copied!

Start Kafka

1
./bin/pinot-admin.sh StartKafka \
2
-zkAddress=localhost:2191/kafka \
3
-port 19092
Copied!
Once your cluster is up and running, you can head over to Exploring Pinot to learn how to run queries against the data.
Last modified 16d ago