[ https://issues.apache.org/jira/browse/SPARK-10772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sean Owen updated SPARK-10772: ------------------------------ Assignee: Jack Hu > NullPointerException when transform function in DStream returns NULL > --------------------------------------------------------------------- > > Key: SPARK-10772 > URL: https://issues.apache.org/jira/browse/SPARK-10772 > Project: Spark > Issue Type: Bug > Components: Streaming > Affects Versions: 1.4.1, 1.5.0 > Reporter: Jack Hu > Assignee: Jack Hu > Priority: Minor > Fix For: 1.6.0 > > > NullPointerException raises when transform function returns NULL: > {quote} > java.lang.NullPointerException > at > org.apache.spark.streaming.dstream.DStream$$anonfun$clearMetadata$3.apply(DStream.scala:442) > at > org.apache.spark.streaming.dstream.DStream$$anonfun$clearMetadata$3.apply(DStream.scala:441) > at > scala.collection.mutable.HashMap$$anon$2$$anonfun$foreach$3.apply(HashMap.scala:107) > at > scala.collection.mutable.HashMap$$anon$2$$anonfun$foreach$3.apply(HashMap.scala:107) > at > scala.collection.mutable.HashTable$class.foreachEntry(HashTable.scala:226) > at scala.collection.mutable.HashMap.foreachEntry(HashMap.scala:39) > at scala.collection.mutable.HashMap$$anon$2.foreach(HashMap.scala:107) > at > org.apache.spark.streaming.dstream.DStream.clearMetadata(DStream.scala:441) > at > org.apache.spark.streaming.dstream.DStream$$anonfun$clearMetadata$5.apply(DStream.scala:454) > at > org.apache.spark.streaming.dstream.DStream$$anonfun$clearMetadata$5.apply(DStream.scala:454) > at scala.collection.immutable.List.foreach(List.scala:318) > at > org.apache.spark.streaming.dstream.DStream.clearMetadata(DStream.scala:454) > at > org.apache.spark.streaming.DStreamGraph$$anonfun$clearMetadata$2.apply(DStreamGraph.scala:129) > at > org.apache.spark.streaming.DStreamGraph$$anonfun$clearMetadata$2.apply(DStreamGraph.scala:129) > at > scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:59) > at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47) > at > org.apache.spark.streaming.DStreamGraph.clearMetadata(DStreamGraph.scala:129) > at > org.apache.spark.streaming.scheduler.JobGenerator.clearMetadata(JobGenerator.scala:257) > at > org.apache.spark.streaming.scheduler.JobGenerator.org$apache$spark$streaming$scheduler$JobGenerator$$processEvent(JobGenerator.scala:178) > at > org.apache.spark.streaming.scheduler.JobGenerator$$anon$1.onReceive(JobGenerator.scala:83) > at > org.apache.spark.streaming.scheduler.JobGenerator$$anon$1.onReceive(JobGenerator.scala:82) > at org.apache.spark.util.EventLoop$$anon$1.run(EventLoop.scala:48) > {quote} > The code is very simple: > {code} > val sc = new SparkContext(conf) > val sqlContext = new HiveContext(sc) > import sqlContext.implicits._ > println(">>> create streamingContext.") > val ssc = new StreamingContext(sc, Seconds(1)) > ssc.queueStream( > Queue( > sc.makeRDD(Seq(1)), > sc.makeRDD(Seq[Int]()), > sc.makeRDD(Seq(2)) > ), true).transform(rdd => if (rdd.isEmpty()) rdd else > null).print > ssc.start() > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org