There are ClassTags for Array, List, and Map, as well as for Int, etc. that
you might have inside those collections. What do you mean by sql? Could you
post more of your code?

Dean Wampler, Ph.D.
Author: Programming Scala, 2nd Edition
<http://shop.oreilly.com/product/0636920033073.do> (O'Reilly)
Typesafe <http://typesafe.com>
@deanwampler <http://twitter.com/deanwampler>
http://polyglotprogramming.com

On Mon, Dec 21, 2015 at 8:51 PM, our...@cnsuning.com <our...@cnsuning.com>
wrote:

>
> spark streaming updateStateByKey state no support Array type  without
> classTag?  how to slove the problem?
>
> def updateStateByKey[S: ClassTag](
> updateFunc: (Seq[V], Option[S]) => Option[S]
> ): DStream[(K, S)] = ssc.withScope {
> updateStateByKey(updateFunc, defaultPartitioner())
> }
>
> ClassTag  not support other type eg:hashmap ,list ,sql.
>
>
> my usecase as following:
>      save the lastest three click log with collecting   goods  from
>  different topic with same  member ID,  then  the system will recommend
> related products according to  lastest three click log with collecting
> goods.
> I want to use updateStateByKey  state to save it ,however  updateStateByKey
> state is  nonsupport  other type except ClassTag  such as list.
>
>
>
>
>                                                                           
> thanks
> for your help
>
>
>
>
> ------------------------------
> Ricky  Ou(欧   锐)
>
>
>
>

Reply via email to