Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Dynamic Partitioning?


Copy link to this message
-
Re: Dynamic Partitioning?
Schubert Zhang 2009-09-28, 16:47
We have following use case:

1. We have a periodic MapReduce job to pre-process the source data (files)
and want put the output data files into HDFS directory. The HDFS directory
is correspond to a Hive table (this table should be partitioned). The above
MapReduce job shall output data into different partitions based on data
analysis.

2. We want Hive to recognise any new raised partitions from HDFS
sub-directories under the table's root directory. And the above MapReduce
job may add new files into new created partitions or existing partitions.

3. We also need a compact/merging process to periodic compact or merge the
existing partitions to get bigger files.

On Tue, Aug 18, 2009 at 9:46 AM, Prasad Chakka <[EMAIL PROTECTED]> wrote:

> Well, the code to infer partitions from HDFS directory exists in old
> version of Hive. You need to bring that back (and possibly make some
> modifications to reflect latest code). But the work involved here is to
> disallow tables being marked as EXTERNAL and also disallow setting Partition
> properties. There may be couple of other things that need to be taken care
> of that I can’t think of right now.
>
> It doesn’t look like much.
>
> Prasad
>
> ------------------------------
> *From: *Chris Goffinet <[EMAIL PROTECTED]>
> *Reply-To: *<[EMAIL PROTECTED]>
> *Date: *Mon, 17 Aug 2009 18:38:40 -0700
> *To: *<[EMAIL PROTECTED]>
> *Subject: *Re: Dynamic Partitioning?
>
> How much work is involved for such a feature?
>
> -Chris
>
> On Aug 17, 2009, at 6:19 PM, Prasad Chakka wrote:
>
>  We could make this feature per table property which doesn’t have the
> extended feature set supported...
>
>
> ------------------------------
> *From: *Frederick Oko <[EMAIL PROTECTED] <x-msg:
> //89/[EMAIL PROTECTED] <http:///89/[EMAIL PROTECTED]>> >
> *Reply-To: *<[EMAIL PROTECTED] <x-msg:
> //89/[EMAIL PROTECTED] <http:///89/[EMAIL PROTECTED]>>
> >
> *Date: *Thu, 13 Aug 2009 02:12:54 -0700
> *To: *<[EMAIL PROTECTED] <x-msg://89/[EMAIL PROTECTED]<http:///89/[EMAIL PROTECTED]>>
> >
> *Subject: *Re: Dynamic Partitioning?
>
> Actually this is what Hive originally did -- it used to trust partitions it
> discovered via HDFS -- this blind trust could be leveraged for just what you
> are requesting as partions do follow a simple directory scheme (and there is
> precedent for such out-of-band data loading). However, this blind trust
> became incompatible with extended feature set of external tables and
> per-partition schemas introduced earlier this year. The re-enabling of this
> behavior based on configuration is currently tracked as
> https://issues.apache.org/jira/browse/HIVE-493 'automatically infer
> existing partitions of table from HDFS files'.
>
> On Tue, Aug 11, 2009 at 11:15 AM, Chris Goffinet <[EMAIL PROTECTED]<x-msg:
> //89/[EMAIL PROTECTED] <http:///89/[EMAIL PROTECTED]>> > wrote:
>
> Hi
>
> I was wondering if anyone has thought about the possibility of having
> dynamic partitioning in Hive? Right now you typically use LOAD DATA or ALTER
> TABLE to add new partitions. It would be great for applications like Scribe
> that can load data into HDFS, could just place the data into the correct
> folder structure for your partitions on HDFS. Has anyone investigated this?
> What is everyone else doing in regards to things like this? It seems a
> little error prone to have a cron job run everyday adding new partitions. It
> might not even be possible to do dynamic partitioning since its meta data
> read. But I'd love to hear thoughts?
>
> -Chris
>
>
>
>
>
>