You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Prasad Mujumdar (JIRA)" <ji...@apache.org> on 2013/10/06 08:28:44 UTC
[jira] [Resolved] (HIVE-5456) Queries fail on avro backed table
with empty partition
[ https://issues.apache.org/jira/browse/HIVE-5456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Prasad Mujumdar resolved HIVE-5456.
-----------------------------------
Resolution: Duplicate
> Queries fail on avro backed table with empty partition
> -------------------------------------------------------
>
> Key: HIVE-5456
> URL: https://issues.apache.org/jira/browse/HIVE-5456
> Project: Hive
> Issue Type: Bug
> Components: Query Processor
> Affects Versions: 0.11.0
> Reporter: Prasad Mujumdar
>
> The following query fails
> {noformat}
> DROP TABLE IF EXISTS episodes_partitioned;
> CREATE TABLE episodes_partitioned
> PARTITIONED BY (doctor_pt INT)
> 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.literal'='{
> "namespace": "testing.hive.avro.serde",
> "name": "episodes",
> "type": "record",
> "fields": [
> {
> "name":"title",
> "type":"string",
> "doc":"episode title"
> },
> {
> "name":"air_date",
> "type":"string",
> "doc":"initial date"
> },
> {
> "name":"doctor",
> "type":"int",
> "doc":"main actor playing the Doctor in episode"
> }
> ]
> }');
> ALTER TABLE episodes_partitioned ADD PARTITION (doctor_pt=4);
> ALTER TABLE episodes_partitioned ADD PARTITION (doctor_pt=5);
> SELECT COUNT(*) FROM episodes_partitioned;
> {noformat}
> with following exception
> {noformat}
> java.io.IOException: org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Neither avro.schema.literal nor avro.schema.url specified, can't determine table schema
> at org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat.getHiveRecordWriter(AvroContainerOutputFormat.java:61)
> at org.apache.hadoop.hive.ql.exec.Utilities.createEmptyFile(Utilities.java:2869)
> at org.apache.hadoop.hive.ql.exec.Utilities.createDummyFileForEmptyPartition(Utilities.java:2901)
> at org.apache.hadoop.hive.ql.exec.Utilities.getInputPaths(Utilities.java:2825)
> at org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:381)
> at org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:136)
> at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
> at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
> at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1409)
> at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1187)
> at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1015)
> at org.apache.hadoop.hive.ql.Driver.run(Driver.java:883)
> at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
> at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
> at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:348)
> at org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:446)
> at org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:456)
> at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:737)
> at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
> at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.1#6144)