[ https://issues.apache.org/jira/browse/HDFS-8155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jakob Homan updated HDFS-8155: ------------------------------ Attachment: HDFS-8155.002.patch Revised patch based on ChrisD's comments. Still applies to trunk and branch-2. bq. Instead of adding its own Time classes under utils, it may make sense to move Clock from YARN to Common. Or use the Timer class in Common, if that's sufficient. Done. The Clock in YARN is public stable so can't be moved. There are about six other clocks or timers floating around. I picked the most useful and public in common. bq. If the timing classes could use existing code, the Utils class could be package-private in o.a.h.hdfs.web.oauth2 Done. They did and disappeared. I ended up moving the AccessTokenTimer out of utils package, which caused that package to vanish in a puff of smoke. Utils is now pp. bq. Please add scope/visibility annotations to classes Done. bq. The protected, mutable fields in the AccessTokenProvider classes can be private. nextRefreshMSSinceEpoch in Timer, also (constructor should explicitly init to 0 instead of self-ref) Done. bq. Instead of requiring initialize, would it make sense for AccessTokenProvider implementations to implement Configurable as appropriate? Done. There's quite a lot going on in setConf, but oh well. bq. What is the expectation for multithreaded access for these classes? Individual implementations should do the appropriate needful. For the two provided ones I've synchronized on the refresh method, which should work. bq. If AccessTokenProvider were an abstract class, could the impls share more of the code in refresh? Superficially, they look very similar... I've gone back and forth on how much to share. I'd like to leave them a bit separate for now and see how many other implementations are provided and common they are. Since the code is public/evolving, it will work to update things as necessary. As part of the Configurable change, the class did became abstract rather than an interface, which will make changes in the future easier. bq. Should refresh throw IOException instead of IllegalArgumentException, since AccessTokenProvider::getAccessToken supports it? Done. > Support OAuth2 in WebHDFS > ------------------------- > > Key: HDFS-8155 > URL: https://issues.apache.org/jira/browse/HDFS-8155 > Project: Hadoop HDFS > Issue Type: New Feature > Components: webhdfs > Reporter: Jakob Homan > Assignee: Jakob Homan > Attachments: HDFS-8155-1.patch, HDFS-8155.002.patch > > > WebHDFS should be able to accept OAuth2 credentials. -- This message was sent by Atlassian JIRA (v6.3.4#6332)