You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Chinna Rao Lalam (JIRA)" <ji...@apache.org> on 2011/03/08 15:12:59 UTC

[jira] Commented: (HIVE-2031) Correct the exception message for the better traceability for the scenario load into the partitioned table having 2 partitions by specifying only one partition in the load statement.

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

Chinna Rao Lalam commented on HIVE-2031:
----------------------------------------



{noformat}

create table sampletable (a string,b string) PARTITIONED BY(dt STRING, country STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '@'";

LOAD DATA INPATH '/user/root/mytable/joindata.txt' OVERWRITE INTO TABLE sampletable partition (dt='21Oct');

{noformat}

The above query will fail because load query don't have 2 partitions information. If the log message is coming like this it is easy to debug

{noformat}
2011-03-08 17:13:20,901 ERROR ql.Driver (SessionState.java:printError(365)) - FAILED: Error in semantic analysis: line 1:91 Partition not found '21Oct'
org.apache.hadoop.hive.ql.parse.SemanticException: line 1:91 Partition not found '21Oct'
	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer$tableSpec.<init>(BaseSemanticAnalyzer.java:685)
	.............
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: table is partitioned but partition spec is not specified or does not fully match table partitioning: {dt=21Oct}
	at org.apache.hadoop.hive.ql.metadata.Table.isValidSpec(Table.java:341)
	........... 11 more
{noformat}

> Correct the exception message for the better traceability for the scenario load into the partitioned table having 2  partitions by specifying only one partition in the load statement. 
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2031
>                 URL: https://issues.apache.org/jira/browse/HIVE-2031
>             Project: Hive
>          Issue Type: Bug
>          Components: Logging
>    Affects Versions: 0.7.0
>         Environment: Hadoop 0.20.1, Hive0.7.0 and SUSE Linux Enterprise Server 10 SP2 (i586) - Kernel 2.6.16.60-0.21-smp (5).
>            Reporter: Chinna Rao Lalam
>            Assignee: Chinna Rao Lalam
>         Attachments: HIVE-2031.patch
>
>
>  Load into the partitioned table having 2 partitions by specifying only one partition in the load statement is failing and logging the following exception message.
> {noformat}
>  org.apache.hadoop.hive.ql.parse.SemanticException: line 1:91 Partition not found '21Oct'
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer$tableSpec.<init>(BaseSemanticAnalyzer.java:685)
> 	at org.apache.hadoop.hive.ql.parse.LoadSemanticAnalyzer.analyzeInternal(LoadSemanticAnalyzer.java:196)
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
> 	at org.apache.hadoop.hive.service.HiveServer$HiveServerHandler.execute(HiveServer.java:151)
> 	at org.apache.hadoop.hive.service.ThriftHive$Processor$execute.process(ThriftHive.java:764)
> 	at org.apache.hadoop.hive.service.ThriftHive$Processor.process(ThriftHive.java:742)
> 	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 	at java.lang.Thread.run(Thread.java:619)
> {noformat}
> This needs to be corrected in such a way what is the actual root cause for this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira