Group key

47 views
Skip to first unread message

Jay Vyas

unread,
Nov 11, 2012, 3:00:17 PM11/11/12
to pangoo...@googlegroups.com
I'm noticing the "group" key isn't used very often in panel examples.  

This makes sense - the reducer value input schema is  a superset  of that in the keys.

That being the case - and given that the data model only uses "group by" internally to group keys before reducing - why not simplify the TupleReducer(..) signature to :

@Override

public void reduce(Iterable<ITuple> tuples, TupleMRContext context, Collector collector) throws IOException, InterruptedException, TupleMRException 

{


}


Or alternatively, maybe the grouping parameter is not needed in the ITuple values.

Just a suggestion - let me know if I'm missing something.

--
Jay Vyas
http://jayunit100.blogspot.com

Pere Ferrera Bertran

unread,
Nov 12, 2012, 4:29:16 AM11/12/12
to pangoo...@googlegroups.com
Hi Jay,

We thought about that, but in the end decided to include the "group tuple". I think if you want to perform some checking on the properties of the group (the group by fields) it makes more sense to have a separate Tuple for that rather than getting the first one of the Iterable. But it's one of these design decisions, you know, maybe a matter of taste. It could have been like you suggest as well.

2012/11/11 Jay Vyas <jayun...@gmail.com>



--
Pere Ferrera
CTO & Co-founder

Reply all
Reply to author
Forward
0 new messages