[jira] [Commented] (HIVE-2936) Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory
[ https://issues.apache.org/jira/browse/HIVE-2936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13548095#comment-13548095 ] Hudson commented on HIVE-2936: -- Integrated in Hive-trunk-hadoop2 #54 (See [https://builds.apache.org/job/Hive-trunk-hadoop2/54/]) HIVE-2936 : Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory (Rohini via Ashutosh Chauhan) (Revision 1325791) Result = ABORTED hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1325791 Files : * /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java * /hive/trunk/conf/hive-default.xml.template * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java * /hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java * /hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 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: ASF.LICENSE.NOT.GRANTED--HIVE-2504-1.patch, ASF.LICENSE.NOT.GRANTED--HIVE-2504.patch, ASF.LICENSE.NOT.GRANTED--HIVE-2504.patch, HIVE-2936-2.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 For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (HIVE-2936) Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory
[ https://issues.apache.org/jira/browse/HIVE-2936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13253991#comment-13253991 ] Hudson commented on HIVE-2936: -- Integrated in Hive-trunk-h0.21 #1372 (See [https://builds.apache.org/job/Hive-trunk-h0.21/1372/]) HIVE-2936 : Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory (Rohini via Ashutosh Chauhan) (Revision 1325791) Result = ABORTED hashutosh : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVNview=revrev=1325791 Files : * /hive/trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java * /hive/trunk/conf/hive-default.xml.template * /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/Warehouse.java * /hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java * /hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 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, HIVE-2936-2.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
[jira] [Commented] (HIVE-2936) Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory
[ https://issues.apache.org/jira/browse/HIVE-2936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13253019#comment-13253019 ] Ashutosh Chauhan commented on HIVE-2936: I see. Agree on both points. Another point is this increases number on calls on nn, it will be good to reduce that if possible. How about following: {code} boolean success = fs.mkdirs(f); if(success) { if (this.inheritPerms fs.exists(f.getParent())) { try { fs.setPermission(f, fs.getFileStatus(f.getParent()).getPermission()); } catch (IOException ioe) { LOG.equals(Failed to set permissions); success = false; } } } else { return fs.getFileStatus(f).isDir(); } return success; {code} How about this. The case of returning false if you fail to set Permissions is not clear. I return false, what you think ? 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
[jira] [Commented] (HIVE-2936) Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory
[ https://issues.apache.org/jira/browse/HIVE-2936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13253027#comment-13253027 ] Rohini Palaniswamy commented on HIVE-2936: -- * The else call is not required. If the path already existed and was a directory, mkdirs returns true else it throws FileAlreadyExistsException. That is why need to check before if it exists. If the directory already existed, we should not be setting the parent's permission on it. * The fs.exists(f.getParent()) needs to be done before the fs.mkdirs() else it will always be true. One thing that can be done is remove fs.exists(f.getParent()) check and always do a setPermission. If the parent directory was created during the mkdirs(), then the setPermission call will be redundant and just set the same permission again but if the parent existed, then instead of two calls there will be only one call. {code} if (this.inheritPerms fs.exists(f)) { return fs.getFileStatus(f).isDir(); } boolean success = fs.mkdirs(f); if (this.inheritPerms success) { // Set the permission of parent directory. fs.setPermission(f, fs.getFileStatus(f.getParent()).getPermission()); } return success; {code} With this, without inheritPerms * 1 call to create the directory. fs.mkdirs() will throw an exception if the path already existed and was a file. with inheritPerms * There will be 2 calls if the path already existed. * There will be 3 calls, to check and create the path and set the permission. Does that sound ok? 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
[jira] [Commented] (HIVE-2936) Warehouse table subdirectories should inherit the group permissions of the warehouse parent directory
[ https://issues.apache.org/jira/browse/HIVE-2936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13253055#comment-13253055 ] Ashutosh Chauhan commented on HIVE-2936: +1 will commit, if tests pass. 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, HIVE-2936-2.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