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 33238: Equals predicate does not work for host component metrics
Date Wed, 15 Apr 2015 20:57:41 GMT

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

Ship it!


Looke good!


ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java
<https://reviews.apache.org/r/33238/#comment130081>

    Not sure if this was an oversight or there was some reason to pass null.  I can't think
of any reason now.
    
    It looks like this has always passed null.  I wonder if we had a regression in populateResources.
 I sort of think that passing null at one time meant to populate all of the resources.  We
may have introduced an optimization to be smarter about which providers get called and now
passing null means that none do.
    
    In any case, I think that this is the correct behavior now.  
    
    Good catch!


- Tom Beerbower


On April 15, 2015, 8:20 p.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33238/
> -----------------------------------------------------------
> 
> (Updated April 15, 2015, 8:20 p.m.)
> 
> 
> Review request for Ambari, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10505
>     https://issues.apache.org/jira/browse/AMBARI-10505
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Generally equals predicate works on the host components. For example below API works
> {code}
> 
> {
>   "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/services/HDFS/components/NAMENODE?host_components/HostRoles/host_name=c6401.ambari.apache.org",
>   "ServiceComponentInfo" : {
>     "cluster_name" : "c1",
>     "component_name" : "NAMENODE",
>     "service_name" : "HDFS"
>   },
>   "host_components" : [
>     {
>       "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE",
>       "HostRoles" : {
>         "cluster_name" : "c1",
>         "component_name" : "NAMENODE",
>         "host_name" : "c6401.ambari.apache.org"
>       }
>     }
>   ]
> }
> {code}
> 
> *But while using equals predicate with the host_component metrics it is not working.*
GET request on following API does not return anything.
> {code}
> http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/services/HDFS/components/NAMENODE?host_components/metrics/dfs/FSNamesystem/HAState=active
> {code}
> 
> NOTE: filtering does work for host components metrics i.e below API call works: 
> {code}http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=host_components/metrics/dfs/FSNamesystem/HAState

> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java 0ab9d07

>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 5ac91fd

> 
> Diff: https://reviews.apache.org/r/33238/diff/
> 
> 
> Testing
> -------
> 
> All unit test passed. Manual testing done.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


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