Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EE44817698 for ; Mon, 6 Apr 2015 01:29:56 +0000 (UTC) Received: (qmail 57064 invoked by uid 500); 6 Apr 2015 01:29:55 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 56979 invoked by uid 500); 6 Apr 2015 01:29:54 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 56969 invoked by uid 99); 6 Apr 2015 01:29:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 01:29:54 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of leftyleverenz@gmail.com designates 209.85.223.181 as permitted sender) Received: from [209.85.223.181] (HELO mail-ie0-f181.google.com) (209.85.223.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Apr 2015 01:29:50 +0000 Received: by ierf6 with SMTP id f6so12050971ier.2 for ; Sun, 05 Apr 2015 18:29:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Ki9HkvyBwY9vyP9GvAaDthWLdfwSp09EODvmtVnmHkE=; b=N8sEZov0djbie4/OsnXU+iWo8riORBBwMgre/3iuFORvfzU0KkYbQbYAlQ2oEM5We7 L4fixr/9OmfJ9OrIHIGGG7TQqM1haBlJlNl5T1wj2nIobMVhIcK6IKtTu4qgPqaA9VYv WeplFz48EEBLSYTtZTpmFJ0RjSf/SbINQH42xReLuDou9WF7hauQGqsbJHj8Uh2/3Dxi IBUdvQST2am4O7tpNPuFVeFHLJk/Xkndc18pzCh11DA1nAaY36DoTk3frUc4IFkFqR7B fgzsxDDYo6WhvTp2KtmoCvK8sJziJa/58fX2JQbQapSBin5JKopGgrwHOZQV2bvDX+zi oCyA== MIME-Version: 1.0 X-Received: by 10.107.6.42 with SMTP id 42mr19237258iog.52.1428283769986; Sun, 05 Apr 2015 18:29:29 -0700 (PDT) Received: by 10.42.202.82 with HTTP; Sun, 5 Apr 2015 18:29:29 -0700 (PDT) In-Reply-To: References: Date: Sun, 5 Apr 2015 21:29:29 -0400 Message-ID: Subject: Re: INSERT OVERWRITE partition while SELECT is going on From: Lefty Leverenz To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a113f97f4bfa5310513043a4c X-Virus-Checked: Checked by ClamAV on apache.org --001a113f97f4bfa5310513043a4c Content-Type: text/plain; charset=UTF-8 Actually, 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 wrote: > I'm no expert, but I don't think SELECTs are broken by an INSERT. See > 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 > 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 >> >> > --001a113f97f4bfa5310513043a4c Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Actually,=C2=A0hive.support.concurrency=C2=A0is false by default so y= ou should set it to true for locking.

-- Lefty<= /div>

On Fri, Apr 3, 2015 at 4:52 PM, Lefty Levere= nz <leftyleverenz@gmail.com> wrote:
I'm no expert, but I don't think = SELECTs are broken by an INSERT.=C2=A0 See=C2=A0Locking=C2= =A0for 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 thi= s?

-- Lefty

On Fri, Apr 3, 2015 at 4:33 PM, Thomas Kwan = <thomas.kwan@manage.com> wrote:
Hi there,

If we have multipl= e SELECTs going on for a table, will doing a "INSERT OVERWRITE" t= o replace a partition break those SELECTs?

thanks = in advance



--001a113f97f4bfa5310513043a4c--