Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Creating partition with __HIVE_DEFAULT_PARTITION__ value


Copy link to this message
-
Re: Creating partition with __HIVE_DEFAULT_PARTITION__ value
If  I understand correctly, this is what you are trying to do.

you have a data center where the data is written on a hive table (Data
center A)
you have another data center where you want to take backup of table from
data center A

you are using dist-cp to transfer data from data center A to B

if you are replicating data in exact same directories as they are in source
data center, easy option would be setting up meta store replication.
On Mon, Sep 23, 2013 at 8:18 PM, Ivan Kruglov <[EMAIL PROTECTED]>wrote:

> Hello to everyone,
>
> I'm working on the task of syncing data between two tables which have
> similar structure (read the same set of partitions). The tables are in
> different data centers and one table is a backup copy of another one. I'm
> trying to achieve this goal through distcp-ing data into target DC in
> temporary folder, recreating all needed partitions in target table and
> moving files from temporary place to final place. But I'm stuck on issue of
> creating partitions with value ' __HIVE_DEFAULT_PARTITION__'
>
> So, my question is: Is it possible in hive to manually create partition
> with '__HIVE_DEFAULT_PARTITION__' value?
>
> Neither of this way work:
> ALTER TABLE table ADD IF NOT EXISTS PARTITION (partition=);
> ALTER TABLE table ADD IF NOT EXISTS PARTITION (partition='');
> ALTER TABLE table ADD IF NOT EXISTS PARTITION
> (partition='__HIVE_DEFAULT_PARTITION__');
>
> Thank you.
> Ivan Kruglov.
--
Nitin Pawar
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB