You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ozone.apache.org by Nandakumar Vadivelu <nv...@cloudera.com.INVALID> on 2022/12/13 13:11:45 UTC

[DISCUSS] Support for Java 11 & 17

Hi All,

Currently, we compile and verify Ozone only with Java 8. As far as I know,
we haven't tested Ozone either with Java 11 or 17.
We should start compiling and testing Ozone with higher versions of Java to
make the version upgrade easier in the future.

This will enable us to upgrade the Java version whenever required and
deprecate older version(s) of Java if needed.

The plan here is to add support to choose the Java version (8, 11 & 17) to
compile Ozone.
With this, we will have the option to compile and run Ozone with


   - Java 8
   - Java 11
   - Java 17

We can also add pre-commit checks to make sure that all the changes made to
Ozone work on all the supported Java versions.

Note: We will not be able to use new features of Java until we
deprecate and remove the older version(s).

Oracle Java SE Support Roadmap
Release (LTS) GA Date Premier Support Until Extended Support Until
8 March 2014 March 2022 December 2030
11 September 2018 September 2023 September 2026
17 September 2021 September 2026 September 2029
21 September 2023 September 2028 September 2031
Open JDK Redhat Support Roadmap
Release (LTS) Extended Support Until
8 November 2026
11 October 2024
17 October 2027

P.S.: Is there anyone who tested Ozone with Java 11 or 17?

Thanks,
Nanda

Re: [DISCUSS] Support for Java 11 & 17

Posted by Neil Joshi <ne...@gmail.com>.
Hi Nanda,

On using Java 11 ozone builds - It should be noted that when running our
dev-support findbugs script on the build I found it generates many findings
(NULL related) that are not reported when run on Java 8 compiled build.

Generally, I look for a clean findbugs pass on a Java 8 build to avoid the
findbugs findings I find on a Java 11 build.

Neil

On Tue, Dec 13, 2022 at 11:14 AM Nandakumar Vadivelu
<nv...@cloudera.com.invalid> wrote:

> Thanks for taking a look at this Attila.
>
> Even though we use Java 11 for compilation, the binaries are generated for
> Java 8.
> This is because we have mentioned it in the pom file
>
> *<javac.version>1.8</javac.version>*
>
> In this scenario, JDK 11 compiles Ozone code and generates binary
> targeting Java 8.
>
> If we update the Java version to 11 in pom file, Ozone compilation actually
> fails. (HDDS-7633 <https://issues.apache.org/jira/browse/HDDS-7633>)
>
> Instead of just compiling it with JDK 11 (current method), we can introduce
> different maven profiles to add support for compiling Ozone using different
> Java versions.
>
> -Nanda
>
>
> On Tue, Dec 13, 2022 at 9:22 PM Attila Doroszlai <ad...@apache.org>
> wrote:
>
> > Hi Nanda,
> >
> > > Currently, we compile and verify Ozone only with Java 8. As far as I
> > know,
> > > we haven't tested Ozone either with Java 11 or 17.
> >
> > CI compiles each commit with both Java 8:
> >
> >
> https://github.com/apache/ozone/blob/d6f63bf2e53ac8a4220ee829d8bbb2427dd7d3fa/.github/workflows/ci.yml#L60-L68
> >
> >
> https://github.com/apache/ozone/actions/runs/3685851489/jobs/6237313319#step:6:12
> >
> > and Java 11:
> >
> >
> https://github.com/apache/ozone/blob/d6f63bf2e53ac8a4220ee829d8bbb2427dd7d3fa/.github/workflows/ci.yml#L117-L126
> >
> >
> https://github.com/apache/ozone/actions/runs/3685851489/jobs/6237545246#step:6:12
> >
> > Acceptance tests run Ozone with Java 11, but using the binaries
> > compiled with Java 8:
> >
> >
> https://github.com/apache/ozone-docker-runner/blob/37049aa43dc8a6bed343dd1be542664e2c1059c2/Dockerfile#L80
> >
> > -Attila
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> > For additional commands, e-mail: dev-help@ozone.apache.org
> >
> >
>


-- 
NJ

Re: [DISCUSS] Support for Java 11 & 17

Posted by Nandakumar Vadivelu <nv...@cloudera.com.INVALID>.
Thanks for taking a look at this Attila.

Even though we use Java 11 for compilation, the binaries are generated for
Java 8.
This is because we have mentioned it in the pom file

*<javac.version>1.8</javac.version>*

In this scenario, JDK 11 compiles Ozone code and generates binary
targeting Java 8.

If we update the Java version to 11 in pom file, Ozone compilation actually
fails. (HDDS-7633 <https://issues.apache.org/jira/browse/HDDS-7633>)

Instead of just compiling it with JDK 11 (current method), we can introduce
different maven profiles to add support for compiling Ozone using different
Java versions.

-Nanda


On Tue, Dec 13, 2022 at 9:22 PM Attila Doroszlai <ad...@apache.org>
wrote:

> Hi Nanda,
>
> > Currently, we compile and verify Ozone only with Java 8. As far as I
> know,
> > we haven't tested Ozone either with Java 11 or 17.
>
> CI compiles each commit with both Java 8:
>
> https://github.com/apache/ozone/blob/d6f63bf2e53ac8a4220ee829d8bbb2427dd7d3fa/.github/workflows/ci.yml#L60-L68
>
> https://github.com/apache/ozone/actions/runs/3685851489/jobs/6237313319#step:6:12
>
> and Java 11:
>
> https://github.com/apache/ozone/blob/d6f63bf2e53ac8a4220ee829d8bbb2427dd7d3fa/.github/workflows/ci.yml#L117-L126
>
> https://github.com/apache/ozone/actions/runs/3685851489/jobs/6237545246#step:6:12
>
> Acceptance tests run Ozone with Java 11, but using the binaries
> compiled with Java 8:
>
> https://github.com/apache/ozone-docker-runner/blob/37049aa43dc8a6bed343dd1be542664e2c1059c2/Dockerfile#L80
>
> -Attila
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
> For additional commands, e-mail: dev-help@ozone.apache.org
>
>

Re: [DISCUSS] Support for Java 11 & 17

Posted by Attila Doroszlai <ad...@apache.org>.
Hi Nanda,

> Currently, we compile and verify Ozone only with Java 8. As far as I know,
> we haven't tested Ozone either with Java 11 or 17.

CI compiles each commit with both Java 8:
https://github.com/apache/ozone/blob/d6f63bf2e53ac8a4220ee829d8bbb2427dd7d3fa/.github/workflows/ci.yml#L60-L68
https://github.com/apache/ozone/actions/runs/3685851489/jobs/6237313319#step:6:12

and Java 11:
https://github.com/apache/ozone/blob/d6f63bf2e53ac8a4220ee829d8bbb2427dd7d3fa/.github/workflows/ci.yml#L117-L126
https://github.com/apache/ozone/actions/runs/3685851489/jobs/6237545246#step:6:12

Acceptance tests run Ozone with Java 11, but using the binaries
compiled with Java 8:
https://github.com/apache/ozone-docker-runner/blob/37049aa43dc8a6bed343dd1be542664e2c1059c2/Dockerfile#L80

-Attila

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ozone.apache.org
For additional commands, e-mail: dev-help@ozone.apache.org