hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prasad Mujumdar (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-5606) Default Derby metastore_db initial creation fails if hive.metastore.schema.verification=true
Date Tue, 22 Oct 2013 05:04:45 GMT

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

Prasad Mujumdar commented on HIVE-5606:
---------------------------------------

[~brett_s_r] The hive.metastore.schema.verification is false by default. If you set it to
true, then you need to create the schema using the metastore schema script or [schema tool|https://cwiki.apache.org/confluence/display/Hive/Hive+Schema+Tool].
The very purpose of the schema consistency check is to avoid accidental corruption of the
metastore schema.


> Default Derby metastore_db initial creation fails if hive.metastore.schema.verification=true
> --------------------------------------------------------------------------------------------
>
>                 Key: HIVE-5606
>                 URL: https://issues.apache.org/jira/browse/HIVE-5606
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema
>    Affects Versions: 0.12.0
>         Environment: JDK 1.6.0_43, Hadoop 1.2.1
>            Reporter: Brett Randall
>
> Hive cannot create the default//initial/Derby metastore_db, if new 0.12 configuration
property {{hive.metastore.schema.verification}} is set to {{true}}.
> # Start with a clean 0.12 installation, or remove any existing (Derby) default metastore_db
directory
> # In {{hive-site.xml}}, set {{hive.metastore.schema.verification=true}}
> # Start hive CLI
> # Run {{hive> create database if not exists mydb;}}
> The following exception occurs:
> {noformat}
> 2013-10-22 15:02:59,390 WARN  bonecp.BoneCPConfig (BoneCPConfig.java:sanitize(1537))
- Max Connections < 1. Setting to 20
> 2013-10-22 15:03:01,899 ERROR exec.DDLTask (DDLTask.java:execute(435)) - org.apache.hadoop.hive.ql.metadata.HiveException:
java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
>         at org.apache.hadoop.hive.ql.metadata.Hive.createDatabase(Hive.java:231)
>         at org.apache.hadoop.hive.ql.exec.DDLTask.createDatabase(DDLTask.java:3442)
>         at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:227)
>         at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151)
>         at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65)
>         at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1414)
>         at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1192)
>         at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1020)
>         at org.apache.hadoop.hive.ql.Driver.run(Driver.java:888)
>         at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259)
>         at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216)
>         at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413)
>         at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:781)
>         at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675)
>         at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614)
>         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:160)
> Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1212)
>         at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:62)
>         at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)
>         at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2372)
>         at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2383)
>         at org.apache.hadoop.hive.ql.metadata.Hive.createDatabase(Hive.java:225)
>         ... 19 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1210)
>         ... 24 more
> Caused by: MetaException(message:Version information not found in metastore. )
>         at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:5638)
>         at org.apache.hadoop.hive.metastore.ObjectStore.verifySchema(ObjectStore.java:5622)
>         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.RetryingRawStore.invoke(RetryingRawStore.java:124)
>         at com.sun.proxy.$Proxy10.verifySchema(Unknown Source)
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:403)
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:441)
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:326)
>         at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:286)
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:54)
>         at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:59)
>         at org.apache.hadoop.hive.metastore.HiveMetaStore.newHMSHandler(HiveMetaStore.java:4060)
>         at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:121)
>         ... 29 more
> 2013-10-22 15:03:01,900 ERROR ql.Driver (SessionState.java:printError(419)) - FAILED:
Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException:
Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
> {noformat}
> The version check should not apply when creating the initial Derby metastore_db.
> *Workaround*: set hive.metastore.schema.verification=false, run Hive CLI and perform
any operation that forces the metastore to be created.  On 0.12 this will add the 0.12.0 version
to the VERSION table.  You can then change hive.metastore.schema.verification=true if you
prefer for subsequent access.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message