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 57EBE17FE1 for ; Tue, 28 Oct 2014 18:09:21 +0000 (UTC) Received: (qmail 61235 invoked by uid 500); 28 Oct 2014 18:09:19 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 61166 invoked by uid 500); 28 Oct 2014 18:09:19 -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 61156 invoked by uid 99); 28 Oct 2014 18:09:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2014 18:09:19 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thejas@hortonworks.com designates 209.85.218.42 as permitted sender) Received: from [209.85.218.42] (HELO mail-oi0-f42.google.com) (209.85.218.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Oct 2014 18:08:54 +0000 Received: by mail-oi0-f42.google.com with SMTP id a3so355142oib.29 for ; Tue, 28 Oct 2014 11:07:22 -0700 (PDT) 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:content-type; bh=hsIY1yOmODtU0odShQbXTH8TWC1qU//rxHH29D9eVvY=; b=Elu4NgsDTdcz96u0KDIaFdOqmHtJt+5Cxw4AvVHr89w0+xlzUX6VMd2eS7mAojPLse 071xIkobdmYkBJnGMlUAZGNTW2ou+z/ZPuU3RfP10OqyAsLCAwieRl+4JkG/AtJxvuTV NcOIzq8kbyWHWRIPhye6AfmP7oxS4N5LxzTxzc/CkwRmXzs4hFH9mclgVE1NqafD4Rwf uzGThEnOcdDB+Hf6fIctXP9DzTp8Y5uI9GWhkY/gn2xQU3EEcPrRtkWn7rtXzLFz8xFN jftv58jaZIlOtLdHwRyBHbgTeS2iHcCHq0+cAnBpbe2GUG6YGnj7qhW2UuRyXjs46v/5 MM0Q== X-Gm-Message-State: ALoCoQmhINhlsOwC6xgbxKG4fi4FqWUk1e0bDdjVwlnblpYhRR9SyxDbvfniGXtA8cSStQMhmTNNBnuIEE8JgLGseoZm9DXUpXvDQQPrCd0b58fFjskLGGE= MIME-Version: 1.0 X-Received: by 10.202.89.194 with SMTP id n185mr1980262oib.101.1414519642861; Tue, 28 Oct 2014 11:07:22 -0700 (PDT) Received: by 10.76.80.40 with HTTP; Tue, 28 Oct 2014 11:07:22 -0700 (PDT) In-Reply-To: <1414007751887.66444@redpoint.net> References: <1414007450892.87305@redpoint.net> <1414007751887.66444@redpoint.net> Date: Tue, 28 Oct 2014 11:07:22 -0700 Message-ID: Subject: Re: hcatalog table permissions error From: Thejas Nair To: "" Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Nathan, Can you check if you have hive.metastore.execute.setugi=true in conf object used by HCatClient.create(conf) ? Thanks, Thejas On Wed, Oct 22, 2014 at 12:55 PM, Nathan Bamford wrote: > Whoops, I pasted the wrong line in for the hcat table records. Should have > been: > > > -rw-r--r-- 3 nbamford hive 110 2014-10-22 07:52 > /user/hive/warehouse/atest_hcat/part-m-355114470 > > ________________________________ > From: Nathan Bamford > Sent: Wednesday, October 22, 2014 12:50 PM > To: user@hive.apache.org > Subject: hcatalog table permissions error > > > Hello, > > I've been puzzling away at a permissions issue I get through the hcatalog > interface for a while now, and I think perhaps I've found a bug. > > When I create a table via the hive cli as user nbamford the directory > created in hdfs has the owner I expect, nbamford: > > > drwxrwxrwt - nbamford hive 0 2014-10-22 07:18 > /user/hive/warehouse/atest_cli > > > When I do the same thing in java using the HCatClient interface (note I am > the os user nbamford in this case, just as when I run the hive cli): > > > HCatClient client = HCatClient.create(conf); > List schema = new ArrayList(); > schema.add(new HCatFieldSchema("id", > org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.intTypeInfo, "")); > schema.add(new HCatFieldSchema("value", > org.apache.hadoop.hive.serde2.typeinfo.TypeInfoFactory.stringTypeInfo, "")); > HCatCreateTableDesc.Builder desc = HCatCreateTableDesc.create("default", > "atest_hcat", schema); > client.createTable(desc.build()); > > I find the directory is owned by user hive: > > drwxrwxrwt - hive hive 0 2014-10-22 07:52 > /user/hive/warehouse/atest_hcat > > However, if I write tables to the table, via the HCatWriter interface, they > are owned by nbamford: > > drwxrwxrwt - hive hive 0 2014-10-22 07:52 > /user/hive/warehouse/atest_hcat > > Is this a bug in the hcatalog api, or is there a way to set the user name I > have missed? > > > > -- CONFIDENTIALITY NOTICE NOTICE: This message is intended for the use of the individual or entity to which it is addressed and may contain information that is confidential, privileged and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any printing, copying, dissemination, distribution, disclosure or forwarding of this communication is strictly prohibited. If you have received this communication in error, please contact the sender immediately and delete it from your system. Thank You.