GitHub user maxwellzdm opened a pull request: https://github.com/apache/spark/pull/8955
[SPARK-5569] [STREAMING] fix ObjectInputStreamWithLoader for supporting load array classes. When use Kafka DirectStream API to create checkpoint and restore saved checkpoint when restart, ClassNotFound exception would occur. The reason for this error is that ObjectInputStreamWithLoader extends the ObjectInputStream class and override its resolveClass method. But Instead of Using Class.forName(desc,false,loader), Spark uses loader.loadClass(desc) to instance the class, which do not works with array class. For example: Class.forName("[Lorg.apache.spark.streaming.kafka.OffsetRange.",false,loader) works well while loader.loadClass("[Lorg.apache.spark.streaming.kafka.OffsetRange") would throw an class not found exception. details of the difference between Class.forName and loader.loadClass can be found here. http://bugs.java.com/view_bug.do?bug_id=6446627 You can merge this pull request into a Git repository by running: $ git pull https://github.com/maxwellzdm/spark master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/8955.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 #8955 ---- commit 929fec4445d8857e1d7833c9c848ad18226f60e9 Author: DEMING ZHU <deming....@linecorp.com> Date: 2015-10-01T07:24:38Z fix ObjectInputStreamWithLoader for supporting load array classes. ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org