0

I am creating a hive table using avro serde to store twitter data.

Here's the code-

create table tweets
    row format serde
    'org.apache.hadoop.hive.serde2.avro.AvroSerde'
    stored as inputformat
    'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
    outputformat
    'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
 tblproperties('avro.schema.url'='hdfs://user/itelligence/ee/TwitterDataAvroSchema.avsc');

I am getting error-

FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. 
Cannot validate serde: org.apache.hadoop.hive.serde2.avro.AvroSerde

I already tried giving input of avsc file as

tblproperties('avro.schema.url'='hdfs:///user/itelligence/ee/TwitterDataAvroSchema.avsc');
tblproperties('avro.schema.url'='file://user/itelligence/schema/TwitterDataAvroSchema.avsc');

In both local and hdfs file systems I am getting the same error.

dtolnay
  • 9,621
  • 5
  • 41
  • 62
vinay
  • 167
  • 1
  • 4
  • 12

1 Answers1

0

The error message states that Hive does not find the SerDe Java class. It does not even bother to read the schema...

Note that "SerDe" has a capital D because it stands for Serializer-Deserializer.
So just fix your typo in AvroSerDe and try again.

Samson Scharfrichter
  • 8,884
  • 1
  • 17
  • 36