Skip to content
Draft
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
if: needs.build-info.outputs.needs-compile == 'true'
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 17 ]
Copy link
Contributor

Choose a reason for hiding this comment

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

If we remove the JDK 8 and 11 cases, someone could break JDK 8 compatibility without be notice (e.g. using JDK 9 syntax in the code or adding a new client module requiring JDK 17). Is it possible to run test using JDK 17 to start the servers and JDK 8 to run the clients?

Or we should add a new test matrix to use JDK 8 compiling all the client modules and run some tests not requiring the servers (e.g. print out the version).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it possible to run test using JDK 17 to start the servers and JDK 8 to run the clients?

Good idea, started working on that (HDDS-14579, HDDS-14581). Converting this to draft until test coverage with Java 8 is added.

include:
- os: ubuntu-24.04
- java: 21
Expand All @@ -182,7 +182,6 @@ jobs:
uses: ./.github/workflows/check.yml
with:
checkout-fetch-depth: ${{ matrix.check != 'bats' && 1 || 0 }}
java-version: 8 # HDDS-10150
needs-maven-cache: ${{ !contains('author,bats', matrix.check) }}
ratis-args: ${{ inputs.ratis_args }}
script: ${{ matrix.check }}
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ If you have any questions, please don't hesitate to contact
Requirements to compile the code:

* Unix System
* JDK 1.8 or higher
* Maven 3.6 or later
* JDK 17 or later; client modules can be built with JDK 8
* Maven 3.6.3 or later
* Internet connection for first build (to fetch all Maven and Ozone dependencies)

(Standard development tools such as make, gcc, etc. are required.)
Expand Down
4 changes: 4 additions & 0 deletions hadoop-hdds/config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<name>Apache Ozone HDDS Config</name>
<description>Apache Ozone Distributed Data Store Config Tools</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
2 changes: 2 additions & 0 deletions hadoop-hdds/framework/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<properties>
<classpath.skip>false</classpath.skip>
<!-- hdds-server-framework is used by ozone-cli-admin -->
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencies>
Expand Down
4 changes: 4 additions & 0 deletions hadoop-hdds/hadoop-dependency-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<name>Apache Ozone HDDS Hadoop Client dependencies</name>
<description>Apache Ozone Distributed Data Store Hadoop client dependencies</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions hadoop-hdds/interface-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<description>Apache Ozone Distributed Data Store Admin interface</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
<!-- no testable code in this module -->
<maven.test.skip>true</maven.test.skip>
<!-- only generated code in this module -->
Expand Down
1 change: 1 addition & 0 deletions hadoop-hdds/interface-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<description>Apache Ozone Distributed Data Store Client interface</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
<!-- no testable code in this module -->
<maven.test.skip>true</maven.test.skip>
<!-- only generated code in this module -->
Expand Down
1 change: 1 addition & 0 deletions hadoop-hdds/interface-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<description>Apache Ozone Distributed Data Store Server interface</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
<!-- no testable code in this module -->
<maven.test.skip>true</maven.test.skip>
<!-- only generated code in this module -->
Expand Down
4 changes: 4 additions & 0 deletions hadoop-hdds/test-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<name>Apache Ozone HDDS Test Utils</name>
<description>Apache Ozone Distributed Data Store Test Utils</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencies>
<dependency>
<groupId>ch.qos.reload4j</groupId>
Expand Down
2 changes: 1 addition & 1 deletion hadoop-ozone/dev-support/checks/findbugs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

#checks:basic
#checks:skipped

set -u -o pipefail

Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/freon/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

<properties>
<classpath.skip>false</classpath.skip>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencies>
Expand Down
3 changes: 1 addition & 2 deletions hadoop-ozone/insight/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.ozone</groupId>
<artifactId>hdds-hadoop-dependency-client</artifactId>
<artifactId>ozone</artifactId>
<version>2.2.0-SNAPSHOT</version>
<relativePath>../../hadoop-hdds/hadoop-dependency-client</relativePath>
</parent>
<artifactId>ozone-insight</artifactId>
<version>2.2.0-SNAPSHOT</version>
Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/interface-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<description>Apache Ozone Client interface</description>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
<!-- no tests in this module so far -->
<maven.test.skip>true</maven.test.skip>
<!-- only generated code in this module -->
Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/ozonefs-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<name>Apache Ozone FileSystem Common</name>
<properties>
<file.encoding>UTF-8</file.encoding>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencies>
Expand Down
3 changes: 3 additions & 0 deletions hadoop-ozone/ozonefs-hadoop2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<version>2.2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Apache Ozone FS Hadoop 2.x compatibility</name>
<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/ozonefs-hadoop3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<packaging>jar</packaging>
<name>Apache Ozone FS Hadoop 3.x compatibility</name>
<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
<!-- no tests in this module so far -->
<maven.test.skip>true</maven.test.skip>
</properties>
Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/ozonefs-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<name>Apache Ozone FileSystem Shaded</name>

<properties>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
<!-- no tests in this module so far -->
<maven.test.skip>true</maven.test.skip>
<mdep.analyze.skip>true</mdep.analyze.skip>
Expand Down
1 change: 1 addition & 0 deletions hadoop-ozone/tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

<properties>
<classpath.skip>false</classpath.skip>
<maven.compiler.release>${ozone.java.version.client}</maven.compiler.release>
</properties>

<dependencies>
Expand Down
4 changes: 3 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
<maven-surefire-report-plugin.version>${maven-surefire-plugin.version}</maven-surefire-report-plugin.version>
<maven.compiler.createMissingPackageInfoClass>false</maven.compiler.createMissingPackageInfoClass>
<maven.compiler.release>8</maven.compiler.release>
<maven.compiler.release>${ozone.java.version.server}</maven.compiler.release>
<maven.core.version>3.9.12</maven.core.version>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<metainf-services.version>1.11</metainf-services.version>
Expand All @@ -173,6 +173,8 @@
<okhttp3.version>4.12.0</okhttp3.version>
<opentelemetry.version>1.58.0</opentelemetry.version>
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<ozone.java.version.client>8</ozone.java.version.client>
<ozone.java.version.server>17</ozone.java.version.server>
<ozone.release>Katmai</ozone.release>
<ozone.shaded.native.prefix>org_apache_ozone_shaded</ozone.shaded.native.prefix>
<ozone.shaded.prefix>org.apache.ozone.shaded</ozone.shaded.prefix>
Expand Down