You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "John Speidel (JIRA)" <ji...@apache.org> on 2012/12/14 22:52:12 UTC

[jira] [Updated] (AMBARI-1087) Ambari API: 'OR' queries are broken if any of the predicates fail

     [ https://issues.apache.org/jira/browse/AMBARI-1087?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Speidel updated AMBARI-1087:
---------------------------------

    Attachment: AMBARI-1087.patch
    
> 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
>             Fix For: 1.2.0
>
>         Attachments: AMBARI-1087.patch
>
>
> 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