title: How to combine two DStreams(pyspark)?
body: <p>I have a kafka stream coming in with some input topic. 
  This is the code i wrote for accepting kafka stream. </p>
  
  <pre><code>conf = SparkConf().setAppName(appname) 
  sc = SparkContext(conf=conf) 
  ssc = StreamingContext(sc) 
  kvs = KafkaUtils.createDirectStream(ssc, topics,\ 
              {"metadata.broker.list": brokers})
  </code></pre>
  
  <p>Then I create two DStreams of the keys and values of the original stream. </p>
  
  <pre><code>keys = kvs.map(lambda x: x[0].split(" ")) 
  values = kvs.map(lambda x: x[1].split(" "))
  </code></pre>
  
  <p>Then I perform some computation in the values DStream. 
  For Example,</p>
  
  <pre><code>val = values.flatMap(lambda x: x*2)
  </code></pre>
  
  <p>Now, I need to combine the keys and the val DStream and return the result in the form of Kafka stream. </p>
  
  <p>How to combine val to the corressponding key?</p>