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

Jake Farrell commented on HIVE-1712:
------------------------------------

Tracked down the issue to the SERDE_PARAMS table which in the mysql create 
statement has  `PARAM_VALUE` default NULL.  The values that are saved to the db 
when hive loads the data are blank, when exported from derby they are blank in 
the csv, and when imported into mysql are defaulted to NULL. This NULL value 
when picked up by MetaStoreUtils is not being caught and causes the 
NullPointerException

> Migrating metadata from derby to mysql thrown NullPointerException
> ------------------------------------------------------------------
>
>                 Key: HIVE-1712
>                 URL: https://issues.apache.org/jira/browse/HIVE-1712
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 0.5.0
>            Reporter: Jake Farrell
>
> Exported derby data to csv, loaded data into mysql and ran hive query which 
> worked in derby and got the following exception
> 2010-10-16 08:57:29,080 INFO  metastore.ObjectStore 
> (ObjectStore.java:setConf(106)) - Initialized ObjectStore
> 2010-10-16 08:57:29,552 INFO  metastore.HiveMetaStore 
> (HiveMetaStore.java:logStartFunction(171)) - 0: get_table : db=default 
> tbl=testimport
> 2010-10-16 08:57:30,140 ERROR metadata.Hive (Hive.java:getTable(395)) - 
> java.lang.NullPointerException
>         at java.util.Hashtable.put(Hashtable.java:394)
>         at java.util.Hashtable.putAll(Hashtable.java:466)
>         at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.getSchema(MetaStoreUtils.java:520)
>         at 
> org.apache.hadoop.hive.metastore.MetaStoreUtils.getSchema(MetaStoreUtils.java:489)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:381)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:333)
>         at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:683)
>         at 
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:5200)
>         at 
> org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:105)
>         at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:275)
>         at org.apache.hadoop.hive.ql.Driver.runCommand(Driver.java:320)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:312)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:123)
>         at 
> org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:181)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:287)
>         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)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to