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 5CA5D199F3 for ; Thu, 10 Mar 2016 00:33:30 +0000 (UTC) Received: (qmail 95784 invoked by uid 500); 10 Mar 2016 00:33:29 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 95712 invoked by uid 500); 10 Mar 2016 00:33:29 -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 95702 invoked by uid 99); 10 Mar 2016 00:33:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Mar 2016 00:33:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 828941A10BA for ; Thu, 10 Mar 2016 00:33:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id ncWpfUhqADfX for ; Thu, 10 Mar 2016 00:33:26 +0000 (UTC) Received: from mail-vk0-f48.google.com (mail-vk0-f48.google.com [209.85.213.48]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 173C95F1C2 for ; Thu, 10 Mar 2016 00:33:26 +0000 (UTC) Received: by mail-vk0-f48.google.com with SMTP id e6so77073216vkh.2 for ; Wed, 09 Mar 2016 16:33:26 -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=tgfUT1Yo/UZUSmIscjMLOjcF7r2GFTpF85TFXX3wF+8=; b=a8a7xLjaac/Jloj8jrERbBMvCeWIjL7hfNSnpfrSEzN9AKv8HDV5dluDrRSgLYGcUw xhrMUyQnJgENW0eFDCwALw6ODm114xkHFipXQfzvV9GG6f3Ie+E1FZdwMEIgJCmQnGHm 8ohtZmQidjZuLJH987vPhzmNhsnUjfUvdwQXupeqlOQA8BVV3bJb021nfxZO+wd8IHq9 XCvGvCc7ovBefxvAvIC/OFEh3t3dQicELZaTjs1fuqobYEMKP/L+v64lTFo/8gQfBWQp Tqa6UrKj7bbH7NCZ6/Td749pSWFhU2nscMTJGvlEmjASkjvCS7i/LcEkkNbVLwOdhbg3 epoQ== 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=tgfUT1Yo/UZUSmIscjMLOjcF7r2GFTpF85TFXX3wF+8=; b=fnMA4RKgAjJXxJLz9cfOww/D1f+oSlIplV/p0I6E45GjGTmA5C+4K1umCkaNP1/GMh cHHF+O8/cCXypN91S35b5hw/ciItV5q0FeNDFpEGGCcxo9y1d2vpkSGe4mif8HZFqXsO 3vInhbyxcoJ2PtE0KU9KONw3rvAzLV2RABrQcykPIVYbLJ13CiCefmK9RtMCS+YCd+Ly XHE7dwhhQhA+EYnURUvc1Vv3hQKmfDW0SUIvgj228jQlwiJAe9ddItttxEC5BHmgtbSu 1gIy8PFohZOLfShCafjG+tGxDhshvJFoXNOu9Xd0F2IzryMmArgzM6oz+/j1b66wxZXY SBVA== X-Gm-Message-State: AD7BkJIys/AHWkQh/r3FlQfW859ks5n1KtCauniuwaeo4QBiXyUfH6ksYtEphvDdR3lt/G8squRx/lKpgIF+VA== MIME-Version: 1.0 X-Received: by 10.31.130.6 with SMTP id e6mr518160vkd.49.1457570005088; Wed, 09 Mar 2016 16:33:25 -0800 (PST) Received: by 10.31.128.213 with HTTP; Wed, 9 Mar 2016 16:33:25 -0800 (PST) In-Reply-To: <1457568978646-8ecad646-b84b29ca-cc52989f@analyticsdream.com> References: <1240D87E-6BBF-4D6E-B5A9-B070E3ACEC9F@gmail.com> <1457568330187-5b369ee7-e6567efd-c7923733@analyticsdream.com> <1457568978646-8ecad646-b84b29ca-cc52989f@analyticsdream.com> Date: Thu, 10 Mar 2016 00:33:25 +0000 Message-ID: Subject: Re: read-only mode for hive From: Mich Talebzadeh To: user@hive.apache.org Content-Type: multipart/alternative; boundary=001a1143d0e4637fab052da6f65a --001a1143d0e4637fab052da6f65a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable If this is all about a maintenance window, then why not shutdown Hive server2 which stops client access including beeline and use Hive CLI to do the maintenance work effectively in single user mode. Snapshot is another option. HTH Dr Mich Talebzadeh LinkedIn * https://www.linkedin.com/profile/view?id=3DAAEAAAAWh2gBxianrbJd6= zP6AcPCCdOABUrV8Pw * http://talebzadehmich.wordpress.com On 10 March 2016 at 00:16, Andrew Sears wrote: > Another option might be to lock using a zookeeper script. > > Andrew > > > Sent using CloudMagic Email > > On Wed, Mar 09, 2016 at 7:05 PM, Andrew Sears < > andrew.sears@analyticsdream.com> wrote: > > What about renaming the table? To another schema with limited rights? Not > sure why just flipping access grant to select only wouldn't also work, > provided auth is enabled and not external. > > An hdfs snapshot could also give you point -in-time copy. Set acls to > restrict access if enabled. > > Cheers, > Andrew > > On Wed, Mar 09, 2016 at 1:15 PM, PG User wrote: > > 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 p= ut > 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 happe= n >>> 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 >>> >> > --001a1143d0e4637fab052da6f65a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
If this is all about a maintenance window, then why n= ot shutdown Hive server2 which stops client access including beeline and us= e Hive CLI to do the maintenance work effectively in=C2=A0single user mode.= =C2=A0 Snapshot is another option.

HTH
=


On 10 March 2016 at 00:16, Andrew Sears <andrew.sears@analyticsdream.com> wrote:

Another option might be to lock usi= ng a zookeeper script.

Andrew



Sent using CloudMagic Email
On Wed, Mar 09, 2016 at 7:05 PM, And= rew Sears <andrew.sears@analyticsdream.com> wrote:

What about rena= ming the table? To another schema with limited rights? Not sure why just fl= ipping access grant to select only wouldn't also work, provided auth is= enabled and not external.

An hdfs snapshot could also give you point -in-time copy.=C2= =A0 Set acls to restrict access if enabled.

Cheers,
Andrew


On Wed, Mar 09, 2016 a= t 1:15 PM, PG User <pguser1982@gmail.com> wrote:

Thank you all for replies.<= div>
My usecase is as follows:
I want to put a tabl= e (or database) in read-only mode. Then do some operations such as taking t= able 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 h= ive 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.

<= div>- Nachiket



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

Could always set the tables output format to be the null out= put 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 Ranger 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


--001a1143d0e4637fab052da6f65a--