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.