[ 
https://issues.apache.org/jira/browse/HIVE-1476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12890843#action_12890843
 ] 

Pradeep Kamath commented on HIVE-1476:
--------------------------------------

A proposal for the solution:
Instead of the Metastore code creating the directories why not have 
HiveMetastoreClient create it in createTable() after the table is created - 
i.e. it can do a getTable().getSd().getLocation() and perform wh.mkdirs() on 
that path. We could do the same thing with addPartition() and other places 
where needed. The issue with this is it still breaks direct thrift clients. So 
a compromise is to use a conf variable - "strict.owner.mode" - if this is set 
to true on the server, dirs will not be created and they will be created on the 
client (both client and server should have the same value (true or false).  In 
installations where there are thrift clients, this can be set to false till the 
point the clients are ready to create the dirs themselves.

HiveMetaStoreClient needs to change to read this conf variable and create dirs 
if it is set to true. This directory creation/deletion is relevant to create 
table/drop table/add partition/alter table/alter partition I think.


 


> Hive's metastore when run as a thrift service creates directories as the 
> service user instead of the real user issuing create table/alter table etc.
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-1476
>                 URL: https://issues.apache.org/jira/browse/HIVE-1476
>             Project: Hadoop Hive
>          Issue Type: Bug
>    Affects Versions: 0.6.0, 0.7.0
>            Reporter: Pradeep Kamath
>
> If the thrift metastore service is running as the user "hive" then all table 
> directories as a result of create table are created as that user rather than 
> the user who actually issued the create table command. This is different 
> semantically from non-thrift mode (i.e. local mode) when clients directly 
> connect to the metastore. In the latter case, directories are created as the 
> real user. The thrift mode should do the same.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to