You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by Gaurav Jain <ja...@student.ethz.ch> on 2014/06/16 18:47:56 UTC

Re: Java updateStateByKey

Probably, not the answer you are looking for, but you can always include the
'key' in each of the 'New Values' itself. Something like:

class myVal {
    T myData;
    T key;
}

and in your updateStateByKey function, access the 'key' as val.key (which
would be the same for each of the items in List<New Values>. 



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