[ 
https://issues.apache.org/jira/browse/SPARK-6045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14339164#comment-14339164
 ] 

Sean Owen commented on SPARK-6045:
----------------------------------

Per the PR, it's not so much that this isn't checked for {{null}} but that the 
{{RecordWriter}} is {{null}} in the first place. That can be failed earlier, 
but it still fails with an exception.

Isn't the problem with {{CassandraHadoopInputOutputWriter}} not returning a 
{{RecordWriter}}? that seems outside of Spark.

> RecordWriter should be checked against null in 
> PairRDDFunctions#saveAsNewAPIHadoopDataset
> -----------------------------------------------------------------------------------------
>
>                 Key: SPARK-6045
>                 URL: https://issues.apache.org/jira/browse/SPARK-6045
>             Project: Spark
>          Issue Type: Bug
>            Reporter: Ted Yu
>
> gtinside reported in the thread 'NullPointerException in TaskSetManager' with 
> the following stack trace:
> {code}
> WARN 2015-02-26 14:21:43,217 [task-result-getter-0] TaskSetManager - Lost
> task 14.2 in stage 0.0 (TID 29, devntom003.dev.blackrock.com):
> java.lang.NullPointerException
> org.apache.spark.rdd.PairRDDFunctions.saveAsNewAPIHadoopDataset(PairRDDFunctions.scala:1007)
> com.bfm.spark.test.CassandraHadoopMigrator$.main(CassandraHadoopMigrator.scala:77)
> com.bfm.spark.test.CassandraHadoopMigrator.main(CassandraHadoopMigrator.scala)
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> java.lang.reflect.Method.invoke(Method.java:606)
> org.apache.spark.deploy.SparkSubmit$.launch(SparkSubmit.scala:358)
> org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:75)
> org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
> {code}
> Looks like the following call in finally block was the cause:
> {code}
>     writer.close(hadoopContext)
> {code}
> We should check writer against null before calling close().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to