2015년 1월 5일 월요일

[cdh-user] Re: Hive DDL throws datanucleus error

Had the same problem when reconfigured hive to use Postgresql as metastore rdbms.
The cause was that user (javax.jdo.option.ConnectionUserName, javax.jdo.option.ConnectionPassword) didn't have appropriate permissions to some metastore tables.

if you followed to the instructions http://www.cloudera.com/content/cloudera/en/documentation/cdh4/v4-2-0/CDH4-Installation-Guide/cdh4ig_topic_18_4.html (Step 3: Create the metastore database and user account for postgresql): when create grant permission script (/tmp/grant-privs) first and last line is not sql command , you should manually remove it to correct execution of the grant permission script.

I have installed Cloudera version CDH4.5.0 on my system. This includes Hive 0.10 and I am using postgres 9.3 installed locally as the metastore. When I try to create a table in Hive I get the following error. How can I get rid of this error, please advise:

FAILED: Error in metadata: MetaException(message:javax.jdo.JDOUserException: Could not create "increment"/"table" value-generation container "SEQUENCE_TABLE" since autoCreate flags do not allow it. 
NestedThrowables:
org.datanucleus.exceptions.NucleusUserException: Could not create "increment"/"table" value-generation container "SEQUENCE_TABLE" since autoCreate flags do not allow it. )
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask

P.S. I tried setting the two datanucleus properties in hive-site.xml to true, but it did not help:

<property> <name>datanucleus.autoCreateSchema</name>
  <value>true</value>
</property>

<property> <name>datanucleus.autoCreateTables</name>
  <value>true</value>
</property>



댓글 없음:

댓글 쓰기