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
<nathan.bamf...@redpoint.net> 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 <nathan.bamf...@redpoint.net>
> 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<HCatFieldSchema> schema = new ArrayList<HCatFieldSchema>();
> 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.

Reply via email to