hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jander g <jande...@gmail.com>
Subject Re: Copying a Hive metastore
Date Tue, 11 Oct 2011 02:01:17 GMT
We develop a little tool which can hack to get create table HQL and
insert data HQL from hive metastore. Thus the hive metastore can be
restored.


On 10/11/11, Steven Wong <swong@netflix.com> wrote:
> How do you generate an HQL file from a metastore?
>
>
> -----Original Message-----
> From: Jander g [mailto:jandergj@gmail.com]
> Sent: Saturday, October 08, 2011 10:54 PM
> To: user@hive.apache.org
> Subject: Re: Copying a Hive metastore
>
> Yes, you are right. I had merged two hive metastore several months
> ago. I restored one metastore to HQL and run this hql file to finish
> the task. Just as Edward says, I interact with HQL directly. Hope this
> helps.
>
> On 10/1/11, Steven Wong <swong@netflix.com> wrote:
>> I think going to MySQL directly will have the problem of colliding
>> internal
>> ids (e.g. TBLS.TBL_ID).  I don't know if the API will have the same
>> problem
>> or not.
>>
>> If there is no API documentation, which code (classes, methods) should I
>> look at?
>>
>>
>> From: Edward Capriolo [mailto:edlinuxguru@gmail.com]
>> Sent: Friday, September 30, 2011 3:16 PM
>> To: user@hive.apache.org
>> Subject: Re: Copying a Hive metastore
>>
>>
>> On Fri, Sep 30, 2011 at 5:05 PM, Steven Wong
>> <swong@netflix.com<mailto:swong@netflix.com>> wrote:
>> Hi,
>>
>> What is a good way to copy the entire content of a Hive metastore and
>> insert
>> it into another Hive metastore? The second metastore contains existing
>> metadata that needs to be preserved. Both metastores are in MySQL, not
>> fronted by any Hive metastore server.
>>
>> My guess is Hive has some metastore API that may be appropriate here, but
>> I
>> don't know if that is true because I know zilch about that API - I don't
>> even know where the API documentation is.
>>
>> Thanks.
>> Steven
>>
>> I would say a simple way is to take mysql dumps and then append the dump
>> files together. As long as you do not have two tables with the same name I
>> do not see any challenges with that. This portion of the API is not very
>> well documented because most do not interact with the metastore directly,
>> they only interact with HQL.
>>
>
>
> --
> Thanks,
> Jander
>
>


-- 
Thanks,
Jander

Mime
View raw message