Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

[NSE-382]Fix Hadoop version issue #388

Merged
merged 3 commits into from
Jul 5, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions arrow-data-source/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions native-sql-engine/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>${hadoop.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
142 changes: 76 additions & 66 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,88 @@
</license>
</licenses>

<modules>
<module>arrow-data-source</module>
<module>native-sql-engine/core</module>
<module>shims</module>
</modules>

<profiles>
<profile>
<id>spark</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spark.version>${spark311.version}</spark.version>
</properties>
</profile>
<profile>
<id>spark-3.1.1</id>
<properties>
<spark.version>${spark311.version}</spark.version>
</properties>
</profile>
<profile>
<id>hadoop-2.7.4</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<hadoop.version>2.7.4</hadoop.version>
</properties>
</profile>
<profile>
<id>hadoop-3.2</id>
<properties>
<hadoop.version>3.2.0</hadoop.version>
</properties>
</profile>
<profile>
<id>incremental-scala-compiler</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<scala.recompile.mode>incremental</scala.recompile.mode>
</properties>
</profile>
<profile>
<id>full-scala-compiler</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<scala.recompile.mode>all</scala.recompile.mode>
</properties>
</profile>
<profile>
<id>arrow-netty</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<arrow-memory.artifact>arrow-memory-netty</arrow-memory.artifact>
</properties>
</profile>
<profile>
<id>arrow-unsafe</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<arrow-memory.artifact>arrow-memory-unsafe</arrow-memory.artifact>
</properties>
</profile>
</profiles>

<properties>
<scala.version>2.12.10</scala.version>
<scala.binary.version>2.12</scala.binary.version>
<spark.version>3.1.1</spark.version>
<arrow.version>4.0.0</arrow.version>
<arrow-memory.artifact>arrow-memory-netty</arrow-memory.artifact>
<hadoop.version>2.7.4</hadoop.version>
<hadoop.version>${hadoop.version}</hadoop.version>
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks a bit odd to me, this should be the same as original way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not the same, the issue I found is ${hadoop.version} in arrow datasource and columnar plugin didn't catch the value from parent.
The solution can help to deliver ${hadoop.version} to both sub-projects.
My testing is to use mvn help:evaluate to confirm the difference.
The original way shows ${hadoop.version} as 2.7.4 when enabling -Phadoop-3.2.

Copy link
Collaborator

Choose a reason for hiding this comment

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

tried the same cmd here, my hadoop version is correct

Copy link
Collaborator

Choose a reason for hiding this comment

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

also add the maven version limit here?
https://github.com/apache/spark/blob/master/pom.xml#L118

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we can do this by using the same maven plugin.
Let me add it and submit a new PR.

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<arrow.script.dir>${project.basedir}/script</arrow.script.dir>
Expand All @@ -50,12 +125,6 @@
<spark311.version>3.1.1</spark311.version>
</properties>

<modules>
<module>arrow-data-source</module>
<module>native-sql-engine/core</module>
<module>shims</module>
</modules>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -189,63 +258,4 @@
</dependencies>
</dependencyManagement>

<profiles>
<profile>
<id>spark</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spark.version>${spark311.version}</spark.version>
</properties>
</profile>
<profile>
<id>spark-3.1.1</id>
<properties>
<spark.version>${spark311.version}</spark.version>
</properties>
</profile>
<profile>
<id>hadoop-3.2</id>
<properties>
<hadoop.version>3.2.0</hadoop.version>
</properties>
</profile>
<profile>
<id>incremental-scala-compiler</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<scala.recompile.mode>incremental</scala.recompile.mode>
</properties>
</profile>
<profile>
<id>full-scala-compiler</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<scala.recompile.mode>all</scala.recompile.mode>
</properties>
</profile>
<profile>
<id>arrow-netty</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<arrow-memory.artifact>arrow-memory-netty</arrow-memory.artifact>
</properties>
</profile>
<profile>
<id>arrow-unsafe</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<arrow-memory.artifact>arrow-memory-unsafe</arrow-memory.artifact>
</properties>
</profile>
</profiles>
</project>