stream.map(record => (keyFunction(record), record))
For future reference, this question should go to the user list, not dev list. On Sun, Sep 20, 2015 at 11:47 PM, guoxu1231 <guoxu1...@gmail.com> wrote: > Hi Spark Experts, > > I'm trying to use join(otherStream, [numTasks]) on DStreams, and it > requires called on two DStreams of (K, V) and (K, W) pairs, > > Usually in common RDD, we could use keyBy(f) to build the (K, V) pair, > however I could not find it in DStream. > > My question is: > What is the expected way to build (K, V) pair in DStream? > > > Thanks > Shawn > > > > > -- > View this message in context: > http://apache-spark-developers-list.1001551.n3.nabble.com/Join-operation-on-DStreams-tp14228.html > Sent from the Apache Spark Developers List mailing list archive at > Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org > For additional commands, e-mail: dev-h...@spark.apache.org > >