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 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors
Date Wed, 07 Jan 2015 20:17:33 GMT


> On Jan. 7, 2015, 7:57 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java,
lines 346-356
> > <https://reviews.apache.org/r/29664/diff/1/?file=808789#file808789line346>
> >
> >     Would it be cleaner to use a SimpleResourceDefinition? ...
> >     
> >             resourceDefinition = new SimpleResourceDefinition(Resource.Type.StackArtifact,
"artifact", "artifacts");
> 
> John Speidel wrote:
>     I originally had done that but then I realized that the resource definition needs
to extend BaseStacksResourceDefinition which provides the "temporary" workaround for the stacks
vs. stacks2 sub-resource names.

I see.  No problem.


> On Jan. 7, 2015, 7:57 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java,
line 58
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line58>
> >
> >     Could this be an AbstractResourceProvider?  Does it need access to the AmbariManagementController?
> 
> John Speidel wrote:
>     It uses the controller to get the AmbariMetaInfo instance.  I guess I could inject
the meta info instance or get it some other way if we don't want new resource providers to
extend AbstractControllerResourceProvider.  If you think that is best, I can make the necessary
changes in another patch if that is ok.  Next time we talk, I would like to briefly discuss
AbstractControllerResourceProvider vs. AbstractResourceProvider so that I know what your plans
are in this area.

It's fine the way it is.  We are trying to get away from the AMC but if you have a legitimate
use then no problem.


- Tom


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


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These
endpoints will provide the static descriptors which are defined in the stack definition and
will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there
will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java
cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java
e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837

>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49

>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java
212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java
5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java
3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial
response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need
to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time
constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


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