ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <afernan...@hortonworks.com>
Subject Re: Review Request 30953: Views: Deprecate Impersonator
Date Thu, 12 Feb 2015 23:21:37 GMT

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


Does it still work in a kerberized cluster? I remember that AppCookieManager was needed for
that reason in the Jobs View.


ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
<https://reviews.apache.org/r/30953/#comment118339>

    Can we rename params to body?



ambari-server/src/main/java/org/apache/ambari/server/view/ViewURLStreamProvider.java
<https://reviews.apache.org/r/30953/#comment118341>

    What if headers already contains DO_AS_PARAM?



ambari-views/src/main/java/org/apache/ambari/view/URLStreamProvider.java
<https://reviews.apache.org/r/30953/#comment118343>

    Rename params to body.


- Alejandro Fernandez


On Feb. 12, 2015, 11:06 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, 11:06 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
> 
>


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