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

Ship it!


Ship It!

- Nate Cole


On Feb. 12, 2015, 7:09 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30953/
> -----------------------------------------------------------
> 
> (Updated Feb. 12, 2015, 7:09 p.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
> 
>

Reply via email to