[ https://issues.apache.org/jira/browse/HADOOP-7602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13095625#comment-13095625 ]
John George commented on HADOOP-7602: ------------------------------------- > > Regarding tests, no matter how this is fixed, you should have one that calls > {{TokenCache.obtainTokensForNamenodes}} with a non-server based authority uri > (ie. a har path) since that's what is breaking. To me (based on the two patches uploaded until now), this is a unit test that specifically tests whether buildDTServiceName() is dealing with non-server based authority uri properly or not - because that is specifically where the NPE was. To test obtainTokensForNamenodes() or any function above would be good to have, but does not look like it is specific to the patch that is submitted herewith. But, if the changes you suggested are made, then it does makes sense to unit test {{ObjectTokensForNamenodes}} as well. > > I consider the pre MR-2780 behavior of {{buildDTServiceAuthority}} is a bug. > The method is not documented as returning an empty string when given bad > input. :) Are you saying everything that is not documented is a bug? On a serious note, when you say the "pre MR-2780" behavior is a bug - are you saying there were issues that the users of {{buildDTServiceAuthority}} ran into because it was returning a string that was not "host:port"? Or are you saying it could have had issues? If so, what issues? > > The {{TokenCache}} should stop erroneously calling it. However, even if the > {{TokenCache}} isn't going to erroneously call the method anymore, I feel > there is still value in having {{buildDTServiceAuthority}} throw on invalid > input instead of returning an invalid value. Otherwise, an invalid return > value will only cause an error to crop up someplace else. What you are stating above definitely makes sense in trunk - but in a sustaining release it seems better to make minimal changes to fix bugs? > wordcount, sort etc on har files fails with NPE > ----------------------------------------------- > > Key: HADOOP-7602 > URL: https://issues.apache.org/jira/browse/HADOOP-7602 > Project: Hadoop Common > Issue Type: Bug > Affects Versions: 0.20.205.0, 0.20.206.0 > Reporter: John George > Assignee: John George > Fix For: 0.20.205.0 > > Attachments: hadoop-7602.1.patch, hadoop-7602.patch > > > wordcount, sort etc on har files fails with > NPE@createSocketAddr(NetUtils.java:137). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira