Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val totalsAndProds = transByProd.leftOuterJoin(products)
- println(totalsAndProds.first())
- (19,([Ljava.lang.String;@261ea657,Some([Ljava.lang.String;@25290bca)))
- totalsAndProds.filter(x => x._2 == Some).first
- Exception in thread "main" java.lang.UnsupportedOperationException: empty collection
- at org.apache.spark.rdd.RDD$$anonfun$first$1.apply(RDD.scala:1380)
- at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:151)
- at org.apache.spark.rdd.RDDOperationScope$.withScope(RDDOperationScope.scala:112)
- at org.apache.spark.rdd.RDD.withScope(RDD.scala:363)
- at org.apache.spark.rdd.RDD.first(RDD.scala:1377)
- at com.example.spark.WordCount$.main(WordCount.scala:98)
- at com.example.spark.WordCount.main(WordCount.scala)
- totalsAndProds.filter{ case (_, (_, s)) => s.isDefined }
Add Comment
Please, Sign In to add comment