Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-6045

RecordWriter should be checked against null in PairRDDFunctions#saveAsNewAPIHadoopDataset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 1.4.0
    • Input/Output
    • None

    Description

      gtinside reported in the thread 'NullPointerException in TaskSetManager' with the following stack trace:

      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)
      

      Looks like the following call in finally block was the cause:

          writer.close(hadoopContext)
      

      We should check writer against null before calling close().

      Attachments

        Activity

          People

            tedyu@apache.org Ted Yu
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: