hadoopmapreducehiveclouderaavro

How to import an AvroKeyValueOutputFormat file into hive?


My mapreduce writes an avro file with the AvroKeyValueOutputFormat but I'm having some troubles to import this file into hive.

How I have to define my schema in hive to get it working?


Solution

  • you have to use the AvroSerDe described in

    https://cwiki.apache.org/confluence/display/Hive/AvroSerDe

    or you have to transform your output to the RowFormat that you are using in your defined hive table (again using another mapreduce job)