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

Steve Loughran commented on HADOOP-15954:
-----------------------------------------



h3. CustomIdentityTransformer

* initialize() method should take a filesystem URI. This lines it up with what 
I'm doing in HADOOP-16088, and allows for auth/delegation token/identity 
providers to do different things based on the URI of the filesystem.

* have it extend Closeable and have the base implementation have an empty 
close() call. Allows for transformers to create state (network connections, 
threads etc) and clean up in the close. FS can then invoke the close() call in 
its own close() operation, which will be invoked in a shared service when 
FileSystem.closeAllForUser(UGI) is invoked.

Should {{transformListStatus(FileStatus[])} take an return lists? Or is it 
mutating the array passed in? If that is allowed, then it should be mentioned, 
and if not, then not. I'm just thinking about what is a good combination of 
efficiency and integration.

h3. DefaultSPIdentityTransformer.transformFileStatus

L103: Can put braces around the second || clause, so the precedence of 
operators is obvious (ie. that the || clause includes the && comparison). I 
know it's something "obvious" we are all meant to know, but I did actually have 
to look it up myself to makes sure. 

{code}
if (shouldReplaceOwnerAndGroup(replaceOwner) || SUPER_USER.equals(replaceOwner) 
&& !skipSuperUserReplacement) {
{code}

to 

{code}
if (shouldReplaceOwnerAndGroup(replaceOwner)
   || (SUPER_USER.equals(replaceOwner) && !skipSuperUserReplacement)) {
{code}


h3. ITestAbfsIdentityTransformer

* Can you refactor those assertEquals calls in the first test methods, 
testDaemonServiceSettingIdentity and testFullyQualifiedNameWhenSettingIdentity 
to an equivalent of {{assertIdentityEquals}}

* The code in DefaultSPIdentityTransformer.getShortName(String userName) to 
handle rule transformation seems complex enough to merit testing, somehow.

> ABFS: Enable owner and group conversion for MSI and login user using OAuth
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-15954
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15954
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: 3.2.0
>            Reporter: junhua gu
>            Assignee: Da Zhou
>            Priority: Major
>         Attachments: HADOOP-15954-001.patch, HADOOP-15954-002.patch, 
> HADOOP-15954-003.patch, HADOOP-15954-004.patch, HADOOP-15954-005.patch, 
> HADOOP-15954-006.patch, HADOOP-15954-007.patch, HADOOP-15954-008.patch, 
> HADOOP-15954-009.patch, HADOOP-15954-010.patch, HADOOP-15954-011.patch, 
> HADOOP-15954-012.patch
>
>
> Add support for overwriting owner and group in set/get operations to be the 
> service principal id when OAuth is used. Add support for upn short name 
> format.
>  
> Add Standard Transformer for SharedKey / Service 
> Add interface provides an extensible model for customizing the acquisition of 
> Identity Transformer.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to