问题
I'm working on a cascading program which needs to find not only a word count, but also the total fraction of all words that accounts for. I've had no problem getting as far as the word count itself and also computing the sum of all the counts, into a separate pipe with one field and one tuple.
If I can get the total on to each word count tuple, I'll have no problem doing the computation. It's a simple cartesian product... but how do I do that? It seems like it should be a CoGroup with no join fields, but that's not allowed.
回答1:
Cartesian product in cascading can be achieved using buffers .
Give me example for input data so that i can assist you with a solution.
check this
来源:https://stackoverflow.com/questions/14681506/cartesian-product-in-cascading