def mapGroup[V](smfn : (K, Iterator[T]) => Iterator[V]): This[K, V]
--
You received this message because you are subscribed to the Google Groups "cascading-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascading-use...@googlegroups.com.
To post to this group, send email to cascadi...@googlegroups.com.
Visit this group at http://groups.google.com/group/cascading-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/cascading-user/916e99aa-19c1-41c8-af20-c052c6d64c72%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
In the fields API you should be able to access key fields in the reduce operations. Did this fail for you?
On Thursday, December 19, 2013, Neta wrote:
Hi,
I'm writing a scalding job that needs to group by some key, then use the key's value in the ReduceOperation. How can this be done?
For example, if I calculate a histogram I can use constant width=0.1 and write:
.groupBy('group){_.histogram('value->'hist, 0.1)}
But I'd like the width to depend on the values in the stream and write something like:
.groupBy(('group,'width)){_.histogram('value->'hist, 'width)}
In vanilla mapReduce I have access to the key:
void reduce(K2 key,
Iterator<V2> values,
(I know I can create a Histogram from each value using a map operation and then reduce the Histograms, but I'd like to know if there's a more elegant way).
Thanks.
This message may contain confidential and/or privileged information.If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.--
You received this message because you are subscribed to the Google Groups "cascading-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascading-user+unsubscribe@googlegroups.com.
To post to this group, send email to cascading-user@googlegroups.com.
Visit this group at http://groups.google.com/group/cascading-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/cascading-user/916e99aa-19c1-41c8-af20-c052c6d64c72%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--Oscar Boykin :: @posco :: http://twitter.com/posco
In the fields API you should be able to access key fields in the reduce operations. Did this fail for you?
On Thursday, December 19, 2013, Neta wrote:
Hi,
I'm writing a scalding job that needs to group by some key, then use the key's value in the ReduceOperation. How can this be done?
For example, if I calculate a histogram I can use constant width=0.1 and write:
.groupBy('group){_.histogram('value->'hist, 0.1)}
But I'd like the width to depend on the values in the stream and write something like:
.groupBy(('group,'width)){_.histogram('value->'hist, 'width)}
In vanilla mapReduce I have access to the key:
void reduce(K2 key,
Iterator<V2> values,
(I know I can create a Histogram from each value using a map operation and then reduce the Histograms, but I'd like to know if there's a more elegant way).
Thanks.
This message may contain confidential and/or privileged information.If you are not the addressee or authorized to receive this on behalf of the addressee you must not use, copy, disclose or take action based on this message or any information herein.If you have received this message in error, please advise the sender immediately by reply email and delete this message. Thank you.--
You received this message because you are subscribed to the Google Groups "cascading-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cascading-user+unsubscribe@googlegroups.com.
To post to this group, send email to cascading-user@googlegroups.com.
Visit this group at http://groups.google.com/group/cascading-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/cascading-user/916e99aa-19c1-41c8-af20-c052c6d64c72%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.