AMBARI-23032 export cluster as blueprint for 3.0#1367
Conversation
…nto AMBARI-23032-branch-feature-AMBARI-14714
…nto AMBARI-23032-branch-feature-AMBARI-14714
…nto AMBARI-23032-branch-feature-AMBARI-14714
…nto AMBARI-23032-branch-feature-AMBARI-14714
…nto AMBARI-23032-branch-feature-AMBARI-14714
…nto AMBARI-23032-branch-feature-AMBARI-14714
|
Refer to this link for build results (access rights to CI server needed): |
| serviceGroupToMpack = clusterNode.getChild("servicegroups").getChildren().stream(). | ||
| map(tn -> tn.getObject().getPropertiesMap().get(ServiceGroupResourceProvider.RESPONSE_KEY)). | ||
| collect(toMap(m -> m.get("service_group_name").toString(), m -> new StackId(m.get("version").toString()))); | ||
| collect(toMap(m -> m.get("service_group_name").toString(), m -> new StackId(m.get("stack").toString()))); |
There was a problem hiding this comment.
#1363 is changing service group response in the opposite way (return "version" instead of "stack"). I think these strings should be defined in a constant in ServiceGroupResourceProvider (also "mpack_name" etc.).
rnettleton
left a comment
There was a problem hiding this comment.
The patch looks fine to me.
Just a single comment that needs to be addressed, since it looks like there might be a error in the Component.equals() implementation.
| return Objects.equals(name, component.name) && | ||
| Objects.equals(stackId, component.stackId) && | ||
| Objects.equals(mpackInstance, component.mpackInstance) && | ||
| Objects.equals(stackId, component.stackId) && |
There was a problem hiding this comment.
Why is the same "Objects.equals(stackId, component.stackId)" line added in two places in this equals() implementation? Is this a typo?
There was a problem hiding this comment.
Looks like a merge issue. Thanks for spotting it.
|
Refer to this link for build results (access rights to CI server needed): |
What changes were proposed in this pull request?
Fixed NPE in exporting caused by recent changes on the branch.
How was this patch tested?