{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/8955","labels_url":"https://api.github.com/repos/apache/spark/issues/8955/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/8955/comments","events_url":"https://api.github.com/repos/apache/spark/issues/8955/events","html_url":"https://github.com/apache/spark/pull/8955","id":109245391,"number":8955,"title":"[SPARK-5569] [STREAMING] fix ObjectInputStreamWithLoader for supporting load array classes.","user":{"login":"maxwellzdm","id":1856875,"avatar_url":"https://avatars.githubusercontent.com/u/1856875?v=3","gravatar_id":"","url":"https://api.github.com/users/maxwellzdm","html_url":"https://github.com/maxwellzdm","followers_url":"https://api.github.com/users/maxwellzdm/followers","following_url":"https://api.github.com/users/maxwellzdm/following{/other_user}","gists_url":"https://api.github.com/users/maxwellzdm/gists{/gist_id}","starred_url":"https://api.github.com/users/maxwellzdm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxwellzdm/subscriptions","organizations_url":"https://api.github.com/users/maxwellzdm/orgs","repos_url":"https://api.github.com/users/maxwellzdm/repos","events_url":"https://api.github.com/users/maxwellzdm/events{/privacy}","received_events_url":"https://api.github.com/users/maxwellzdm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-01T07:35:26Z","updated_at":"2015-10-23T15:17:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8955","html_url":"https://github.com/apache/spark/pull/8955","diff_url":"https://github.com/apache/spark/pull/8955.diff","patch_url":"https://github.com/apache/spark/pull/8955.patch"},"body":"When use Kafka DirectStream API to create checkpoint and restore saved checkpoint when restart,\r\nClassNotFound exception would occur.\r\n\r\nThe 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.\r\n\r\nFor example: \r\nClass.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.\r\n\r\ndetails of the difference between Class.forName and loader.loadClass can be found here.\r\nhttp://bugs.java.com/view_bug.do?bug_id=6446627\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/150605236","html_url":"https://github.com/apache/spark/pull/8955#issuecomment-150605236","issue_url":"https://api.github.com/repos/apache/spark/issues/8955","id":150605236,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2015-10-23T15:17:13Z","updated_at":"2015-10-23T15:17:13Z","body":" Merged build triggered."}}