[
https://issues.apache.org/jira/browse/HADOOP-14442?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16025331#comment-16025331
]
Mingliang Liu commented on HADOOP-14442:
----------------------------------------
Can you briefly describe the owner mode here in the "Description" section?
# As we're using the slf4j, we don't need the String.format for parameters.
Instead, we can use placeholder. E.g.
{code}
- LOG.debug(String.format("Cannot find file/folder - '%s'. Returning owner as
empty string", absolutePath));
+LOG.debug("Cannot find file/folder - '{}'. Returning owner as empty string",
absolutePath);
{code}
# The {{ex}} to be thrown include the error message for easier debugging. The
error message can be the same as the {{LOG.error()}} before it.
{code:title=getOwnerForPath()}
3200 } catch(IOException ex) {
3201
3202 Throwable innerException =
NativeAzureFileSystemHelper.checkForAzureStorageException(ex);
3203 boolean isfileNotFoundException = innerException instanceof
StorageException
3204 &&
NativeAzureFileSystemHelper.isFileNotFoundException((StorageException)
innerException);
3205
3206 // should not throw when the exception is related to
blob/container/file/folder not found
3207 if (!isfileNotFoundException) {
3208 LOG.error(String.format("Could not retrieve owner
information for path - '%s'", absolutePath));
3209 throw ex;
3210 }
3211 }
3212 return owner;
{code}
# It's better to use {{UserGroupInformation.createUserForTesting.doAs()}}
clause in {{testOwnerPermissionNegative}} instead of simply initialize the
current user name. Is it possible to do that?
# Nit: the test path can use the test method (test case) name as the directory
name, to avoid future conflicts. e.g. {{Path parentDir = new
Path("/testOwnerPositive");}} => {{final Path parentDir = new
Path("testOwnerPermissionPositive");}}
# Nit: the checkstyle warnings seem related.
> Owner support for ranger-wasb integration
> -----------------------------------------
>
> Key: HADOOP-14442
> URL: https://issues.apache.org/jira/browse/HADOOP-14442
> Project: Hadoop Common
> Issue Type: Improvement
> Components: fs, fs/azure
> Reporter: Varada Hemeswari
> Assignee: Varada Hemeswari
> Labels: filesystem, secure, wasb
> Attachments: HADOOP-14442.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]