Support Questions
Find answers, ask questions, and share your expertise

Avoiding Key Value Literals in Map reduce out put

Highlighted

Avoiding Key Value Literals in Map reduce out put

Champion Alumni

Hello,

My map reduce program currently outputs  avro data in the following format.Is there a way I can avoid the key and literals in the output?

 

{
"type" : "record",
"name" : "KeyValuePair",
"namespace" : "org.apache.avro.mapreduce",
"doc" : "A key/value pair",
"fields" : [ {
"name" : "key",
"type" : "null",
"doc" : "The key"
}, {
"name" : "value",
"type" : {
"type" : "record",
"name" : "RecordType",
"namespace" : "model",
"fields" : [ {  ]} }

1 REPLY 1

Re: Avoiding Key Value Literals in Map reduce out put

Champion Alumni

If you want container  files rather than   key value pairs as part of map reduce output you  should use https://avro.apache.org/docs/1.7.6/api/java/org/apache/avro/mapred/AvroOutputFormat.html  than KeyValueOutputFormat