hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Hsu (JIRA)" <>
Subject [jira] [Commented] (HIVE-7868) AvroSerDe error handling could be improved
Date Thu, 26 May 2016 01:38:12 GMT


Anthony Hsu commented on HIVE-7868:

bq. Fixing bad URL schema works.

I am also unable to do this. If I create a table with a valid avro.schema.url, then delete
the file from HDFS, and then try to alter the table's avro.schema.url to point to a new location,
Hive still tries to validate the old location and fails the query:
hive> alter table avro_schema_url set tblproperties ('avro.schema.url'='hdfs:///user/ahsu/tmp/int.avsc');
FAILED: RuntimeException MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
Encountered AvroSerdeException determining schema. Returning signal schema to indicate problem:
Unable to read schema from given path: hdfs:///user/ahsu/int.avsc)

Is the only workaround for this recreating the original location?

> AvroSerDe error handling could be improved
> ------------------------------------------
>                 Key: HIVE-7868
>                 URL:
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Brock Noland
>            Assignee: Ferdinand Xu
>             Fix For: 1.1.0
>         Attachments: HIVE-7868.1.patch, HIVE-7868.2.patch
> When an Avro schema is invalid, AvroSerDe returns an error message instead of throwing
an exception. This is described in {{AvroSerdeUtils.determineSchemaOrReturnErrorSchema}}:
> {noformat}
>   /**
>    * Attempt to determine the schema via the usual means, but do not throw
>    * an exception if we fail.  Instead, signal failure via a special
>    * schema.  This is used because Hive calls init on the serde during
>    * any call, including calls to update the serde properties, meaning
>    * if the serde is in a bad state, there is no way to update that state.
>    */
> {noformat}
> I believe we should find a way to provide a better experience to our users.

This message was sent by Atlassian JIRA

View raw message