[ 
https://issues.apache.org/jira/browse/AMBARI-3779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824124#comment-13824124
 ] 

Tom Beerbower commented on AMBARI-3779:
---------------------------------------

Attached patch.

The changes include :
 # Fix resource providers to be able to deal with a complex (OR) predicate.  
This mistake was repeated in multiple providers.
 # The related get resource methods in the AmbariManagementControllerImpl were 
set up to handle multiple request objects passed in one shot but the response 
objects were missing key information that was required to be able to assign the 
results to the correct resource. 
 # There was a bug in QueryImpl that lost parent key information for queries 
that contained more than one level of sub resources.
 # Minor cleanup of unused methods in AmbariManagementConrollerImpl.



> During cluster install cannot go past Step0
> -------------------------------------------
>
>                 Key: AMBARI-3779
>                 URL: https://issues.apache.org/jira/browse/AMBARI-3779
>             Project: Ambari
>          Issue Type: Bug
>            Reporter: Tom Beerbower
>            Assignee: Tom Beerbower
>         Attachments: AMBARI-3779.patch
>
>
> UI makes a call to 
> http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions?fields=Versions,operatingSystems/repositories/Repositories.
> The API is missing the operatingSystems info, except for the suse11 one:
> {noformat}
> {
>   "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions?fields=Versions,operatingSystems/repositories/Repositories";,
>   "items" : [
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/1.2.0";,
>       "Versions" : {
>         "active" : false,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "1.2.0"
>       },
>       "operatingSystems" : [ ]
>     },
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/1.2.1";,
>       "Versions" : {
>         "active" : false,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "1.2.1"
>       },
>       "operatingSystems" : [ ]
>     },
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/1.3.0";,
>       "Versions" : {
>         "active" : false,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "1.3.0"
>       },
>       "operatingSystems" : [ ]
>     },
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/1.3.2";,
>       "Versions" : {
>         "active" : true,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "1.3.2"
>       },
>       "operatingSystems" : [ ]
>     },
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/1.3.3";,
>       "Versions" : {
>         "active" : true,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "1.3.3"
>       },
>       "operatingSystems" : [ ]
>     },
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.5";,
>       "Versions" : {
>         "active" : false,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "2.0.5"
>       },
>       "operatingSystems" : [ ]
>     },
>     {
>       "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6";,
>       "Versions" : {
>         "active" : true,
>         "min_upgrade_version" : null,
>         "parent_stack_version" : null,
>         "stack_name" : "HDP",
>         "stack_version" : "2.0.6"
>       },
>       "operatingSystems" : [
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/centos5";,
>           "OperatingSystems" : {
>             "os_type" : "centos5",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/centos6";,
>           "OperatingSystems" : {
>             "os_type" : "centos6",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/oraclelinux5";,
>           "OperatingSystems" : {
>             "os_type" : "oraclelinux5",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/oraclelinux6";,
>           "OperatingSystems" : {
>             "os_type" : "oraclelinux6",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/redhat5";,
>           "OperatingSystems" : {
>             "os_type" : "redhat5",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/redhat6";,
>           "OperatingSystems" : {
>             "os_type" : "redhat6",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/sles11";,
>           "OperatingSystems" : {
>             "os_type" : "sles11",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [ ]
>         },
>         {
>           "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/suse11";,
>           "OperatingSystems" : {
>             "os_type" : "suse11",
>             "stack_name" : "HDP",
>             "stack_version" : "2.0.6"
>           },
>           "repositories" : [
>             {
>               "href" : 
> "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.0.6/operatingSystems/suse11/repositories/HDP-2.0.6";,
>               "Repositories" : {
>                 "base_url" : 
> "http://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.0.6.0";,
>                 "default_base_url" : 
> "http://public-repo-1.hortonworks.com/HDP/suse11/2.x/updates/2.0.6.0";,
>                 "mirrors_list" : null,
>                 "os_type" : "suse11",
>                 "repo_id" : "HDP-2.0.6",
>                 "repo_name" : "HDP",
>                 "stack_name" : "HDP",
>                 "stack_version" : "2.0.6"
>               }
>             }
>           ]
>         }
>       ]
>     }
>   ]
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to