Apache Pinot ThirdEye —Quickstart helper

Greg Simons
4 min readDec 2, 2020

--

Apache Pinot’s ThirdEye is a tool that came out of LinkedIn to solve a specific problem that had arisen around visibility of company-wide real-time monitoring of metrics. The project is currently in incubation and is undergoing some significant renovation, but if like me you can’t wait to get started then this post will help assist you with the initial setup.

ThirdEye comes with a handy QuickStart guide that can help you get going but as is expected at this stage of the project I came across a few issues when running the example and wrote up my resolutions in this post. Please read this alongside the guide from the official documentation here https://thirdeye.readthedocs.io/en/latest/quick_start.html

The fixes included here are not recommended approaches for the product and are simply how I got this up and running to test out the functionality

When executing the ./install.sh script, I had no direct issues with the build and it completed successfully. An issue arose when executing step 3 of the quickstart that meant the BaseThirdEyeApplication class could not be found.

Maven build success
./run-frontend.sh
Missing dependencies on classpath during run

The existing maven build for the thirdeye-dashboard doesn’t bundle dependencies correctly. The following addition to the thirdeye-dashboard pom.xml resolved the issue so that run-frontend.sh started the app.

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>
${project.build.directory}/libs
</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>libs/</classpathPrefix>
<mainClass>
${mainClass}
</mainClass>
</manifest>
</archive>
</configuration>
</plugin>

The above addition to the pom ensures dependencies are available to the execution and the ThirdEye dashboard can now be found at http://localhost:1426 after running ./run-frontend.sh

H2DB

The thirdeye-dashboard also contains a h2db that caused issues for the run-frontend script.

Issue due to h2db file in the thirdeye-dashboard config/data

Removing the db in the folder allows an attempt at creating the tables required for the ingestion of the data to occur.

ThirdEye h2db to be removed

SQL Statement syntax

The interactive demo that comes with ThirdEye bootstraps some data in to a h2 database. It uses a Mock datasource that will create tables and load data from some sample CSV files in the thirdeye-dashboard/config/data directory. If you come across issues during the startup that are related to invalid SQL you will need to do the following to resolve this.

Amend the SqlUtils.java to remove the InnoDB Engine statement

If you then run,

./install.sh
./run-frontend.sh

the tables and ingestion process will run correctly.

ThirdEye-dist/target

Permission error during install.sh execution
Permission error during install.sh execution

It is possible during the rebuild that you might come across some permission issues on the thirdeye-dist/target folder that the install uses to publish some jar files. If this is the case you can either

  • delete the thirdeye-dist/target dir, or;
  • alter permissions to allow the install to alter the contents of the target dir

Dashboard

Once you get through the quickstart guide and have started the ThirdEye front end you will have a sample data set ready for you to experiment with the alert anomaly detection algorithms.

Anomaly Preview

The latest information on setting up these rules can be found in the documentation.

Next Steps

I will be pushing a number of changes that build upon the docker-compose files built by Daniel Lavoie in this blog post https://medium.com/apache-pinot-developer-blog/monitoring-apache-pinot-99034050c1a5. The services below will be included in the compose to setup a full anomaly detection stack that auto ingests data from Pinot tables into ThirdEye.

  • MySQL
  • Zookeeper
  • Pinot
  • ThirdEye Frontend
  • ThirdEye Backend

Please keep a lookout for updates on github in the following repository https://github.com/gregsimons/pinot-thirdeye-quickstart.

--

--

Greg Simons

Software Architect, Technology enthusiast, husband and father