Skip to content
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

Adding scala profile for kafka 2.x build and remove root pom scala dependencies #8174

Merged
merged 1 commit into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions pinot-connectors/pinot-spark-connector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,22 @@
<groupId>com.thoughtworks.paranamer</groupId>
<artifactId>paranamer</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_${scala.compat.version}</artifactId>
<version>${scalaxml.version}</version>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
Expand All @@ -98,17 +108,33 @@
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_${scala.compat.version}</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.circe</groupId>
<artifactId>circe-parser_${scala.compat.version}</artifactId>
<version>${circe.version}</version>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.circe</groupId>
<artifactId>circe-generic_${scala.compat.version}</artifactId>
<version>${circe.version}</version>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
Expand All @@ -127,6 +153,10 @@
<groupId>org.scala-lang.modules</groupId>
<artifactId>scala-xml_${scala.compat.version}</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,14 @@
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -435,6 +443,17 @@
<artifactId>scala-xml_${scala.binary.version}</artifactId>
<version>1.0.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
Expand All @@ -453,6 +472,10 @@
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand Down Expand Up @@ -488,6 +511,10 @@
<groupId>org.apache.orc</groupId>
<artifactId>orc-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
Expand All @@ -504,6 +531,14 @@
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
</exclusion>
<exclusion>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
Expand Down
26 changes: 24 additions & 2 deletions pinot-plugins/pinot-stream-ingestion/pinot-kafka-2.0/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
<properties>
<pinot.root>${basedir}/../../..</pinot.root>
<kafka.lib.version>2.8.1</kafka.lib.version>
<scala.compat.version>2.13</scala.compat.version>
<scala.version>2.13.3</scala.version>
<phase.prop>package</phase.prop>
</properties>

Expand Down Expand Up @@ -100,4 +98,28 @@
<artifactId>jopt-simple</artifactId>
</dependency>
</dependencies>


<profiles>
<profile>
<id>scala-2.12</id>
<activation>
<activeByDefault>true</activeByDefault>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This basically means the default scala version got downgraded from 2.13 to 2.12 in the project. Could you elaborate a bit more on the reason of doing that to the description?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason is I've got a lot request for scala 2.12 support, hence make this as default and allow upgrade to 2.13.

Basically this is similar to kafka 0.9 and 2.x, users can build a connector based on the scala version from their enviroment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For Pinot users, there is no different in terms of using scala 2.12 or 2.13 built jars.
This is mostly for users who are integrating Pinot code and libs and making their life easier.

</activation>
<properties>
<scala.version>2.12.11</scala.version>
<scala.compat.version>2.12</scala.compat.version>
</properties>
</profile>
<profile>
<id>scala-2.13</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<scala.version>2.13.3</scala.version>
<scala.compat.version>2.13</scala.compat.version>
</properties>
</profile>
</profiles>
</project>
23 changes: 0 additions & 23 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@
<hk2.version>2.5.0</hk2.version>
<swagger.version>1.5.16</swagger.version>
<hadoop.version>2.7.0</hadoop.version>
<scala.version>2.13.3</scala.version>
<antlr.version>4.6</antlr.version>
<jsonpath.version>2.7.0</jsonpath.version>
<quartz.version>2.3.2</quartz.version>
Expand Down Expand Up @@ -921,28 +920,6 @@
<scope>provided</scope>
</dependency>

<!-- Scala -->
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-reflect</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-scalap</artifactId>
<version>${scala.version}</version>
</dependency>

<!-- Metrics -->
<dependency>
<groupId>io.dropwizard.metrics</groupId>
Expand Down