You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Jason Dere (JIRA)" <ji...@apache.org> on 2014/02/20 00:40:19 UTC

[jira] [Commented] (HIVE-6467) Metastore DBS.OWNER_TYPE value got spaces at the end

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

Jason Dere commented on HIVE-6467:
----------------------------------

I think this has to do with the Derby metastore upgrade script 016-HIVE-6386.derby.sql - it specifies CHAR type whereas package.jdo specifies that these columns are supposed to be varchar:

{noformat}
ALTER TABLE "DBS" ADD "OWNER_NAME" CHAR(128);
ALTER TABLE "DBS" ADD "OWNER_TYPE" CHAR(10);
{noformat}


> Metastore DBS.OWNER_TYPE  value got spaces at the end
> -----------------------------------------------------
>
>                 Key: HIVE-6467
>                 URL: https://issues.apache.org/jira/browse/HIVE-6467
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Jason Dere
>
> Trying to tinker with the metastore upgrade scripts and did the following steps on a brand new Derby DB:
> From derby:
> {noformat}
> run 'hive-schema-0.12.0.derby.sql';
> run 'upgrade-0.12.0-to-0.13.0.derby.sql';
> {noformat}
> From Hive:
> {noformat}
> show tables;
> {noformat}
> I then hit the following error below.  It appears that in the metastore DBS table, the row with defaultdb was created with the value "ROLE      ", with spaces at the end, where it was expecting "ROLE".
> {noformat}
> 2014-02-19 14:49:19,824 ERROR metastore.RetryingHMSHandler (RetryingHMSHandler.java:invoke(143)) - java.lang.IllegalArgumentException: No enum const class org.apache.hadoop.hive.metastore.api.PrincipalType.ROLE      
> 	at java.lang.Enum.valueOf(Enum.java:196)
> 	at org.apache.hadoop.hive.metastore.api.PrincipalType.valueOf(PrincipalType.java:14)
> 	at org.apache.hadoop.hive.metastore.ObjectStore.getDatabase(ObjectStore.java:521)
> 	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.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:108)
> 	at com.sun.proxy.$Proxy7.getDatabase(Unknown Source)
> 	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.get_database(HiveMetaStore.java:753)
> 	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.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:105)
> 	at com.sun.proxy.$Proxy8.get_database(Unknown Source)
> 	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.getDatabase(HiveMetaStoreClient.java:895)
> 	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.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:89)
> 	at com.sun.proxy.$Proxy9.getDatabase(Unknown Source)
> 	at org.apache.hadoop.hive.ql.metadata.Hive.getDatabase(Hive.java:1150)
> 	at org.apache.hadoop.hive.ql.metadata.Hive.databaseExists(Hive.java:1139)
> 	at org.apache.hadoop.hive.ql.exec.DDLTask.showTables(DDLTask.java:2372)
> 	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:354)
> 	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:153)
> 	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
> 	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1566)
> 	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1339)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1170)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1010)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1000)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:268)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:220)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:424)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:793)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:687)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:626)
> 	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:212)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)