I think Arrow is a pretty good candidate to track java version
adoption, but we should probably just wait to vote on this issue until
dropping Java 8 is more viable.

Thanks for the investigation!


On Mon, Sep 12, 2022 at 4:04 PM Christophe Le Saëc <chles...@gmail.com> wrote:
>
> I look at new features from 9 to 11, and indeed, except modules in Java9,
> that we don't need in Avro *and more, i still don't understand how it's
> compatible with Maven*, there are no great features worth using.
> The mains i can see are by quickly thinking of are :
>  - sealed class for Schema
> - record for generated code.
> - new switch & instanceof for micro improvement
> But, all of this are not available in 11 ... So, finally, +1 to wait.
>
>
> Le lun. 12 sept. 2022 à 10:37, Martin Grigorov <mgrigo...@apache.org> a
> écrit :
>
> > Hi,
> >
> > I am a big supporter of the progress (I test OpenJDK early access releases
> > with few Apache projects and keep those JDKs up-to-date in ASF Jenkins and
> > Buildbot environments)!
> >
> > But before raising the Java version maybe we should think what it would
> > bring to Avro ?
> > Which Java 11 features would be beneficial for Avro itself ?
> > MethodHandles are available since Java 7, so the removal of the usage of
> > Unsafe could be done even now.
> >
> > At the moment master branch and branch-1.11 are very close to each other.
> > If we want to modernize Avro without big highlights from the upgrade to
> > Java 11 then maybe we should be prepared to maintain 1.11.x for some more
> > time ?!
> >
> > Martin
> >
> > On Mon, Sep 12, 2022 at 10:20 AM Christophe Le Saëc <chles...@gmail.com>
> > wrote:
> >
> > > @r...@skraba.com <r...@skraba.com>
> > >    : Indeed, it seems that lot of Apache commons project are still using
> > > Java8, for example, Commons Lang3
> > > <https://github.com/apache/commons-lang/blob/master/pom.xml#L605-L606>,
> > > and
> > > even Apache Arrow
> > > <https://github.com/apache/arrow/blob/master/java/pom.xml#L204-L205>
> > which
> > > purpose is near to Avro  is comiled in Java 8 version. So, it may be to
> > > soon to move to 11.
> > >
> > > For spark 2.4.8, it also use Avro 1.8.2
> > > <https://github.com/apache/spark/blob/v2.4.8/pom.xml#L143>, so, it would
> > > not be an issue to put compile 1.12 with Java11.
> > >
> > > To be completed, you can see here a branch on my avro fork project that
> > use
> > > Java11 <https://github.com/clesaec/avro/tree/Java11Experience>(mainly by
> > > using java.lang.invoke.MethodHandles instead of sun.misc.Unsafe in
> > > org.apache.avro.reflect.FieldAccess sub-classes.
> > >
> > >
> > > Le ven. 9 sept. 2022 à 21:58, Oscar Westra van Holthe - Kind <
> > > os...@westravanholthe.nl> a écrit :
> > >
> > > > Hi everyone,
> > > >
> > > > In my experience, there's been quite a bit of movement the past few
> > years
> > > > to get the major big data components that require Java 8 into the
> > modern
> > > > age. Most notable is Spark; all versions 3.x work with Java 11.
> > > >
> > > > However, the oldest supported version seems to be 2.4.8, released in
> > May
> > > > 2021, which only works with Java 8 (not version 9 or later, and support
> > > for
> > > > Java 7 was dropped in 2.2.0). As a result, I think we should still
> > build
> > > > for & support Java 8...
> > > >
> > > > But if someone can prove me wrong, that would make me quite happy.
> > > >
> > > >
> > > > Kind regards,
> > > > Oscar
> > > >
> > > >
> > > > On Fri, 9 Sept 2022 at 18:51, Ryan Skraba <r...@skraba.com> wrote:
> > > >
> > > > > I'm not particularly attached to Java 8 either!
> > > > >
> > > > > I guess we've traditionally been pretty conservative, especially
> > > > > because Avro is widely used in big data environments -- back when
> > > > > on-premise clusters were the norm, it used to be trickier to bump
> > Java
> > > > > versions across all nodes.  That's really not a thing any more, is
> > it?
> > > > >
> > > > > We currently build and test all major java versions[1] but only
> > upload
> > > > > Java 8 compiled artifacts.
> > > > >
> > > > > Any idea what other projects are doing?  I'd say pick a widely used
> > > > > one (Apache Commons might be a good candidate) and track what they
> > do,
> > > > > much like how we follow pip to determine which versions of python we
> > > > > support.
> > > > >
> > > > > I created https://issues.apache.org/jira/browse/AVRO-3627 to make
> > sure
> > > > > this gets tracked one day for easy reference!
> > > > >
> > > > > All my best, Ryan
> > > > >
> > > > > [1]:
> > > > >
> > > >
> > >
> > https://github.com/apache/avro/blob/d6a0d0a790274de27b2cfde07d14151a4a327a96/.github/workflows/test-lang-java.yml#L43-L47
> > > > >
> > > > > On Fri, Sep 9, 2022 at 3:50 PM Christophe Le Saëc <
> > chles...@gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > Hello here,
> > > > > > Is there any reason to stay in Java8 for Avro project ?
> > > > > >
> > > > > > On my laptop, i succeed to change to version 11
> > > > > >
> > > > > > <maven.compiler.source>11</maven.compiler.source>
> > > > > > <maven.compiler.target>11</maven.compiler.target>
> > > > > >
> > > > > > just by adding a new FieldAccessor class using
> > > > > > java.lang.invoke.MethodHandles instead of sun.misc.Unsafe (And
> > > compile
> > > > > > FieldAccessUnsafe or the new class depends of JDK version with
> > Maven
> > > > > trick).
> > > > > > Whole unit tests work fine.
> > > > > > I wonder if there are other good reasons to stay with Java 8
> > version.
> > > > > >
> > > > > > Best regards,
> > > > > > Christophe Le Saëc
> > > > >
> > > >
> > > >
> > > > --
> > > >
> > > > ✉️ Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>
> > > >
> > >
> >

Reply via email to