adding rsockets support into JDK
Lu, Yingqi
yingqi.lu at intel.com
Wed Nov 28 17:40:59 UTC 2018
Hi Chris,
Thank you very much for your help here! Your changes look very good to me! I will merge your changes into the most recent version of patch that has the protocol family added.
Thanks,
Lucy
>-----Original Message-----
>From: Chris Hegarty [mailto:chris.hegarty at oracle.com]
>Sent: Wednesday, November 28, 2018 8:58 AM
>To: Lu, Yingqi <yingqi.lu at intel.com>
>Cc: Alan Bateman <Alan.Bateman at oracle.com>; Viswanathan, Sandhya
><sandhya.viswanathan at intel.com>; nio-dev at openjdk.java.net; Aundhe,
>Shirish <shirish.aundhe at intel.com>; Kaczmarek, Eric
><eric.kaczmarek at intel.com>
>Subject: Re: adding rsockets support into JDK
>
>Lucy,
>
>> On 23 Nov 2018, at 21:38, Lu, Yingqi <yingqi.lu at intel.com> wrote:
>>
>> ...
>>
>> I completed the version 19 of the patch at
>> http://cr.openjdk.java.net/~ylu/8195160.19
>
>
>I encountered a few issues with the catching and handling of
>ExceptionInInitializerError [1] [2], as well as the fact that since class
>initialization fails subsequent calls to the factory methods will throw
>NoClassDefFoundError ( which is not good ).
>
>Rather than allow the UnsupportedOperationException to be thrown during
>class initialization it is better to allow class initialization to complete
>successfully ( capturing the error ) and then prevent instances of RDMA
>socket and channel implementations form being constructed. Since the
>changes are a little involved I created a webrev so that you can more easily
>see them
>
> https://cr.openjdk.java.net/~chegar/rsocket/webrev.19.1/
> ( based on webrev .91 )
>
>
>I also think that making RdmaSocketImpl abstract ( and its socket option
>related methods ) will be cleaner, since it ensures that subclasses will override
>the methods. I also moved the supported options lists into their appropriate
>subclass. This is in the webrev too. And updated and existing test to ensure
>that multiple calls to the factory methods behave as expected.
>
>-Chris
>
>
>[1] FAILED: jdk/net/RdmaSockets/rsocket/RdmaSocketsTest.java
>java.lang.NoClassDefFoundError: Could not initialize class
>jdk.internal.net.rdma.RdmaSocketChannelImpl
> at
>jdk.net/jdk.internal.net.rdma.LinuxRdmaPollSelectorProvider.openSocketCha
>nnel(LinuxRdmaPollSelectorProvider.java:53)
> at
>jdk.net/jdk.internal.net.rdma.RdmaPollSelectorProvider.openSocketChannel(
>RdmaPollSelectorProvider.java:65)
> at
>jdk.net/jdk.net.RdmaSockets.openSocketChannel(RdmaSockets.java:129)
> at RdmaSocketsTest.main(RdmaSocketsTest.java:64)
> at
>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>Method)
> at
>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMet
>hodAccessorImpl.java:62)
> at
>java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Delegat
>ingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:567)
> at
>com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(M
>ainActionHelper.java:246)
> at java.base/java.lang.Thread.run(Thread.java:835)
>
>
>[2] FAILED: jdk/net/RdmaSockets/rsocket/SocketOption/OptionsTest.java
>FAILED:
>jdk/net/RdmaSockets/rsocket/SocketOption/UnsupportedOptionsTest.java
>java.lang.ExceptionInInitializerError
> at java.base/java.lang.Class.forName0(Native Method)
> at java.base/java.lang.Class.forName(Class.java:325)
> at
>jdk.net/jdk.net.RdmaSocketOptions$PlatformRdmaSocketOptions.newInstan
>ce(RdmaSocketOptions.java:241)
> at
>jdk.net/jdk.net.RdmaSocketOptions$PlatformRdmaSocketOptions.create(Rd
>maSocketOptions.java:256)
> at
>jdk.net/jdk.net.RdmaSocketOptions$PlatformRdmaSocketOptions.<clinit>(Rd
>maSocketOptions.java:260)
> at
>jdk.net/jdk.net.RdmaSocketOptions.<clinit>(RdmaSocketOptions.java:118)
> at UnsupportedOptionsTest.<clinit>(UnsupportedOptionsTest.java:55)
> at
>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>Method)
> at
>java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMet
>hodAccessorImpl.java:62)
> at
>java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Delegat
>ingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:567)
> at
>com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrappe
>r.java:127)
> at java.base/java.lang.Thread.run(Thread.java:835)
>Caused by: java.lang.UnsupportedOperationException: librdmacm.so.1:
>cannot open shared object file: No such file or directory
> at jdk.net/jdk.net.LinuxRdmaSocketOptions.init(Native Method)
> at
>jdk.net/jdk.net.LinuxRdmaSocketOptions.<clinit>(LinuxRdmaSocketOptions.j
>ava:51)
> ... 13 more
More information about the nio-dev
mailing list