[ https://issues.apache.org/jira/browse/HDFS-11132?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15658130#comment-15658130 ]
Vishwajeet Dusane commented on HDFS-11132: ------------------------------------------ Contract test {{testMkdirsFailsForSubdirectoryOfExistingFile}} under {{FileContextMainOperationsBaseTest}} and {{FileSystemContractBaseTest}}. Existing behavior of contract test is to create file with permission 644. and once the {{mkdirs}} is failed to create directory under the file, ensure using {{getFileStatus}} the directory does not exist under the file. On Azure data lake file system, ACL are default enabled on file/folder level as per guideline from HDFS-9552. and requires execute permission on parent to retrieve file information. Since the file does not have execute permission, {{getFileStatus}} fails with {{AccessControlException}}. Proposal is to handle {{AccessControlException}} and ignore as expected. {code:title=FileContextMainOperationsBaseTest.java|borderStyle=solid} public void testMkdirsFailsForSubdirectoryOfExistingFile() throws Exception { ... Path testSubDir = path("/test/hadoop/file/subdir"); ... // PROPOSED - IGNORE AS EXPECTED FOR FS WHEN AccessControlException is thrown try { assertFalse(fs.exists(testSubDir)); } catch (AccessControlException e) { //expected } Path testDeepSubDir = path("/test/hadoop/file/deep/sub/dir"); ... // PROPOSED - IGNORE AS EXPECTED WHEN AccessControlException is thrown try { assertFalse(fs.exists(testDeepSubDir)); } catch (AccessControlException e) { // expected } } {code} [~ste...@apache.org], [~cnauroth] and [~chris.douglas] - What is your thought on this ? > Contract test : Allow AccessControlException while GetFileStatus on > subdirectory of existing file. > -------------------------------------------------------------------------------------------------- > > Key: HDFS-11132 > URL: https://issues.apache.org/jira/browse/HDFS-11132 > Project: Hadoop HDFS > Issue Type: Bug > Reporter: Vishwajeet Dusane > > Azure data lake file system supports traversal access on file/folder and > demands execute permission on parent for {{getFileStatus}} access. Ref > HDFS-9552. > {{testMkdirsFailsForSubdirectoryOfExistingFile}} contract test expectation > fails with {{AcccessControlException}} when {{exists(...)}} check for > sub-directory present under file. > Expected : {{exists(...)}} to handle {{AcccessControlException}} and ignore > during the check for sub-directory present under file. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org