Skip to content

feat: Introduce maven profile to build against Hadoop 3.3.4, 3.3.6 or 3.4.0 #29

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

Merged
merged 8 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
4 changes: 3 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B verify
run: mvn -P hadoop-3.4.0 -B verify
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@5d0f9011b55d6268922128af45275986303459c3 # v4.0.3
with:
maven-args: -P hadoop-3.4.0
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ This project contains multiple plugins for Apache Hadoop, which are intended to

## Installation

Run `mvn package` and put the resulting `target/hdfs-utils-*.jar` file on your HDFS classpath.
Currently you can compile hdfs-utils against Hadoop 3.3.4, 3.3.6 or 3.4.0. You need to specify the version by activating either the `hadoop-3.3.4`, `hadoop-3.3.6` or the `hadoop-3.4.0` profile below.

Run `mvn clean package -P hadoop-3.4.0` and put the resulting `target/hdfs-utils-*.jar` file on your HDFS classpath.
The easiest way to achieve this is to put it in the directory `/stackable/hadoop/share/hadoop/tools/lib/`.
The Stackable HDFS already takes care of this, you don't need to do anything in this case.

Expand Down
41 changes: 37 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>

<hadoop.version>3.3.6</hadoop.version>
</properties>

<dependencies>
Expand All @@ -69,13 +67,13 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.36</version>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.17.1</version>
<version>${jackson.version}</version>
<scope>provided</scope>
</dependency>
<!-- Needed by topology-provider -->
Expand Down Expand Up @@ -247,4 +245,39 @@
</plugins>
</build>

<profiles>
<profile>
<id>hadoop-3.3.6</id>
<properties>
<hadoop.version>3.3.6</hadoop.version>
<!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.3.6 -->
<slf4j.version>1.7.36</slf4j.version>
<jackson.version>2.12.7.1</jackson.version>
</properties>
</profile>
<profile>
<id>hadoop-3.3.4</id>
<properties>
<hadoop.version>3.3.4</hadoop.version>
<!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.3.4 -->
<slf4j.version>1.7.36</slf4j.version>
<jackson.version>2.12.7.1</jackson.version>
</properties>
</profile>
<profile>
<id>hadoop-3.4.0</id>
<!--
Users need to explicitly set the version of Hadoop they want to build against
<activation>
<activeByDefault>true</activeByDefault>
</activation>
-->
<properties>
<hadoop.version>3.4.0</hadoop.version>
<!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.4.0 -->
<slf4j.version>1.7.36</slf4j.version>
<jackson.version>2.12.7.1</jackson.version>
</properties>
</profile>
</profiles>
</project>
Loading