hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Hsu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-7868) AvroSerDe error handling could be improved
Date Wed, 27 Apr 2016 18:51:12 GMT

    [ https://issues.apache.org/jira/browse/HIVE-7868?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15260739#comment-15260739
] 

Anthony Hsu commented on HIVE-7868:
-----------------------------------

[~brocknoland]: you mentioned above that
{quote}
Fixing bad literal schema works.
{quote}

However, if I have an existing Avro Hive table with an invalid {{avro.schema.literal}} (created
using a prior version of Hive), if I then use a version of Hive with this patch, I cannot
alter the {{avro.schema.literal}} or drop the table. In both cases, I get a {{Encountered
exception determining schema}} and cannot fix the schema / drop the table.

Do you know of a workaround to fix/drop a table with a bad schema without reverting to using
an older version of Hive (without this patch)?

> AvroSerDe error handling could be improved
> ------------------------------------------
>
>                 Key: HIVE-7868
>                 URL: https://issues.apache.org/jira/browse/HIVE-7868
>             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
(v6.3.4#6332)

Mime
View raw message