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

Rohini Palaniswamy commented on HIVE-2936:
------------------------------------------

 * The parent does not exist scenario can happen when you are creating 
databases with a location specified. Had the parent existence check because if 
you are creating  "CREATE DATABASE IF NOT EXISTS db1 LOCATION 
'/projects/myproj/data/db1'"; , there are chances that data directory does not 
exist. In that case, instead of finding the first top level directory that 
exists and using its permission, I let the directory be created with the 
default dfs umask applied permission. 

 * It is not safe to use fs.mkdirs(path, permission) because the dfs umask is 
applied on that permission in DFSClient which is not desired. We have been 
bitten by wrong permission issues because of using that API. It is always safer 
to do mkdirs() and then do a setPermission() if you are dealing with HDFS. 


                
> Warehouse table subdirectories should inherit the group permissions of the 
> warehouse parent directory
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-2936
>                 URL: https://issues.apache.org/jira/browse/HIVE-2936
>             Project: Hive
>          Issue Type: New Feature
>          Components: Metastore
>            Reporter: Rohini Palaniswamy
>            Assignee: Rohini Palaniswamy
>             Fix For: 0.9.0
>
>         Attachments: HIVE-2504-1.patch, HIVE-2504.patch, HIVE-2504.patch
>
>
> When the Hive Metastore creates a subdirectory in the Hive warehouse for
> a new table it does so with the default HDFS permissions derived from 
> dfs.umask or dfs.umaskmode. There should be a option to inherit the 
> permissions of the parent directory (default warehouse or custom database 
> directory) so that the table directories have the same permissions as the 
> database directories. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to