hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xuefu Zhang (JIRA)" <>
Subject [jira] [Commented] (HIVE-5318) Import Throws Error when Importing from a table export Hive 0.9 to Hive 0.10
Date Sat, 21 Sep 2013 23:48:51 GMT


Xuefu Zhang commented on HIVE-5318:

[~ashutoshc] Test was planed when patch is submitted.

As to the nullness of these lists, your assumption might be well correct, but that's not what
I see in the code.

Here is the caller code in ImportSemanticAnalyzer.

        tblDesc =  new CreateTableDesc(
            false, // isExternal: set to false here, can be overwritten by the
                   // IMPORT stmt
            null, null, null, null, null, // these 5 delims passed as serde params
            null, // comment passed as table params
            null, // location: set to null here, can be
                  // overwritten by the IMPORT stmt
            null, // storagehandler passed as table params
            table.getParameters(), false,
            (null == table.getSd().getSkewedInfo()) ? null : table.getSd().getSkewedInfo()
            (null == table.getSd().getSkewedInfo()) ? null : table.getSd().getSkewedInfo()


>From the snippet we can see that, it's possible that the last two lists can be null. Also,
the partition columns was passed from the thrift "table" object, for which null is clearly
a valid value.

For reference, this is the metadata for an exported, simple table with two columns and two
rows of data:


This piece of meta data contains no partition columns, or skewedkey/values, etc.

Could you clarify if you meant to say that the list should not null but with zero element?
For unknown reason, the code doesn't reflect that either. for instance, Utilities.getFieldSchemaString()
has code to handle a null list of partition columns.

Any further insight is appreciated.

> Import Throws Error when Importing from a table export Hive 0.9 to Hive 0.10
> ----------------------------------------------------------------------------
>                 Key: HIVE-5318
>                 URL:
>             Project: Hive
>          Issue Type: Bug
>          Components: Import/Export
>    Affects Versions: 0.9.0, 0.10.0
>            Reporter: Brad Ruderman
>            Assignee: Xuefu Zhang
>            Priority: Critical
>         Attachments: HIVE-5318.patch
> When Exporting hive tables using the hive command in Hive 0.9 "EXPORT table TO 'hdfs_path'"
then importing to another hive 0.10 instance using "IMPORT FROM 'hdfs_path'", hive throws
this error:
> 13/09/18 13:14:02 ERROR ql.Driver: FAILED: SemanticException Exception while processing
> org.apache.hadoop.hive.ql.parse.SemanticException: Exception while processing
> 	at org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer.analyzeInternal(
> 	at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(
> 	at org.apache.hadoop.hive.ql.Driver.compile(
> 	at org.apache.hadoop.hive.ql.Driver.compile(
> 	at
> 	at
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(
> 	at
> 	at org.apache.hadoop.hive.cli.CliDriver.main(
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> 	at java.lang.reflect.Method.invoke(
> 	at org.apache.hadoop.util.RunJar.main(
> Caused by: java.lang.NullPointerException
> 	at java.util.ArrayList.<init>(
> 	at org.apache.hadoop.hive.ql.plan.CreateTableDesc.<init>(
> 	at org.apache.hadoop.hive.ql.parse.ImportSemanticAnalyzer.analyzeInternal(
> 	... 16 more
> 13/09/18 13:14:02 INFO ql.Driver: </PERFLOG method=compile start=1379535241411 end=1379535242332
> 13/09/18 13:14:02 INFO ql.Driver: <PERFLOG method=releaseLocks>
> 13/09/18 13:14:02 INFO ql.Driver: </PERFLOG method=releaseLocks start=1379535242332
end=1379535242332 duration=0>
> 13/09/18 13:14:02 INFO ql.Driver: <PERFLOG method=releaseLocks>
> 13/09/18 13:14:02 INFO ql.Driver: </PERFLOG method=releaseLocks start=1379535242333
end=1379535242333 duration=0>
> This is probably a critical blocker for people who are trying to test Hive 0.10 in their
staging environments prior to the upgrade from 0.9

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message