You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Thomas Kwan <th...@manage.com> on 2015/04/03 22:33:13 UTC

INSERT OVERWRITE partition while SELECT is going on

Hi there,

If we have multiple SELECTs going on for a table, will doing a "INSERT
OVERWRITE" to replace a partition break those SELECTs?

thanks in advance

Re: INSERT OVERWRITE partition while SELECT is going on

Posted by Lefty Leverenz <le...@gmail.com>.
Actually, hive.support.concurrency
<https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.support.concurrency>
is
false by default so you should set it to true for locking.

-- Lefty

On Fri, Apr 3, 2015 at 4:52 PM, Lefty Leverenz <le...@gmail.com>
wrote:

> I'm no expert, but I don't think SELECTs are broken by an INSERT.  See
> Locking <https://cwiki.apache.org/confluence/display/Hive/Locking> for
> details.
>
> As I understand it, the INSERT needs an exclusive lock on the partition
> which it cannot get while the partition has a shared lock on it.
>
> Can someone confirm or correct this?
>
> -- Lefty
>
> On Fri, Apr 3, 2015 at 4:33 PM, Thomas Kwan <th...@manage.com>
> wrote:
>
>> Hi there,
>>
>> If we have multiple SELECTs going on for a table, will doing a "INSERT
>> OVERWRITE" to replace a partition break those SELECTs?
>>
>> thanks in advance
>>
>>
>

Re: INSERT OVERWRITE partition while SELECT is going on

Posted by Lefty Leverenz <le...@gmail.com>.
I'm no expert, but I don't think SELECTs are broken by an INSERT.  See
Locking <https://cwiki.apache.org/confluence/display/Hive/Locking> for
details.

As I understand it, the INSERT needs an exclusive lock on the partition
which it cannot get while the partition has a shared lock on it.

Can someone confirm or correct this?

-- Lefty

On Fri, Apr 3, 2015 at 4:33 PM, Thomas Kwan <th...@manage.com> wrote:

> Hi there,
>
> If we have multiple SELECTs going on for a table, will doing a "INSERT
> OVERWRITE" to replace a partition break those SELECTs?
>
> thanks in advance
>
>