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

Sushanth Sowmyan commented on HIVE-8375:
----------------------------------------

Hi, sorry for the late response, just noticed this, and thought I should 
respond.

I'm afraid this patch is not doing the right thing - createDefaultDB / 
createDefaultRoles / addAdminUsers are not schema creation, they are 
application logic that inserts rows into the tables that should already exist 
from manually creating schema. i.e. this is not schema creation, this is data 
insertion.

Thus, we should not be disabling them if autoCreateSchema is off.

It does look like you have an issue with hive creating schema automatically 
(whether through hive or datanucleus) when you run this section of code, but 
that is something that you will probably encounter even if you create a new 
hive table or partition or any such other use of the metastore. I remember that 
with DN, we had an issue a while back where we not only needed autoCreateSchema 
to be set to false, but also fixedDataStore to true(this maybe due to us 
working across multiple versions of DN depending on deployment).

> Create schema only if autoCreateSchema is set to true
> -----------------------------------------------------
>
>                 Key: HIVE-8375
>                 URL: https://issues.apache.org/jira/browse/HIVE-8375
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Navaneeth Mysore G
>            Priority: Minor
>         Attachments: HIVE-AutoCreateSchema.patch
>
>
> I am using Mariadb as the metastore database and the schema is created 
> manually. Even when the property 'datanucleus.autoCreateSchema' is set to 
> 'false', HiveMetaStore tries to create it. Not sure, if this is a datanucleus 
> issue or hive's.. Attaching my fix for review (this was the only way I was 
> able to successfully deploy).
> I was trying to fix the following exception, but realized the above when, 
> even with disabling autoCreateSchema, it was trying to create it. 
> Exception:
> metastore.HiveMetaStore (HiveMetaStore.java:startMetaStore(5671)) - 
> javax.jdo.JDOUserException: Could not create "increment"/"table" 
> value-generation container `SEQUENCE_TABLE` since autoCreate flags do not 
> allow it. (... SKIPPED ..)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to