[
https://issues.apache.org/jira/browse/HADOOP-15723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16623805#comment-16623805
]
Steve Loughran commented on HADOOP-15723:
-----------------------------------------
h3. ITestAzureBlobFileSystemAuthorization
* needs ASF header (as do the mock classes)
* tests should close the (opened) files after opening/creating/appending them.
you can simply go fs.open(path).close() for this
L129, L139: use delete(path, false) to eliminate deprecation warnings.
I don't think the unauthed tests are really stressing things properly, because
a test like {{testSetAclUnauthorized}} is going to fail on the fs.create(),
before the setAcl() call goes through.
I'd recommend
* having the normal setup() in place, with the FS created there being
authorized for full R/W
* Creating a second the other filesystems (readOnly, writeOnly) filesystems in
test setup too; closing them in teardown.
* in each test, creating all files in the r/w fs
* and only use the readonly FS for those FS operations where failures are
expected.
{code}
getFileSystem().create(TEST_FILE_PATH)
intercept(AbfsAuthorizationException.class,
()-> {
readOnlyFS.removeACL(TEST_FILE_PATH)
});
Why LambdaTestUtils.intercept()? it lets you restrict exactly where the auth
exceptions will be expected.
> ABFS: Ranger Support
> --------------------
>
> Key: HADOOP-15723
> URL: https://issues.apache.org/jira/browse/HADOOP-15723
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: HADOOP-15407
> Reporter: Thomas Marquardt
> Assignee: Yuan Gao
> Priority: Major
> Attachments: HADOOP-15273-HADOOP-15407-001.patch,
> HADOOP-15273-HADOOP-15407-002.patch, HADOOP-15273-HADOOP-15407-003.patch,
> HADOOP-15273-HADOOP-15407-004.patch
>
>
> Add support for Ranger
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]