I have an RDD that contains a set of tuples of type (String,String) and since they aren't unique I want to get a look at how many times each string string combination occurs so I use countByValue like so
val PairCount = Pairs.countByVlaue()
which gives me a tuple as output like this ((String,String),Long) where long is the number of times that the (String, String) tuple appeared
the Strings can repeat in different combinations and I essentially want to run word count on this PairCount variable so I tried something like this to start:
val PairCount.map(x => (x._1._1, x._2))
but the output the this spits out is String1->1, String2->1, String3->1.
How to I output a key value pair from a map job in this case where the key is going to be one of the String values from the ier tuple, and the value is going to be the Long value from the outter tuple?
