ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 30953: Views: Deprecate Impersonator
Date Fri, 13 Feb 2015 00:09:52 GMT


> On Feb. 12, 2015, 11:21 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java,
line 89
> > <https://reviews.apache.org/r/30953/diff/1/?file=862336#file862336line89>
> >
> >     Can we rename params to body?
> 
> Tom Beerbower wrote:
>     I agree that body might be a better name but I'd like to stay consistent with the
existing URLStreamProvider readFrom method.

I decided to change it after all.  Thanks.


- Tom


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30953/#review72264
-----------------------------------------------------------


On Feb. 13, 2015, 12:09 a.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30953/
> -----------------------------------------------------------
> 
> (Updated Feb. 13, 2015, 12:09 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate Cole.
> 
> 
> Bugs: AMBARI-9609
>     https://issues.apache.org/jira/browse/AMBARI-9609
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> org.apache.ambari.view.HttpImpersonator allows the user to specify requestType in ...
> 
> {code}
> public String requestURL(String urlToRead, String requestType, ImpersonatorSetting impersonatorSetting);
> {code}
> 
> but no way to pass a body or headers.
> 
> The patch makes use of the desired functionality on the existing view URLStreamProvider
and deprecates the view HttpImpersonator since the functionality is redundant.  It's cleaner
to expose a method to use the "doAs" user on the existing URLStreamProvider interface and
do it all through a single interface.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java
9d63d80 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewContextImpl.java 3c736cc

>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java dc0ce01

>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
87e2753 
>   ambari-server/src/test/java/org/apache/ambari/server/view/HttpImpersonatorImplTest.java
5a86c23 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewContextImplTest.java
88110f7 
>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewURLStreamProviderTest.java
3241e46 
>   ambari-views/src/main/java/org/apache/ambari/view/HttpImpersonator.java 00d5d86 
>   ambari-views/src/main/java/org/apache/ambari/view/ImpersonatorSetting.java 53f6189

>   ambari-views/src/main/java/org/apache/ambari/view/URLStreamProvider.java 8976cea 
> 
> Diff: https://reviews.apache.org/r/30953/diff/
> 
> 
> Testing
> -------
> 
> Manual testing to verify that "doAs" user is set in header when calling URLStreamProvider.readAs()
and URLStreamProvider.readAsCurrent().
> 
> New unit tests added.
> 
> All existing tests pass.
> INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 32:12 min
> [INFO] Finished at: 2015-02-12T18:02:41-05:00
> [INFO] Final Memory: 42M/624M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message