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

[SPARK-43880][BUILD] Organize hadoop-cloud in standard maven project structure #41380

Closed
wants to merge 2 commits into from
Closed
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
230 changes: 62 additions & 168 deletions hadoop-cloud/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@
<sbt.project.name>hadoop-cloud</sbt.project.name>
</properties>

<build>
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
</build>

<dependencies>
<!--used during compilation but not exported as transitive dependencies-->
<dependency>
Expand Down Expand Up @@ -83,33 +78,6 @@
<artifactId>hadoop-aws</artifactId>
<version>${hadoop.version}</version>
<scope>${hadoop.deps.scope}</scope>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</exclusion>
<!-- Keep old SDK out of the assembly to avoid conflict with Kinesis module -->
<exclusion>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.cloud.bigdataoss</groupId>
Expand Down Expand Up @@ -166,153 +134,79 @@
<artifactId>hadoop-azure</artifactId>
<version>${hadoop.version}</version>
<scope>${hadoop.deps.scope}</scope>
</dependency>
<!--
There's now a hadoop-cloud-storage which transitively pulls in the store JARs,
but it still needs some selective exclusion across versions, especially 3.0.x.
-->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-cloud-storage</artifactId>
<version>${hadoop.version}</version>
<scope>${hadoop.deps.scope}</scope>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<!--
This is a code coverage library introduced by aliyun-java-sdk-core, only for testing
-->
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
</exclusion>
<!--
SPARK-42913: `hadoop-cos`is not a dependency of `hadoop-cloud-storage` 3.3.4,
manually exclude it to avoid recurring issues similar to HADOOP-18159 in Spark.
-->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-cos</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
The jetty declarations are made
(a) to keep that jetty-util-ajax version in sync with the rest of Spark.
(b) to minimise the effects which Spark's jetty shading has on the
availability of the jetty JARs on for hadoop-azure, which depends
on them.
-->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>${hadoop.deps.scope}</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util-ajax</artifactId>
<version>${jetty.version}</version>
<scope>${hadoop.deps.scope}</scope>
</dependency>
</dependencies>

<profiles>
<!--
Hadoop 3 simplifies the classpath, and adds a new committer base class which
enables store-specific committers.
-->
<profile>
<id>hadoop-3</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<extra.java.source.dir>src/hadoop-3/main/java</extra.java.source.dir>
<extra.java.testsource.dir>src/hadoop-3/test/java</extra.java.testsource.dir>
<extra.scala.source.dir>src/hadoop-3/main/scala</extra.scala.source.dir>
<extra.scala.testsource.dir>src/hadoop-3/test/scala</extra.scala.testsource.dir>
</properties>
<build>
<outputDirectory>target/scala-${scala.binary.version}/classes</outputDirectory>
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>

<build>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<tagsToExclude>org.apache.spark.internal.io.cloud.IntegrationTestSuite</tagsToExclude>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-extra-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${extra.java.source.dir}</source>
<source>${extra.scala.source.dir}</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-extra-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${extra.java.testsource.dir}</source>
<source>${extra.scala.testsource.dir}</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<!--
There's now a hadoop-cloud-storage which transitively pulls in the store JARs,
but it still needs some selective exclusion across versions, especially 3.0.x.
-->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-cloud-storage</artifactId>
<version>${hadoop.version}</version>
<scope>${hadoop.deps.scope}</scope>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<!--
This is a code coverage library introduced by aliyun-java-sdk-core, only for testing
-->
<groupId>org.jacoco</groupId>
<artifactId>org.jacoco.agent</artifactId>
</exclusion>
<!--
SPARK-42913: `hadoop-cos`is not a dependency of `hadoop-cloud-storage` 3.3.4,
manually exclude it to avoid recurring issues similar to HADOOP-18159 in Spark.
-->
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-cos</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
The jetty declarations are made
(a) to keep that jetty-util-ajax version in sync with the rest of Spark.
(b) to minimise the effects which Spark's jetty shading has on the
availability of the jetty JARs on for hadoop-azure, which depends
on them.
-->
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<scope>${hadoop.deps.scope}</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util-ajax</artifactId>
<version>${jetty.version}</version>
<scope>${hadoop.deps.scope}</scope>
</dependency>
</dependencies>
</profile>
<plugins>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<tagsToExclude>org.apache.spark.internal.io.cloud.IntegrationTestSuite</tagsToExclude>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>integration-test</id>
<build>
Expand Down
40 changes: 0 additions & 40 deletions hadoop-cloud/src/hadoop-3/test/resources/log4j2.properties

This file was deleted.