java: add reducer that separates keys and values when map output is pairs
-------------------------------------------------------------------------

                 Key: AVRO-581
                 URL: https://issues.apache.org/jira/browse/AVRO-581
             Project: Avro
          Issue Type: New Feature
          Components: java
            Reporter: Doug Cutting
            Assignee: Doug Cutting
             Fix For: 1.4.0


We should add a Pair<K,V> class, implementing SpecificRecord, that combines 
instances of two schemas (specific or generic).  Pairs would be compared by 
key, ignoring value.  The template for its schema would be:

{code}
{"type": "record", "name": "org.apache.avro.mapred.Pair", "fields":[
  {"name": "key", "type":" <<insert key schema here>>},
  {"name": "value", "order": "ignore", "type": <<insert value schema>>}
]}
{code}

When map outputs are instances of this class, a reducer may be used whose 
reduce method is something like:

public abstract void reduce(K key, Iterable<V> values);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to