incubator-ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Speidel (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-1087) Ambari API: 'OR' queries are broken if any of the predicates fail
Date Fri, 14 Dec 2012 21:50:12 GMT
John Speidel created AMBARI-1087:
------------------------------------

             Summary: Ambari API: 'OR' queries are broken if any of the predicates fail
                 Key: AMBARI-1087
                 URL: https://issues.apache.org/jira/browse/AMBARI-1087
             Project: Ambari
          Issue Type: Sub-task
            Reporter: John Speidel
            Assignee: John Speidel


When using an OR '|' operator in a query, the query fails to return any data if any predicate
doesn't match.

For example:
http://localhost:8080/api/v1/clusters?Clusters/cluster_name=c1

RETURNS:
{
  "href" : "http://localhost:8080/api/v1/clusters?Clusters/cluster_name=c1",
  "items" : [
    {
      "href" : "http://localhost:8080/api/v1/clusters/c1",
      "Clusters" : {
        "cluster_name" : "c1",
        "version" : "HDP-1.2.0"
      }
    }
  ]
}

http://localhost:8080/api/v1/clusters?Clusters/cluster_name=c1|Clusters/cluster_name=foo

RETURNS:
{
  "href" : "http://localhost:8080/api/v1/clusters?Clusters/cluster_name=c1|Clusters/cluster_name=foo",
  "items" : [ ]
}

The second query should return the same data as the first query but because the predicate
'Clusters/cluster_name=foo' doesn't match any rows, nothing is returned.






--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message