Java 9 support

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Java 9 support

vveider
Hi all.


After some thorough research and with help of fellow igniters, I’ve managed to prepare more or less stable Java 9 build configuration of Apache Ignite.

Here are changes to make it work:
 - Java 8 profiles and build process revision, made in IGNITE-7203;
 - Java 9 maven profile prepared in IGNITE-7144 (will be moved to IGNITE-6730 as subtask);
 - specific maven-compiler-plugin configuration with JVM args for Java 9 profile (as was proposed by Vladimir Ozerov);
 - maven-bundle-plugin version is updated to 3.5.0;
 - maven-compiler-plugin version synchronised to 3.7.0 (in Cassandra modules);
 - scala version updated to 2.12.4;
 - disabled scalar-2.10, spark-2.10 and visor-console-2.10 modules (due to dependency in scala 2.10 which is unsupported by Java 9);
 - sun.misc.JavaNioAccess import changed to jdk.internal.misc.JavaNioAccess in GridUnsafe.java and PageMemoryImpl.java;
 - sun.misc.SharedSecrets import changed to jdk.internal.misc.SharedSecrets in GridUnsafe.java and PageMemoryImpl.java;
 - methods monitorEnter and monitorExit bodies commented out (fix from IGNITE-6736 did not work).

I’d like to put these changes into ignite-6730 to have working compiling under Java 9 branch — so that we can continue work on improving Apache Ignite’s Java 9 support.
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

Andrey Kuznetsov
Hi Petr!

Could you please clarify what is wrong with fix proposed in IGNITE-6736,
and what is supposed to be a replacement for monitorEnter/monitorExit now?

2018-01-09 19:08 GMT+03:00 Petr Ivanov <[hidden email]>:

> Hi all.
>
>
> After some thorough research and with help of fellow igniters, I’ve
> managed to prepare more or less stable Java 9 build configuration of Apache
> Ignite.
>
> Here are changes to make it work:
>  - Java 8 profiles and build process revision, made in IGNITE-7203;
>  - Java 9 maven profile prepared in IGNITE-7144 (will be moved to
> IGNITE-6730 as subtask);
>  - specific maven-compiler-plugin configuration with JVM args for Java 9
> profile (as was proposed by Vladimir Ozerov);
>  - maven-bundle-plugin version is updated to 3.5.0;
>  - maven-compiler-plugin version synchronised to 3.7.0 (in Cassandra
> modules);
>  - scala version updated to 2.12.4;
>  - disabled scalar-2.10, spark-2.10 and visor-console-2.10 modules (due to
> dependency in scala 2.10 which is unsupported by Java 9);
>  - sun.misc.JavaNioAccess import changed to jdk.internal.misc.JavaNioAccess
> in GridUnsafe.java and PageMemoryImpl.java;
>  - sun.misc.SharedSecrets import changed to jdk.internal.misc.SharedSecrets
> in GridUnsafe.java and PageMemoryImpl.java;
>  - methods monitorEnter and monitorExit bodies commented out (fix from
> IGNITE-6736 did not work).
>
> I’d like to put these changes into ignite-6730 to have working compiling
> under Java 9 branch — so that we can continue work on improving Apache
> Ignite’s Java 9 support.




--
Best regards,
  Andrey Kuznetsov.
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

vveider
Andrey — double checked your solution and it works now. Guess there was some merge error first time.
Sorry for misleading.

So, there is working solution for Java 9 build and I’d like to save this configuration in ignite-6730 (making IGNITE-7144 and IGNITE-6736 to become subtasks in the process).
What do you think?


> On 9 Jan 2018, at 20:49, Andrey Kuznetsov <[hidden email]> wrote:
>
> Hi Petr!
>
> Could you please clarify what is wrong with fix proposed in IGNITE-6736,
> and what is supposed to be a replacement for monitorEnter/monitorExit now?
>
> 2018-01-09 19:08 GMT+03:00 Petr Ivanov <[hidden email]>:
>
>> Hi all.
>>
>>
>> After some thorough research and with help of fellow igniters, I’ve
>> managed to prepare more or less stable Java 9 build configuration of Apache
>> Ignite.
>>
>> Here are changes to make it work:
>> - Java 8 profiles and build process revision, made in IGNITE-7203;
>> - Java 9 maven profile prepared in IGNITE-7144 (will be moved to
>> IGNITE-6730 as subtask);
>> - specific maven-compiler-plugin configuration with JVM args for Java 9
>> profile (as was proposed by Vladimir Ozerov);
>> - maven-bundle-plugin version is updated to 3.5.0;
>> - maven-compiler-plugin version synchronised to 3.7.0 (in Cassandra
>> modules);
>> - scala version updated to 2.12.4;
>> - disabled scalar-2.10, spark-2.10 and visor-console-2.10 modules (due to
>> dependency in scala 2.10 which is unsupported by Java 9);
>> - sun.misc.JavaNioAccess import changed to jdk.internal.misc.JavaNioAccess
>> in GridUnsafe.java and PageMemoryImpl.java;
>> - sun.misc.SharedSecrets import changed to jdk.internal.misc.SharedSecrets
>> in GridUnsafe.java and PageMemoryImpl.java;
>> - methods monitorEnter and monitorExit bodies commented out (fix from
>> IGNITE-6736 did not work).
>>
>> I’d like to put these changes into ignite-6730 to have working compiling
>> under Java 9 branch — so that we can continue work on improving Apache
>> Ignite’s Java 9 support.
>
>
>
>
> --
> Best regards,
>  Andrey Kuznetsov.

Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

Andrey Kuznetsov
Thanks, Petr.

I heard of some activity related to performance consequences of
ReentrantLocks in IGNITE-6736 fix. So, I'd like to get a reviewer feedback
first.

Andrey G., Vladimir O., is it possible to merge the fix to master?

2018-01-10 9:56 GMT+03:00 Petr Ivanov <[hidden email]>:

> Andrey — double checked your solution and it works now. Guess there was
> some merge error first time.
> Sorry for misleading.
>
> So, there is working solution for Java 9 build and I’d like to save this
> configuration in ignite-6730 (making IGNITE-7144 and IGNITE-6736 to become
> subtasks in the process).
> What do you think?
>
>
> > On 9 Jan 2018, at 20:49, Andrey Kuznetsov <[hidden email]> wrote:
> >
> > Hi Petr!
> >
> > Could you please clarify what is wrong with fix proposed in IGNITE-6736,
> > and what is supposed to be a replacement for monitorEnter/monitorExit
> now?
> >
> > 2018-01-09 19:08 GMT+03:00 Petr Ivanov <[hidden email]>:
> >
> >> Hi all.
> >>
> >>
> >> After some thorough research and with help of fellow igniters, I’ve
> >> managed to prepare more or less stable Java 9 build configuration of
> Apache
> >> Ignite.
> >>
> >> Here are changes to make it work:
> >> - Java 8 profiles and build process revision, made in IGNITE-7203;
> >> - Java 9 maven profile prepared in IGNITE-7144 (will be moved to
> >> IGNITE-6730 as subtask);
> >> - specific maven-compiler-plugin configuration with JVM args for Java 9
> >> profile (as was proposed by Vladimir Ozerov);
> >> - maven-bundle-plugin version is updated to 3.5.0;
> >> - maven-compiler-plugin version synchronised to 3.7.0 (in Cassandra
> >> modules);
> >> - scala version updated to 2.12.4;
> >> - disabled scalar-2.10, spark-2.10 and visor-console-2.10 modules (due
> to
> >> dependency in scala 2.10 which is unsupported by Java 9);
> >> - sun.misc.JavaNioAccess import changed to jdk.internal.misc.
> JavaNioAccess
> >> in GridUnsafe.java and PageMemoryImpl.java;
> >> - sun.misc.SharedSecrets import changed to jdk.internal.misc.
> SharedSecrets
> >> in GridUnsafe.java and PageMemoryImpl.java;
> >> - methods monitorEnter and monitorExit bodies commented out (fix from
> >> IGNITE-6736 did not work).
> >>
> >> I’d like to put these changes into ignite-6730 to have working compiling
> >> under Java 9 branch — so that we can continue work on improving Apache
> >> Ignite’s Java 9 support.
> >
> >
> >
> >
> > --
> > Best regards,
> >  Andrey Kuznetsov.
>
>


--
Best regards,
  Andrey Kuznetsov.
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

Антон Чураев
Andrey, do You mean https://issues.apache.org/jira/browse/IGNITE-4908?

2018-01-10 13:25 GMT+03:00 Andrey Kuznetsov <[hidden email]>:

> Thanks, Petr.
>
> I heard of some activity related to performance consequences of
> ReentrantLocks in IGNITE-6736 fix. So, I'd like to get a reviewer feedback
> first.
>
> Andrey G., Vladimir O., is it possible to merge the fix to master?
>
> 2018-01-10 9:56 GMT+03:00 Petr Ivanov <[hidden email]>:
>
> > Andrey — double checked your solution and it works now. Guess there was
> > some merge error first time.
> > Sorry for misleading.
> >
> > So, there is working solution for Java 9 build and I’d like to save this
> > configuration in ignite-6730 (making IGNITE-7144 and IGNITE-6736 to
> become
> > subtasks in the process).
> > What do you think?
> >
> >
> > > On 9 Jan 2018, at 20:49, Andrey Kuznetsov <[hidden email]> wrote:
> > >
> > > Hi Petr!
> > >
> > > Could you please clarify what is wrong with fix proposed in
> IGNITE-6736,
> > > and what is supposed to be a replacement for monitorEnter/monitorExit
> > now?
> > >
> > > 2018-01-09 19:08 GMT+03:00 Petr Ivanov <[hidden email]>:
> > >
> > >> Hi all.
> > >>
> > >>
> > >> After some thorough research and with help of fellow igniters, I’ve
> > >> managed to prepare more or less stable Java 9 build configuration of
> > Apache
> > >> Ignite.
> > >>
> > >> Here are changes to make it work:
> > >> - Java 8 profiles and build process revision, made in IGNITE-7203;
> > >> - Java 9 maven profile prepared in IGNITE-7144 (will be moved to
> > >> IGNITE-6730 as subtask);
> > >> - specific maven-compiler-plugin configuration with JVM args for Java
> 9
> > >> profile (as was proposed by Vladimir Ozerov);
> > >> - maven-bundle-plugin version is updated to 3.5.0;
> > >> - maven-compiler-plugin version synchronised to 3.7.0 (in Cassandra
> > >> modules);
> > >> - scala version updated to 2.12.4;
> > >> - disabled scalar-2.10, spark-2.10 and visor-console-2.10 modules (due
> > to
> > >> dependency in scala 2.10 which is unsupported by Java 9);
> > >> - sun.misc.JavaNioAccess import changed to jdk.internal.misc.
> > JavaNioAccess
> > >> in GridUnsafe.java and PageMemoryImpl.java;
> > >> - sun.misc.SharedSecrets import changed to jdk.internal.misc.
> > SharedSecrets
> > >> in GridUnsafe.java and PageMemoryImpl.java;
> > >> - methods monitorEnter and monitorExit bodies commented out (fix from
> > >> IGNITE-6736 did not work).
> > >>
> > >> I’d like to put these changes into ignite-6730 to have working
> compiling
> > >> under Java 9 branch — so that we can continue work on improving Apache
> > >> Ignite’s Java 9 support.
> > >
> > >
> > >
> > >
> > > --
> > > Best regards,
> > >  Andrey Kuznetsov.
> >
> >
>
>
> --
> Best regards,
>   Andrey Kuznetsov.
>



--

Best Regards, Anton Churaev
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

Andrey Kuznetsov
No. We got rid of monitorEnter/monitorExit there. And ReentrantLock is
supposed to be a replacement.

2018-01-10 13:49 GMT+03:00 Антон Чураев <[hidden email]>:

> Andrey, do You mean https://issues.apache.org/jira/browse/IGNITE-4908?
>
>
> --
Best regards,
  Andrey Kuznetsov.
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

agura
In reply to this post by Andrey Kuznetsov
Andrey,

performance testing is in progress. The first, there are no
significant difference in performance on Java 8. But it would be great
to test performance on Java 9 also.

On Wed, Jan 10, 2018 at 1:25 PM, Andrey Kuznetsov <[hidden email]> wrote:

> Thanks, Petr.
>
> I heard of some activity related to performance consequences of
> ReentrantLocks in IGNITE-6736 fix. So, I'd like to get a reviewer feedback
> first.
>
> Andrey G., Vladimir O., is it possible to merge the fix to master?
>
> 2018-01-10 9:56 GMT+03:00 Petr Ivanov <[hidden email]>:
>
>> Andrey — double checked your solution and it works now. Guess there was
>> some merge error first time.
>> Sorry for misleading.
>>
>> So, there is working solution for Java 9 build and I’d like to save this
>> configuration in ignite-6730 (making IGNITE-7144 and IGNITE-6736 to become
>> subtasks in the process).
>> What do you think?
>>
>>
>> > On 9 Jan 2018, at 20:49, Andrey Kuznetsov <[hidden email]> wrote:
>> >
>> > Hi Petr!
>> >
>> > Could you please clarify what is wrong with fix proposed in IGNITE-6736,
>> > and what is supposed to be a replacement for monitorEnter/monitorExit
>> now?
>> >
>> > 2018-01-09 19:08 GMT+03:00 Petr Ivanov <[hidden email]>:
>> >
>> >> Hi all.
>> >>
>> >>
>> >> After some thorough research and with help of fellow igniters, I’ve
>> >> managed to prepare more or less stable Java 9 build configuration of
>> Apache
>> >> Ignite.
>> >>
>> >> Here are changes to make it work:
>> >> - Java 8 profiles and build process revision, made in IGNITE-7203;
>> >> - Java 9 maven profile prepared in IGNITE-7144 (will be moved to
>> >> IGNITE-6730 as subtask);
>> >> - specific maven-compiler-plugin configuration with JVM args for Java 9
>> >> profile (as was proposed by Vladimir Ozerov);
>> >> - maven-bundle-plugin version is updated to 3.5.0;
>> >> - maven-compiler-plugin version synchronised to 3.7.0 (in Cassandra
>> >> modules);
>> >> - scala version updated to 2.12.4;
>> >> - disabled scalar-2.10, spark-2.10 and visor-console-2.10 modules (due
>> to
>> >> dependency in scala 2.10 which is unsupported by Java 9);
>> >> - sun.misc.JavaNioAccess import changed to jdk.internal.misc.
>> JavaNioAccess
>> >> in GridUnsafe.java and PageMemoryImpl.java;
>> >> - sun.misc.SharedSecrets import changed to jdk.internal.misc.
>> SharedSecrets
>> >> in GridUnsafe.java and PageMemoryImpl.java;
>> >> - methods monitorEnter and monitorExit bodies commented out (fix from
>> >> IGNITE-6736 did not work).
>> >>
>> >> I’d like to put these changes into ignite-6730 to have working compiling
>> >> under Java 9 branch — so that we can continue work on improving Apache
>> >> Ignite’s Java 9 support.
>> >
>> >
>> >
>> >
>> > --
>> > Best regards,
>> >  Andrey Kuznetsov.
>>
>>
>
>
> --
> Best regards,
>   Andrey Kuznetsov.
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

vveider
Hi, Igniters!


Ticket IGNITE-6730 [1] was merged to master (and ignite-2.4) and now we have
preliminary support of Java 9, which includes:
 - compilation with JDK9 with some constraints (scala-2.10 based modules
should be turned off)
 - run with JRE9/JDK9 through default scripts (ignite.{sh|bat})

Also, temporary TC project for Ignite Tests on Java 9 [2] was prepared;
analysis of test problems and corresponding fixes is in progress.

Please, be advised.


[1] https://issues.apache.org/jira/browse/IGNITE-6730
[2] https://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java9



--
Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

Pavel Tupitsyn
I would add that to run Ignite on Java 9 without default scripts one has to
use the following JVM options:

            --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED"
            --add-exports=java.base/sun.nio.ch=ALL-UNNAMED

--add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED

--add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED

Ignite.NET adds these options automatically when Java 9 is detected, no
user steps required.

Thanks,
Pavel


On Thu, Jan 25, 2018 at 12:53 PM, vveider <[hidden email]> wrote:

> Hi, Igniters!
>
>
> Ticket IGNITE-6730 [1] was merged to master (and ignite-2.4) and now we
> have
> preliminary support of Java 9, which includes:
>  - compilation with JDK9 with some constraints (scala-2.10 based modules
> should be turned off)
>  - run with JRE9/JDK9 through default scripts (ignite.{sh|bat})
>
> Also, temporary TC project for Ignite Tests on Java 9 [2] was prepared;
> analysis of test problems and corresponding fixes is in progress.
>
> Please, be advised.
>
>
> [1] https://issues.apache.org/jira/browse/IGNITE-6730
> [2] https://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java9
>
>
>
> --
> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

dmagda
Pavel, it’s a good point.

Peter, could you ensure that all Ignite scripts (ignite.sh/bat, control.sh/bat, etc.) perform this auto detection of JVM 9 as well? Alex K. please do the same for Visor and Web Console scripts.


Denis

> On Jan 25, 2018, at 1:58 AM, Pavel Tupitsyn <[hidden email]> wrote:
>
> I would add that to run Ignite on Java 9 without default scripts one has to
> use the following JVM options:
>
>            --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED"
>            --add-exports=java.base/sun.nio.ch=ALL-UNNAMED
>
> --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
>
> --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
>
> Ignite.NET adds these options automatically when Java 9 is detected, no
> user steps required.
>
> Thanks,
> Pavel
>
>
> On Thu, Jan 25, 2018 at 12:53 PM, vveider <[hidden email]> wrote:
>
>> Hi, Igniters!
>>
>>
>> Ticket IGNITE-6730 [1] was merged to master (and ignite-2.4) and now we
>> have
>> preliminary support of Java 9, which includes:
>> - compilation with JDK9 with some constraints (scala-2.10 based modules
>> should be turned off)
>> - run with JRE9/JDK9 through default scripts (ignite.{sh|bat})
>>
>> Also, temporary TC project for Ignite Tests on Java 9 [2] was prepared;
>> analysis of test problems and corresponding fixes is in progress.
>>
>> Please, be advised.
>>
>>
>> [1] https://issues.apache.org/jira/browse/IGNITE-6730
>> [2] https://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java9
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>>

Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

Yakov Zhdanov-2
Did we add what Pavel suggested to README.txt and readme.io documentation?

Yakov Zhdanov,
www.gridgain.com

2018-01-25 14:27 GMT-08:00 Denis Magda <[hidden email]>:

> Pavel, it’s a good point.
>
> Peter, could you ensure that all Ignite scripts (ignite.sh/bat,
> control.sh/bat, etc.) perform this auto detection of JVM 9 as well? Alex
> K. please do the same for Visor and Web Console scripts.
>
> —
> Denis
>
> > On Jan 25, 2018, at 1:58 AM, Pavel Tupitsyn <[hidden email]>
> wrote:
> >
> > I would add that to run Ignite on Java 9 without default scripts one has
> to
> > use the following JVM options:
> >
> >            --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED"
> >            --add-exports=java.base/sun.nio.ch=ALL-UNNAMED
> >
> > --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
> >
> > --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
> >
> > Ignite.NET adds these options automatically when Java 9 is detected, no
> > user steps required.
> >
> > Thanks,
> > Pavel
> >
> >
> > On Thu, Jan 25, 2018 at 12:53 PM, vveider <[hidden email]> wrote:
> >
> >> Hi, Igniters!
> >>
> >>
> >> Ticket IGNITE-6730 [1] was merged to master (and ignite-2.4) and now we
> >> have
> >> preliminary support of Java 9, which includes:
> >> - compilation with JDK9 with some constraints (scala-2.10 based modules
> >> should be turned off)
> >> - run with JRE9/JDK9 through default scripts (ignite.{sh|bat})
> >>
> >> Also, temporary TC project for Ignite Tests on Java 9 [2] was prepared;
> >> analysis of test problems and corresponding fixes is in progress.
> >>
> >> Please, be advised.
> >>
> >>
> >> [1] https://issues.apache.org/jira/browse/IGNITE-6730
> >> [2] https://ci.ignite.apache.org/project.html?projectId=
> IgniteTests24Java9
> >>
> >>
> >>
> >> --
> >> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Java 9 support

vveider
In reply to this post by dmagda
Double checked scripts and found some errors.
Corresponding JIRA issue [1] fixed and merged to 2.4 release branch.


[1] https://issues.apache.org/jira/browse/IGNITE-7550 <https://issues.apache.org/jira/browse/IGNITE-7550>



> On 26 Jan 2018, at 01:27, Denis Magda <[hidden email]> wrote:
>
> Pavel, it’s a good point.
>
> Peter, could you ensure that all Ignite scripts (ignite.sh/bat, control.sh/bat, etc.) perform this auto detection of JVM 9 as well? Alex K. please do the same for Visor and Web Console scripts.
>
> —
> Denis
>
>> On Jan 25, 2018, at 1:58 AM, Pavel Tupitsyn <[hidden email]> wrote:
>>
>> I would add that to run Ignite on Java 9 without default scripts one has to
>> use the following JVM options:
>>
>>           --add-exports=java.base/jdk.internal.misc=ALL-UNNAMED"
>>           --add-exports=java.base/sun.nio.ch=ALL-UNNAMED
>>
>> --add-exports=java.management/com.sun.jmx.mbeanserver=ALL-UNNAMED
>>
>> --add-exports=jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED
>>
>> Ignite.NET adds these options automatically when Java 9 is detected, no
>> user steps required.
>>
>> Thanks,
>> Pavel
>>
>>
>> On Thu, Jan 25, 2018 at 12:53 PM, vveider <[hidden email]> wrote:
>>
>>> Hi, Igniters!
>>>
>>>
>>> Ticket IGNITE-6730 [1] was merged to master (and ignite-2.4) and now we
>>> have
>>> preliminary support of Java 9, which includes:
>>> - compilation with JDK9 with some constraints (scala-2.10 based modules
>>> should be turned off)
>>> - run with JRE9/JDK9 through default scripts (ignite.{sh|bat})
>>>
>>> Also, temporary TC project for Ignite Tests on Java 9 [2] was prepared;
>>> analysis of test problems and corresponding fixes is in progress.
>>>
>>> Please, be advised.
>>>
>>>
>>> [1] https://issues.apache.org/jira/browse/IGNITE-6730
>>> [2] https://ci.ignite.apache.org/project.html?projectId=IgniteTests24Java9
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-ignite-developers.2346864.n4.nabble.com/
>>>
>