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 30E2F1846E for ; Wed, 9 Mar 2016 18:15:09 +0000 (UTC) Received: (qmail 78101 invoked by uid 500); 9 Mar 2016 18:15:07 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 78032 invoked by uid 500); 9 Mar 2016 18:15:07 -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 78022 invoked by uid 99); 9 Mar 2016 18:15:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2016 18:15:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0A3541806D4 for ; Wed, 9 Mar 2016 18:15:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.429 X-Spam-Level: * X-Spam-Status: No, score=1.429 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id n5OPfCh67qg7 for ; Wed, 9 Mar 2016 18:15:06 +0000 (UTC) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id BC0BA5FAD8 for ; Wed, 9 Mar 2016 18:15:05 +0000 (UTC) Received: by mail-oi0-f51.google.com with SMTP id d205so42084940oia.0 for ; Wed, 09 Mar 2016 10:15:05 -0800 (PST) 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; bh=nzyFJ8SD2eH63fdGrPQkp5U8w0HIgyDWnyM60NEBc7E=; b=gFxUZnMLmcmVKw3D1mJ19vtcK/WKCbhnqDzSJzr40eP8NUsVgKLqWlDTS6CrlnPuBo f0xddMC2EhubXchAGP5oMSG5XGzuf/SxmPzNhHZwg5H4MRFU0b3vCEu64aurok6VhYbj woBCEvctPrKtojha9rcXjlmTMqrqOVibrCwn1ytJY8FMZDZeQFywU3DkGQfyKoq0BuQn GOOo6HgY81u37YlhfUhjr6fO1L78mU4CDNDTPwYiqDG6TbuRTAsf33nN+9Lk0aVJA3yu 3kgk99o6Hy+zeyrWbX9D+bIf+cqbyx46YbKLVP2SAu0GqTMksG1PueO0ESrsZR/O5Iy8 r4tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=nzyFJ8SD2eH63fdGrPQkp5U8w0HIgyDWnyM60NEBc7E=; b=AjtZK+39Ixql5/Isauop6Mysh60q2jbjdzJEeVQmzS+Tr1OIqdIL29ufP/YbAv1jiL KV9eYJgcZvc+dI6AO7OmGEZOObq/KQLdUZ4XiiDM0djXZlZAu1FXFkbu9nDQ7VJ2PCCe aT5967Ogd0PA1ep3BAJp7W6R4u3Mu+y5oRHrCZtz1s6uUHIaMlg40LnQtiUY4ozETKNY J5P+BkedgiEYoK+4CkvtZ8W+QBOpwsaUyLKIhbH+2tbtkBGFK74OF6/p1xRAzytZlAwa wVXy43Ou+OARDwSPPX3ZsPgDsBp0CbTKSoJeAQnziy69WCT4G2EaVIUO+/GBEqGt4Io7 bRyg== X-Gm-Message-State: AD7BkJJbuzQCzhKEm6lXKGO9O3+qJJOAZPAIYWAdL3XgaC/LNfxKL+n4yaNRYsls6IKJz+UP5mG8Tg7GUZGySg== MIME-Version: 1.0 X-Received: by 10.202.77.81 with SMTP id a78mr21015800oib.71.1457547304970; Wed, 09 Mar 2016 10:15:04 -0800 (PST) Received: by 10.60.59.200 with HTTP; Wed, 9 Mar 2016 10:15:04 -0800 (PST) In-Reply-To: References: <1240D87E-6BBF-4D6E-B5A9-B070E3ACEC9F@gmail.com> Date: Wed, 9 Mar 2016 10:15:04 -0800 Message-ID: Subject: Re: read-only mode for hive From: PG User To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a11c14f905b3342052da1add6 --001a11c14f905b3342052da1add6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you all for replies. My usecase is as follows: I want to put a table (or database) in read-only mode. Then do some operations such as taking table definition and hdfs snapshot. I want to put table in read only mode to maintain consistency. After all my operations are done, I will again put hive to read-write mode. Sentry may not be solution as it will not handle existing transactions. creating view will not solve the purpose either if inserts are going on. - Nachiket On Wed, Mar 9, 2016 at 7:20 AM, David Capwell wrote: > Could always set the tables output format to be the null output format > On Mar 8, 2016 11:01 PM, "J=C3=B6rn Franke" wrote: > >> What is the use case? You can try security solutions such as Ranger or >> Sentry. >> >> As already mentioned another alternative could be a view. >> >> > On 08 Mar 2016, at 21:09, PG User wrote: >> > >> > Hi All, >> > I have one question about putting hive in read-only mode. >> > >> > What are the ways of putting hive in read-only mode? >> > Can I take a lock at database level to serve purpose? What will happen >> to existing transaction? My guess is it will not grant a lock until all >> transactions are complete. >> > >> > I read to change owner ship of /user/hive/warehouse/, but it is not >> full proof solution. >> > >> > Thank you. >> > >> > - PG User >> > --001a11c14f905b3342052da1add6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Thank you all for replies.

My usecase i= s as follows:
I want to put a table (or database) in read-only mo= de. Then do some operations such as taking table definition and hdfs snapsh= ot. I want to put table in read only mode to maintain consistency. After al= l my operations are done, I will again put hive to read-write mode.

Sentry may not be solution as it will not handle existing= transactions.
creating view will not solve the purpose either if= inserts are going on.

- Nachiket



On Wed, Mar 9, 2016 at 7:20 AM, David Capwell <= ;dcapwell@gmail.com= > wrote:

Cou= ld always set the tables output format to be the null output format

On Mar 8, 2016 11:01 PM, "J=C3=B6rn Franke&= quot; <jornfra= nke@gmail.com> wrote:
What is the use case? You can try security solutions such as Range= r or Sentry.

As already mentioned another alternative could be a view.

> On 08 Mar 2016, at 21:09, PG User <pguser1982@gmail.com> wrote:
>
> Hi All,
> I have one question about putting hive in read-only mode.
>
> What are the ways of putting hive in read-only mode?
> Can I take a lock at database level to serve purpose? What will happen= to existing transaction? My guess is it will not grant a lock until all tr= ansactions are complete.
>
> I read to change owner ship of /user/hive/warehouse/, but it is not fu= ll proof solution.
>
> Thank you.
>
> - PG User

--001a11c14f905b3342052da1add6--