[
https://issues.apache.org/jira/browse/MAPREDUCE-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12805106#action_12805106
]
Doug Cutting commented on MAPREDUCE-1126:
-----------------------------------------
For folk's consideration, here's what creation of an Avro-based Job looks like
after this and MAPREDUCE-815 are committed:
{code}
// Create a MapReduce job to sort this input.
Job job = new Job();
job.setInputFormatClass(AvroInputFormat.class);
job.setOutputFormatClass(AvroOutputFormat.class);
job.setNumReduceTasks(1);
Configuration conf = job.getConfiguration();
SchemaBasedJobData.setOutputKeySchema(conf, schema);
SchemaBasedJobData.setOutputValueSchema(conf,
Schema.create(Schema.Type.NULL));
Path outPath = new Path(workDir, "out");
FileInputFormat.addInputPath(job, inPath);
FileOutputFormat.setOutputPath(job, outPath);
boolean result = job.waitForCompletion(true);
{code}
Is this API markedly more complex that what we have now? It is markedly more
powerful, since, e.g., nulls, unions, arrays, maps, and bulit-in types may be
passed directly, without creating a wrapper class. A custom input
serialization (e.g., for log files or Pig data) can be easily and freely
intermixed in a job with a library of standard serializations (Avro in various
flavors, Writable, etc.).
> shuffle should use serialization to get comparator
> --------------------------------------------------
>
> Key: MAPREDUCE-1126
> URL: https://issues.apache.org/jira/browse/MAPREDUCE-1126
> Project: Hadoop Map/Reduce
> Issue Type: Improvement
> Components: task
> Reporter: Doug Cutting
> Assignee: Aaron Kimball
> Fix For: 0.22.0
>
> Attachments: MAPREDUCE-1126.2.patch, MAPREDUCE-1126.3.patch,
> MAPREDUCE-1126.4.patch, MAPREDUCE-1126.5.patch, MAPREDUCE-1126.6.patch,
> MAPREDUCE-1126.patch
>
>
> Currently the key comparator is defined as a Java class. Instead we should
> use the Serialization API to create key comparators. This would permit,
> e.g., Avro-based comparators to be used, permitting efficient sorting of
> complex data types without having to write a RawComparator in Java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.