JavaDStream.saveAsTextFiles not exists in Spark Java Api. If you want to
persist every RDD in your JavaDStream you should do something like this:

words.foreachRDD(new Function2<JavaRDD&lt;String>, Time, Void>() {
     @Override
     public Void call(JavaRDD<SparkFlumeEvent> rddWords, Time arg1) throws
Exception {
          rddWords.saveAsTextFiles(arg1,arg2);
     }
});

In fact, if you look into DStream.scala 
https://github.com/apache/spark/blob/master/streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala
<https://github.com/apache/spark/blob/master/streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala>
 
, you can see how saveAsTextFile is implemented.




--
View this message in context: 
http://apache-spark-user-list.1001560.n3.nabble.com/SparkStream-saveAsTextFiles-tp22719p22720.html
Sent from the Apache Spark User List mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@spark.apache.org
For additional commands, e-mail: user-h...@spark.apache.org

Reply via email to