hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rushil Gupta (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-6056) The AvroSerDe gives out BadSchemaException if a partition is added to the table
Date Thu, 19 Dec 2013 00:28:07 GMT

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

Rushil Gupta commented on HIVE-6056:
------------------------------------

Here is the full stacktrace:
at org.apache.hadoop.hive.serde2.avro.AvroObjectInspectorGenerator.createObjectInspectorWorker(AvroObjectInspectorGenerator.java:95)
	at org.apache.hadoop.hive.serde2.avro.AvroObjectInspectorGenerator.createObjectInspector(AvroObjectInspectorGenerator.java:81)
	at org.apache.hadoop.hive.serde2.avro.AvroObjectInspectorGenerator.<init>(AvroObjectInspectorGenerator.java:55)
	at org.apache.hadoop.hive.serde2.avro.AvroSerDe.initialize(AvroSerDe.java:69)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:203)
	at org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:260)
	at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:253)
	at org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:490)
	at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:518)
	at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3305)
	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:242)
	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:134)
	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)
	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1326)
	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1118)
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:951)
	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:258)
	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:215)
	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:406)
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:689)
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:557)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.hadoop.util.RunJar.main(RunJar.java:156)


> The AvroSerDe gives out BadSchemaException if a partition is added to the table
> -------------------------------------------------------------------------------
>
>                 Key: HIVE-6056
>                 URL: https://issues.apache.org/jira/browse/HIVE-6056
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema
>    Affects Versions: 0.11.0
>         Environment: amazon EMR (hadoop Amazon 1.0.3), avro-1.7.5
>            Reporter: Rushil Gupta
>
> While creating an external table if I do not add a partition, I am able to read files
using following format: 
> CREATE external TABLE event
> 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'
> LOCATION 's3n://test-event/input/2013/14/10'
> TBLPROPERTIES ('avro.schema.literal' = '..some schema..');
> but if I add a partition based on date
> CREATE external TABLE event
> PARTITIONED BY (ds STRING)
> 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'
> LOCATION 's3n://test-event/input/'
> TBLPROPERTIES ('avro.schema.literal' = '..some schema..');
> ALTER TABLE event ADD IF NOT EXISTS PARTITION (ds = '2013_12_16') LOCATION '2013/12/16/';
> I get the following exception:
> java.io.IOException:org.apache.hadoop.hive.serde2.avro.BadSchemaException



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message