GitHub user 10110346 opened a pull request:

    https://github.com/apache/spark/pull/22779

    [SPARK-25786][CORE]If the ByteBuffer.hasArray is false , it will throw 
UnsupportedOperationException for Kryo

    ## What changes were proposed in this pull request?
    `deserialize` for kryo,  the type of input parameter is ByteBuffer, if it 
is not backed by an accessible byte array. it will throw 
`UnsupportedOperationException`
    
    Exception Info:
    ```
    java.lang.UnsupportedOperationException was thrown.
    java.lang.UnsupportedOperationException
        at java.nio.ByteBuffer.array(ByteBuffer.java:994)
        at 
org.apache.spark.serializer.KryoSerializerInstance.deserialize(KryoSerializer.scala:362)
    ```
    
    ## How was this patch tested?
    
    Added a unit test


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/10110346/spark InputStreamKryo

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/22779.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #22779
    
----
commit 943e3988dcb70d17e65b5e508f6f35b87fc71d28
Author: liuxian <liu.xian3@...>
Date:   2018-10-19T11:08:10Z

    fix

----


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to