-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33238/
-----------------------------------------------------------
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. Manula testing done.
Thanks,
Sid Wagle