You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Ajit Kumar <aj...@hortonworks.com> on 2016/02/25 16:49:33 UTC

Review Request 43953: Host API fails with multi-value filter

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

Review request for Ambari, Alejandro Fernandez, Nahappan Somasundaram, and Sumit Mohanty.


Bugs: AMBARI-15167
    https://issues.apache.org/jira/browse/AMBARI-15167


Repository: ambari


Description
-------

hosts filtering by multiple state results in server error but filtering by single state works fine.

GET api/v1/clusters/clustername/hosts -d '{"RequestInfo":{"query":"stack_versions/HostStackVersions/state.in(INSTALLING,INSTALL_FAILED,OUT_OF_SYNC)"}}'
{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Stack version should have numerical id"
}

GET api/v1/clusters/clustername/hosts -d '
{"RequestInfo":{"query":"stack_versions/HostStackVersions/state.in(INSTALLING)"}}'
Request successful.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java c7e3ca9 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProviderTest.java 0824ae1 

Diff: https://reviews.apache.org/r/43953/diff/


Testing
-------

Unit test and manually testing API.
  
trunk-test-patch build is successful.
+1 overall. Here are the results of testing the latest attachment 
http://issues.apache.org/jira/secure/attachment/12789885/rb43953.patch
against trunk revision .
+1 @author. The patch does not contain any @author tags.
+1 tests included. The patch appears to include 1 new or modified test files.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed unit tests in ambari-server.
Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/5562//testReport/
Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/5562//console
This message is automatically generated.


Thanks,

Ajit Kumar


Re: Review Request 43953: Host API fails with multi-value filter

Posted by Ajit Kumar <aj...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43953/#review120712
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java (line 168)
<https://reviews.apache.org/r/43953/#comment182171>

    This is the actual change and rest is just code clean up. 
    I have added a new unit test for this as well. 
    w/o this change, unit test fails with error "org.apache.ambari.server.controller.spi.SystemException: Stack version should have numerical id"


- Ajit Kumar


On Feb. 25, 2016, 3:49 p.m., Ajit Kumar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43953/
> -----------------------------------------------------------
> 
> (Updated Feb. 25, 2016, 3:49 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nahappan Somasundaram, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-15167
>     https://issues.apache.org/jira/browse/AMBARI-15167
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> hosts filtering by multiple state results in server error but filtering by single state works fine.
> 
> GET api/v1/clusters/clustername/hosts -d '{"RequestInfo":{"query":"stack_versions/HostStackVersions/state.in(INSTALLING,INSTALL_FAILED,OUT_OF_SYNC)"}}'
> {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Stack version should have numerical id"
> }
> 
> GET api/v1/clusters/clustername/hosts -d '
> {"RequestInfo":{"query":"stack_versions/HostStackVersions/state.in(INSTALLING)"}}'
> Request successful.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java c7e3ca9 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProviderTest.java 0824ae1 
> 
> Diff: https://reviews.apache.org/r/43953/diff/
> 
> 
> Testing
> -------
> 
> Unit test and manually testing API.
>   
> trunk-test-patch build is successful.
> +1 overall. Here are the results of testing the latest attachment 
> http://issues.apache.org/jira/secure/attachment/12789885/rb43953.patch
> against trunk revision .
> +1 @author. The patch does not contain any @author tags.
> +1 tests included. The patch appears to include 1 new or modified test files.
> +1 javac. The applied patch does not increase the total number of javac compiler warnings.
> +1 release audit. The applied patch does not increase the total number of release audit warnings.
> +1 core tests. The patch passed unit tests in ambari-server.
> Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/5562//testReport/
> Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/5562//console
> This message is automatically generated.
> 
> 
> Thanks,
> 
> Ajit Kumar
> 
>