You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Tathagata Das (JIRA)" <ji...@apache.org> on 2014/11/20 10:17:34 UTC

[jira] [Resolved] (SPARK-4481) Some comments for `updateStateByKey` are wrong

     [ https://issues.apache.org/jira/browse/SPARK-4481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tathagata Das resolved SPARK-4481.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.2.0

> Some comments for `updateStateByKey` are wrong
> ----------------------------------------------
>
>                 Key: SPARK-4481
>                 URL: https://issues.apache.org/jira/browse/SPARK-4481
>             Project: Spark
>          Issue Type: Documentation
>          Components: Streaming
>    Affects Versions: 1.1.0
>            Reporter: Shixiong Zhu
>            Assignee: Shixiong Zhu
>             Fix For: 1.2.0, 1.3.0
>
>
> The following `updateStateByKey` overloads have wrong description for `updateFunc`
> {code:java}
>   /**
>    * @param updateFunc State update function. If `this` function returns None, then
>    *                   corresponding state key-value pair will be eliminated. Note, that
>    *                   this function may generate a different a tuple with a different key
>    *                   than the input key. It is up to the developer to decide whether to
>    *                   remember the partitioner despite the key being changed.
>    */
>   def updateStateByKey[S: ClassTag](
>       updateFunc: (Iterator[(K, Seq[V], Option[S])]) => Iterator[(K, S)],
>       partitioner: Partitioner,
>       rememberPartitioner: Boolean
>     ): DStream[(K, S)]
>   /**
>    * @param updateFunc State update function. If `this` function returns None, then
>    *                   corresponding state key-value pair will be eliminated. Note, that
>    *                   this function may generate a different a tuple with a different key
>    *                   than the input key. It is up to the developer to decide whether to
>    *                   remember the partitioner despite the key being changed.
>    */
>   def updateStateByKey[S: ClassTag](
>       updateFunc: (Iterator[(K, Seq[V], Option[S])]) => Iterator[(K, S)],
>       partitioner: Partitioner,
>       rememberPartitioner: Boolean,
>       initialRDD: RDD[(K, S)]
>     ): DStream[(K, S)]
> {code}
> ` If `this` function returns None, then corresponding state key-value pair will be eliminated.` should be removed.



--
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