笛卡儿级联产品 [英] cartesian product in cascading
问题描述
我正在研究一个级联程序,它不仅需要查找字数,还需要查找所有字的总和。我没有任何问题,只要将自己计算在内,并计算所有计数的总和,就可以将其分配到一个带有一个字段和一个元组的单独管道中。
如果我可以得到每个字数元组的总数,那么计算就没有问题了。这是一个简单的笛卡尔产品......但我该怎么做?它似乎应该是一个没有连接字段的CoGroup,但这是不允许的。
可以使用 buffers 。
举例输入数据,以便我可以帮助您一个解决方案。
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.
Cartesian product in cascading can be achieved using buffers .
Give me example for input data so that i can assist you with a solution.
这篇关于笛卡儿级联产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!