ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Hurley" <jhur...@hortonworks.com>
Subject Re: Review Request 33901: Views: @Inject using com.google.inject.Inject is broken.
Date Wed, 06 May 2015 20:26:51 GMT

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

Ship it!


Ship It!

- Jonathan Hurley


On May 6, 2015, 2:51 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33901/
> -----------------------------------------------------------
> 
> (Updated May 6, 2015, 2:51 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, and Robert Levas.
> 
> 
> Bugs: AMBARI-10965
>     https://issues.apache.org/jira/browse/AMBARI-10965
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There was a class loader change that makes the view load the classes from the view loader
first then from the parent. I think that the view framework is loading the Inject annotation
from the parent class loader while the view itself is now loading the inject annotation from
the view loader.
> The javax classes are an exception... always loaded from the parent, so 'import javax.inject.Inject'
works while 'import com.google.inject.Inject ' does not.
> My example using the java inject annotation works, the Slider and Hive views using the
google annotation do not.
> Bottom line is that @Inject into view components is broken if they use the google inject
annotation.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewClassLoader.java ad8c805

>   ambari-server/src/test/java/org/apache/ambari/server/view/ViewClassLoaderTest.java
3a9ecd3 
> 
> Diff: https://reviews.apache.org/r/33901/diff/
> 
> 
> Testing
> -------
> 
> Tested manually with Slider view.
> 
> Added new case for view class loader unit test.
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


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