I use the updateStateByKey function in a Spark Streaming application to save and update the state for each key. The question is that I want to know the "key" inside the update function.
input.updateStateByKey(updateStateByKeyOfUsers)
def updateStateByKeyOfUsers(newUsers: Seq[Set[String]],
userStatus: Option[(
): Option[(
//How to get the "Key"
}
-Tao
source
share