This works fine too. Thanks a lot !

On Wed, Jan 15, 2014 at 5:17 PM, Stephen Sprague <[email protected]> wrote:

> wow. that's the craziest thing i've ever seen.
>
> my approach to moving tables (partitioned or not) is:
>
> 1. run the ddl to create the table on the new cluster
> 2. distcp the hdfs data.
> 3. you might have to use "hdfs dfs -mv" on the new cluster to position
> your table properly under /warehouse/db depending on your distcp command.
> 4. run "msck repair table <table>" in hive to discover the partitions and
> populate the metastore accordingly.
>
> works very well for me.
>
> cheers,
> Stephen.
> PS  no need to "export" or "import" data.
>
>
>
> On Wed, Jan 15, 2014 at 10:25 AM, P lva <[email protected]> wrote:
>
>> Hello,
>>
>> I'm trying to move a hive table to a different cluster. My table is
>> partitioned. However when I use hive export-distcp-import, the partitions
>> are reversed. /warehouse/db/table/a/b/c in old cluster is
>> /warehouse/db/table/c/b/a in the new cluster.
>>
>> How do I avoid this ?
>>
>>
>> Thanks
>>
>>
>
>

Reply via email to