-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat(plugin-pinot): Upgrade Pinot version to 1.3.0 & move off of presto-pinot-driver #25785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
184ce68 to
5ceabb5
Compare
5ceabb5 to
348918e
Compare
d2ae4ce to
6112114
Compare
a5302ee to
8cdb81f
Compare
9805a1b to
b7207d3
Compare
imjalpreet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@infvg, thank you for the upgrade!
I did a first pass and have a few suggestions.
presto-main-base/pom.xml
Outdated
| <dependency> | ||
| <groupId>org.apache.lucene</groupId> | ||
| <artifactId>lucene-analyzers-common</artifactId> | ||
| <version>8.11.3</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's add a property tag for this version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, added the property tag here since we're overriding to 8.11.3 just for presto-main-base since it's building with java 8
| markDataFetchExceptionsAsRetriable ? PINOT_DATA_FETCH_EXCEPTION : PINOT_EXCEPTION, | ||
| split.getSegmentPinotQuery(), | ||
| String.format("Encountered %d pinot exceptions for split %s: %s", exceptions.size(), split, exceptions)); | ||
| String.format("Encountered %d pinot exceptions for split %s: %s", exceptions.size(), split, dataTable.getExceptions())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Should we just use the exceptions list here since we already created an object earlier?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
| /** | ||
| * Grpc based Pinot query client. | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's document the reason why this class is introduced. If it's a fork of a Pinot class, comment why we needed a fork? I see that earlier it was coming from the Pinot dependency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, is there no alternative that they have introduced after removing it?
| public static ByteString toByteString(byte[] bytes) | ||
| { | ||
| return ByteString.copyFrom(bytes); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this only required for tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, moved to the test & made private
| public static InstanceConfig toInstanceConfig(String instanceId) | ||
| { | ||
| return InstanceConfig.toInstanceConfig(instanceId); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this being used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, removed
presto-pinot-toolkit/pom.xml
Outdated
| <dependency> | ||
| <groupId>org.apache.helix</groupId> | ||
| <artifactId>helix-core</artifactId> | ||
| <version>1.4.3</version> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's add a property tag for this
presto-pinot-toolkit/pom.xml
Outdated
| <exclusion> | ||
| <groupId>commons-lang</groupId> | ||
| <artifactId>commons-lang</artifactId> | ||
| </exclusion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to understand the reason for this exclusion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the exclusion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, are all the exclusions made because those dependencies are already being brought in from other sources and were causing conflicts, or is there another reason?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, there's a lot of dependency conflicts & some versions were causing runtime issues so I had to find the right dependency to pull in for each.
presto-pinot/pom.xml
Outdated
| <dependency> | ||
| <groupId>org.apache.datasketches</groupId> | ||
| <artifactId>datasketches-memory</artifactId> | ||
| <version>3.0.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.datasketches</groupId> | ||
| <artifactId>datasketches-java</artifactId> | ||
| <version>6.1.1</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>jakarta.xml.bind</groupId> | ||
| <artifactId>jakarta.xml.bind-api</artifactId> | ||
| <version>4.0.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.roaringbitmap</groupId> | ||
| <artifactId>RoaringBitmap</artifactId> | ||
| <version>1.3.0</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>it.unimi.dsi</groupId> | ||
| <artifactId>fastutil</artifactId> | ||
| <version>8.5.15</version> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's add property tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These dependencies versions are being overridden from the master pom but they don't have property tags in the root pom. Should we just add tags to avoid repetition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you suggesting adding tags in the root POM and overriding just the tags in this POM? If yes, let's do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: please add property tags for all versions we are changing in this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add property tags for dependencies even if their version isn't dependent or repeated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, as we discussed offline, if it's one-off usage, we don't need to add the version tag.
b7207d3 to
a81a7db
Compare
b6d5218 to
93f9ee2
Compare
2c0213a to
4e10d70
Compare
imjalpreet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @infvg. I have a few more comments.
presto-pinot/pom.xml
Outdated
| <dependency> | ||
| <groupId>org.apache.datasketches</groupId> | ||
| <artifactId>datasketches-memory</artifactId> | ||
| <version>3.0.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.apache.datasketches</groupId> | ||
| <artifactId>datasketches-java</artifactId> | ||
| <version>6.1.1</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>jakarta.xml.bind</groupId> | ||
| <artifactId>jakarta.xml.bind-api</artifactId> | ||
| <version>4.0.2</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>org.roaringbitmap</groupId> | ||
| <artifactId>RoaringBitmap</artifactId> | ||
| <version>1.3.0</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>it.unimi.dsi</groupId> | ||
| <artifactId>fastutil</artifactId> | ||
| <version>8.5.15</version> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you suggesting adding tags in the root POM and overriding just the tags in this POM? If yes, let's do that.
| /** | ||
| * Grpc based Pinot query client. | ||
| */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, is there no alternative that they have introduced after removing it?
presto-pinot-toolkit/pom.xml
Outdated
| <!-- This overrides bsh version despite the groupId being changed--> | ||
| <dependency> | ||
| <groupId>org.apache-extras.beanshell</groupId> | ||
| <artifactId>bsh</artifactId> | ||
| <version>2.0b6</version> | ||
| </dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my understanding, can you elaborate a bit on the comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified it so it's clearer
|
@imjalpreet for the PinotStreamingQueryClient, this was a part of the presto-pinot-toolkit which was built with JDK8 & uses the jdk 8 version of the pinot dependencies. The latest pinot libraries don't include the jdk 8 version & the presto driver was removed (probably due to the JDK8 versions being removed). My PR brings in the code from the driver, along with its jdk17 equivalent dependencies. For the overrides, none of the dependencies have versions that are reused or really used anywhere else so IMO we shouldn't add tags for those (I removed RoaringBitmap since it was no longer necessary to override). |
4e10d70 to
fc45e84
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@infvg Thanks, overall looks good to me, but I have one suggestion.
For dependencies already defined in the root POM’s <dependencyManagement>, instead of re-adding the entire dependency in a submodule's <dependencyManagement> just to override the version, it’s cleaner to define a property in the root POM and override that property in the submodule.
For example, in the root POM, you could add:
<dep.datasketches.version>2.2.0</dep.datasketches.version>
<dependency>
<groupId>org.apache.datasketches</groupId>
<artifactId>datasketches-memory</artifactId>
<version>${dep.datasketches.version}</version>
</dependency>
Then, in Pinot, simply override the property:
<dep.datasketches.version>3.0.2</dep.datasketches.version>
If implemented this will upgrade the Pinot API version to 1.3.0. It will also move off of the shaded presto-pinot-driver dependency.
fc45e84 to
efb085a
Compare
|
@imjalpreet added the dependency properties |
imjalpreet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @infvg. LGTM.
tdcmeehan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @infvg
… of presto-pinot-driver (prestodb#25785)" This reverts commit 267f823.
… of presto-pinot-driver (prestodb#25785)" This reverts commit 267f823.
Description
If implemented this will upgrade the Pinot API version to 1.3.0. It will also move off of the shaded presto-pinot-driver dependency.
Motivation and Context
We are currently on an older version of pinot
Impact
No impact
Test Plan
Tested with a local pinot server & UTs
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.