Avro Backed Hive Table in CDH5 (or CDH4.5): Encountered AvroSerdeException determining schema

You are using Hive and some of your tables are backed by the Avro Serde. You are seeing a lot of this:

WARN avro.AvroSerdeUtils: Encountered AvroSerdeException determining schema. 
Returning signal schema to indicate problem org.apache.hadoop.hive.serde2.avro.AvroSerdeException: 
Neither avro.schema.literal nor avro.schema.url specified, can't determine table schema

Sometimes this WARN becomes an ERRORĀ and your queries completely fail! This is driving you mad as you have in fact specified the schema, and this is obvious because sometimes the queries work just fine, despite the warning. If this is you, read on!

Continue reading