Check this link and follow :

http://www.mazsoft.com/blog/post/2010/02/01/Setting-up-HadoopHive-to-use-MySQL-as-metastore.aspx

Regards
∞
Shashwat Shriparv



On Fri, Jun 8, 2012 at 1:34 PM, soham sardar <[email protected]>wrote:

> Thanks Nanda and Bejoy btw i would be greatful if u could give me the
> connection url for mysql as my rdbs is mysql and not derby
> Thanks in advance :)
>
>
> On Fri, Jun 8, 2012 at 12:57 AM, Bejoy Ks <[email protected]> wrote:
>
>> Hi Soham
>>
>> The error looks like your meta store doesn't have the required tables .
>> Try enabling autoCreate database in your connection url. FOr derby
>> metastore It'll look like
>>
>> <property>
>>   <name>javax.jdo.option.ConnectionURL</name>
>>   <value>jdbc:derby:;databaseName=metastore_db;create=true</value>
>>   <description>JDBC connect string for a JDBC metastore</description>
>> </property>
>>
>> If your hive instance was already working some one might have
>> accidentally deleted some tables from metastore db.
>>
>> Regards
>> Bejoy
>>
>>   ------------------------------
>> *From:* Nanda Vijaydev <[email protected]>
>> *To:* [email protected]
>> *Sent:* Thursday, June 7, 2012 11:59 PM
>> *Subject:* Re: Unable to create sample tables in Hive
>>
>> There is nothing wrong with your SQL statement. This works on CLI fine
>> and I tried the following. Your issue seems to be related to the underlying
>> metadata store.
>>
>> CREATE TABLE page_view(viewTime INT, userid BIGINT,
>>     page_url STRING, referrer_url STRING,
>>      ip STRING COMMENT 'IP Address of the User')
>>     COMMENT 'This is the page view table'
>>      PARTITIONED BY(dt STRING, country STRING)
>>      ROW FORMAT DELIMITED
>>      FIELDS TERMINATED BY '\001'
>>      STORED AS SEQUENCEFILE;
>>
>> 1. What metastore are you using?
>> 2. Can you do simple command such as 'show tables;' or select * from any
>> existing table?
>>
>> On Thu, Jun 7, 2012 at 5:41 AM, soham sardar 
>> <[email protected]>wrote:
>>
>> I am not able to create a table in the hive interactive shell
>>
>>
>> the command given is
>>
>> hive>CREATE TABLE page_view(viewTime INT, userid BIGINT, page_url STRING,
>> referrer_url STRING, ip STRING COMMENT 'IP Address of the User') COMMENT
>> 'This is the hive>page view table' PARTITIONED BY(dt STRING, country
>> STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\001' STORED AS
>> SEQUENCEFILE;
>>
>>
>>
>> and the error is
>>
>>
>> hive> CREATE TABLE page_view(viewTime INT, userid BIGINT,
>>     >      page_url STRING, referrer_url STRING,
>>     >      ip STRING COMMENT 'IP Address of the User')
>>     >  COMMENT 'This is the page view table'
>>     >  PARTITIONED BY(dt STRING, country STRING)
>>     >  ROW FORMAT DELIMITED
>>     >    FIELDS TERMINATED BY '\001'
>>     > STORED AS SEQUENCEFILE;
>> *
>>
>>
>> FAILED: Error in metadata: javax.jdo.JDODataStoreException: Required
>> table missing : "`DATABASE_PARAMS`" in Catalog "" Schema "". DataNucleus
>> requires this table to perform its persistence operations. Either your
>> MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables"
>> NestedThrowables:
>> org.datanucleus.store.rdbms.exceptions.MissingTableException: Required
>> table missing : "`DATABASE_PARAMS`" in Catalog "" Schema "". DataNucleus
>> requires this table to perform its persistence operations. Either your
>> MetaData is incorrect, or you need to enable "datanucleus.autoCreateTables"
>> FAILED: Execution Error, return code 1 from
>> org.apache.hadoop.hive.ql.exec.DDLTask*
>>
>>
>>
>>
>>
>


-- 


∞
Shashwat Shriparv

Reply via email to