Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 806CF104A0 for ; Thu, 14 Nov 2013 18:33:51 +0000 (UTC) Received: (qmail 75412 invoked by uid 500); 14 Nov 2013 18:33:42 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 74850 invoked by uid 500); 14 Nov 2013 18:33:37 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 73996 invoked by uid 500); 14 Nov 2013 18:33:30 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 73956 invoked by uid 99); 14 Nov 2013 18:33:29 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Nov 2013 18:33:29 +0000 Date: Thu, 14 Nov 2013 18:33:29 +0000 (UTC) From: "Sergey (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-5820) Neither avro.schema.literal nor avro.schema.url specified, can't determine table schema MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-5820?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13822= 734#comment-13822734 ]=20 Sergey commented on HIVE-5820: ------------------------------ Ok, thanks! 2013/11/14 Xuefu Zhang (JIRA) > Neither avro.schema.literal nor avro.schema.url specified, can't determin= e table schema > -------------------------------------------------------------------------= -------------- > > Key: HIVE-5820 > URL: https://issues.apache.org/jira/browse/HIVE-5820 > Project: Hive > Issue Type: Bug > Affects Versions: 0.10.0 > Environment: CDH 4.3 Hive 0.10.0+121 > Reporter: Sergey > > Hi, we've created a table: > {code} > create table tmp > comment 'tmp' > partitioned by (year string, month string, day string, fulldate string) > row format serde 'org.apache.hadoop.hive.serde2.avro.AvroSerDe' > stored as > inputformat 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputForm= at' > outputformat 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFo= rmat' > location '/user/lol/tmp' > tblproperties ('avro.schema.literal' =3D > '{"name": "tmp", "doc": "version 0.0.1", "type": "record", "fields": = [ > {"name": "a", "type": "int"}, > {"name": "b", "type": "int"} > ]}' > ) > {code} > And we try to query it: > {code} > select * from tmp > {code} > and we get an exception > {code} > 13/11/14 17:12:15 WARN avro.AvroSerdeUtils: Encountered AvroSerdeExceptio= n determining schema. Returning signal schema to indicate problem > org.apache.hadoop.hive.serde2.avro.AvroSerdeException: Neither avro.schem= a.literal nor avro.schema.url specified, can't determine table schema > =09at org.apache.hadoop.hive.serde2.avro.AvroSerdeUtils.determineSchemaOr= ThrowException(AvroSerdeUtils.java:66) > =09at org.apache.hadoop.hive.serde2.avro.AvroSerdeUtils.determineSchemaOr= ReturnErrorSchema(AvroSerdeUtils.java:87) > =09at org.apache.hadoop.hive.serde2.avro.AvroSerDe.initialize(AvroSerDe.j= ava:59) > =09at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(Met= aStoreUtils.java:249) > =09at org.apache.hadoop.hive.ql.metadata.Partition.getDeserializer(Partit= ion.java:251) > =09at org.apache.hadoop.hive.ql.metadata.Partition.initialize(Partition.j= ava:217) > =09at org.apache.hadoop.hive.ql.metadata.Partition.(Partition.java:= 107) > =09at org.apache.hadoop.hive.ql.metadata.Hive.getPartitions(Hive.java:157= 3) > =09at org.apache.hadoop.hive.ql.optimizer.ppr.PartitionPruner.prune(Parti= tionPruner.java:190) > =09at org.apache.hadoop.hive.ql.parse.ParseContext.getPrunedPartitions(Pa= rseContext.java:561) > =09at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer.checkTree(= SimpleFetchOptimizer.java:144) > =09at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer.optimize(S= impleFetchOptimizer.java:100) > =09at org.apache.hadoop.hive.ql.optimizer.SimpleFetchOptimizer.transform(= SimpleFetchOptimizer.java:74) > =09at org.apache.hadoop.hive.ql.optimizer.Optimizer.optimize(Optimizer.ja= va:102) > =09at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(Se= manticAnalyzer.java:8200) > =09at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSe= manticAnalyzer.java:258) > =09at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:457) > =09at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:349) > =09at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.checkedCo= mpile(BeeswaxServiceImpl.java:247) > =09at com.cloudera.beeswax.BeeswaxServiceImpl$RunningQueryState.compile(B= eeswaxServiceImpl.java:200) > =09at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.ja= va:830) > =09at com.cloudera.beeswax.BeeswaxServiceImpl$2.run(BeeswaxServiceImpl.ja= va:823) > =09at java.security.AccessController.doPrivileged(Native Method) > =09at javax.security.auth.Subject.doAs(Subject.java:396) > =09at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInfor= mation.java:1408) > =09at com.cloudera.beeswax.BeeswaxServiceImpl.doWithState(BeeswaxServiceI= mpl.java:772) > =09at com.cloudera.beeswax.BeeswaxServiceImpl.query(BeeswaxServiceImpl.ja= va:822) > =09at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(B= eeswaxService.java:915) > =09at com.cloudera.beeswax.api.BeeswaxService$Processor$query.getResult(B= eeswaxService.java:899) > =09at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) > =09at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) > =09at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThrea= dPoolServer.java:206) > =09at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolEx= ecutor.java:886) > =09at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecut= or.java:908) > =09at java.lang.Thread.run(Thread.java:662) > 13/11/14 17:12:15 INFO parse.SemanticAnalyzer: Completed plan generation > 13/11/14 17:12:15 INFO ql.Driver: Semantic Analysis Completed > {code} > here is describe: > {code} > 0=09a=09int=09from deserializer > 1=09b=09int=09from deserializer > 2=09year=09string=09 > 3=09month=09string=09 > 4=09day=09string=09 > 5=09fulldate=09string=09 > 6=09=09=09 > 7=09Detailed Table Information=09Table(tableName:tmp, dbName:default, own= er:devops, createTime:1384435112, lastAccessTime:0, retention:0, sd:Storage= Descriptor(cols:[], location:hdfs://nameservice1/user/fedyakov/tmp, inputFo= rmat:org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat, outputForm= at:org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat, compressed:= false, numBuckets:-1, serdeInfo:SerDeInfo(name:null, serializationLib:org.a= pache.hadoop.hive.serde2.avro.AvroSerDe, parameters:{serialization.format= =3D1}), bucketCols:[], sortCols:[], parameters:{}, skewedInfo:SkewedInfo(sk= ewedColNames:[], skewedColValues:[], skewedColValueLocationMaps:{}), stored= AsSubDirectories:false), partitionKeys:[FieldSchema(name:year, type:string,= comment:null), FieldSchema(name:month, type:string, comment:null), FieldSc= hema(name:day, type:string, comment:null), FieldSchema(name:fulldate, type:= string, comment:null)], parameters:{numPartitions=3D1, numFiles=3D1, avro.s= chema.literal=3D{"name": "tmp", "doc": "version 0.0.1", "type": "record", "= fields": [=09 > 8=09 {"name": "a", "type": "int"},=09=09 > 9=09 {"name": "b", "type": "int"}=09=09 > 10=09 ]}, transient_lastDdlTime=3D1384435137, numRows=3D0, totalSize=3D18= 9, rawDataSize=3D0}, viewOriginalText:null, viewExpandedText:null, tableTyp= e:MANAGED_TABLE)=09 > {code} > If we sepcify file instead of "embedded" avro schema, it works. -- This message was sent by Atlassian JIRA (v6.1#6144)