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

Ayush Saxena commented on HADOOP-18715:
---------------------------------------

not sure if returning tokeKindMap directly to the client is a good idea, if the 
client modifies it? may be instead return copy of it? 

But we can add a debug log for sure may be above the put
{noformat}
LOG.debug("Added {}:{} int tokenKindMap", id.getKind(), id.getClass());
tokenKindMap.put(id.getKind(), id.getClass());{noformat}
and if you want may be after put can print the entire map as well? May be like 
Added <key>:<value> to tokenKindMap. Current State: <tokenKindMap>, Just check 
it doesn't exposes any secure creds, I just had a quick pass and it didn't look 
like holding some secret stuff, may be wrong. 

 

Let me know if you want to work on this, can add as you as a contributor and 
assign the ticket!!!

> Introduce gettokenKindMap in org.apache.hadoop.security.token.Token for 
> easier debugging 
> -----------------------------------------------------------------------------------------
>
>                 Key: HADOOP-18715
>                 URL: https://issues.apache.org/jira/browse/HADOOP-18715
>             Project: Hadoop Common
>          Issue Type: Bug
>    Affects Versions: 3.3.4
>            Reporter: Pralabh Kumar
>            Priority: Minor
>
> Currently there is no way to know what is store in tokenKindMap. There are 
> also no debug logs . I think we should add gettokenKindMap method , so that 
> caller can see the content of the tokenKindMap . It will really help to debug 
> . 
> {code:java}
> while (tokenIdentifiers.hasNext()) {
>           try {
>             TokenIdentifier id = tokenIdentifiers.next();
>             *tokenKindMap.put(id.getKind(), id.getClass());*
>           } catch (ServiceConfigurationError | LinkageError e) {
>             // failure to load a token implementation
>             // log at debug and continue.
>             LOG.debug("Failed to load token identifier implementation", e);
>           }
>         }
>       }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to