Skip to content

Commit 0a0aa37

Browse files
authored
feat: Introduce maven profile to build against Hadoop 3.3.4, 3.3.6 or 3.4.0 (#29)
* feat: Introduce maven profile to build against Hadoop 3.3 or 3.4 * Use full version as profile name * fix ci * fix the ci fix * Add 3.3.4 * changelog * Release 0.3.0 * Revert "Release 0.3.0" This reverts commit 73bb092.
1 parent f1836b8 commit 0a0aa37

File tree

4 files changed

+45
-6
lines changed

4 files changed

+45
-6
lines changed

.github/workflows/maven.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ jobs:
2626
distribution: 'temurin'
2727
cache: maven
2828
- name: Build with Maven
29-
run: mvn -B verify
29+
run: mvn -P hadoop-3.4.0 -B verify
3030
- name: Update dependency graph
3131
uses: advanced-security/maven-dependency-submission-action@5d0f9011b55d6268922128af45275986303459c3 # v4.0.3
32+
with:
33+
maven-args: -P hadoop-3.4.0

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ All notable changes to this project will be documented in this file.
77
### Added
88

99
- Add topology-provider from https://github.com/stackabletech/hdfs-topology-provider ([#28]).
10+
- Introduce maven profile to build against Hadoop 3.3.4, 3.3.6 or 3.4.0 ([#29]).
1011

1112
[#28]: https://github.com/stackabletech/hdfs-utils/pull/28
13+
[#29]: https://github.com/stackabletech/hdfs-utils/pull/29

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ This project contains multiple plugins for Apache Hadoop, which are intended to
1010

1111
## Installation
1212

13-
Run `mvn package` and put the resulting `target/hdfs-utils-*.jar` file on your HDFS classpath.
13+
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.
14+
15+
Run `mvn clean package -P hadoop-3.4.0` and put the resulting `target/hdfs-utils-*.jar` file on your HDFS classpath.
1416
The easiest way to achieve this is to put it in the directory `/stackable/hadoop/share/hadoop/tools/lib/`.
1517
The Stackable HDFS already takes care of this, you don't need to do anything in this case.
1618

pom.xml

+37-4
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
<maven-site-plugin.version>3.12.1</maven-site-plugin.version>
5050
<maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
5151
<spotless-maven-plugin.version>2.43.0</spotless-maven-plugin.version>
52-
53-
<hadoop.version>3.3.6</hadoop.version>
5452
</properties>
5553

5654
<dependencies>
@@ -69,13 +67,13 @@
6967
<dependency>
7068
<groupId>org.slf4j</groupId>
7169
<artifactId>slf4j-api</artifactId>
72-
<version>1.7.36</version>
70+
<version>${slf4j.version}</version>
7371
<scope>provided</scope>
7472
</dependency>
7573
<dependency>
7674
<groupId>com.fasterxml.jackson.core</groupId>
7775
<artifactId>jackson-databind</artifactId>
78-
<version>2.17.1</version>
76+
<version>${jackson.version}</version>
7977
<scope>provided</scope>
8078
</dependency>
8179
<!-- Needed by topology-provider -->
@@ -247,4 +245,39 @@
247245
</plugins>
248246
</build>
249247

248+
<profiles>
249+
<profile>
250+
<id>hadoop-3.3.6</id>
251+
<properties>
252+
<hadoop.version>3.3.6</hadoop.version>
253+
<!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.3.6 -->
254+
<slf4j.version>1.7.36</slf4j.version>
255+
<jackson.version>2.12.7.1</jackson.version>
256+
</properties>
257+
</profile>
258+
<profile>
259+
<id>hadoop-3.3.4</id>
260+
<properties>
261+
<hadoop.version>3.3.4</hadoop.version>
262+
<!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.3.4 -->
263+
<slf4j.version>1.7.36</slf4j.version>
264+
<jackson.version>2.12.7.1</jackson.version>
265+
</properties>
266+
</profile>
267+
<profile>
268+
<id>hadoop-3.4.0</id>
269+
<!--
270+
Users need to explicitly set the version of Hadoop they want to build against
271+
<activation>
272+
<activeByDefault>true</activeByDefault>
273+
</activation>
274+
-->
275+
<properties>
276+
<hadoop.version>3.4.0</hadoop.version>
277+
<!-- Taken from https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-common/3.4.0 -->
278+
<slf4j.version>1.7.36</slf4j.version>
279+
<jackson.version>2.12.7.1</jackson.version>
280+
</properties>
281+
</profile>
282+
</profiles>
250283
</project>

0 commit comments

Comments
 (0)