You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/09/28 13:00:33 UTC

[jira] [Commented] (SPARK-3712) add a new UpdateDStream to update a rdd dynamically

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

Apache Spark commented on SPARK-3712:
-------------------------------------

User 'uncleGen' has created a pull request for this issue:
https://github.com/apache/spark/pull/2562

> add a new UpdateDStream to update a rdd dynamically
> ---------------------------------------------------
>
>                 Key: SPARK-3712
>                 URL: https://issues.apache.org/jira/browse/SPARK-3712
>             Project: Spark
>          Issue Type: Improvement
>          Components: Streaming
>            Reporter: uncleGen
>            Priority: Minor
>
> Maybe, we can achieve the aim by using "forEachRdd"  function. But I feel weird in this way, because I need to pass a closure, like this:
>     val baseRdd = ...
>     var updatedRDD = ...
>     val inputStream = ...
>     val func = (rdd: RDD[T], t: Time) => {
>          updatedRDD = baseRDD.op(rdd)
>     }
>     inputStream.foreachRDD(func _)
> In my PR, we can update a rdd like:
>     val updateStream = inputStream.updateRDD(baseRDD, func).asInstanceOf[T, V, U]
> and obtain the updatedRDD like this:
>     val updatedRDD = updateStream.getUpdatedRDD



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org