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