This is an automated email from the ASF dual-hosted git repository. jgolieb pushed a commit to branch branch-feature-AMBARI-14714-mpack-advisor in repository https://gitbox.apache.org/repos/asf/ambari.git
commit d09afcab02ca9cbe3a25f3e3594cbb1f2208ccbb Author: Doroszlai, Attila <[email protected]> AuthorDate: Wed May 30 12:01:12 2018 +0200 AMBARI-23746. Use List for componentID duplicate check --- .../server/controller/internal/ComponentResourceProvider.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java index 64afd34..9e32f27 100644 --- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java @@ -68,7 +68,7 @@ import org.apache.commons.lang.Validate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.google.common.collect.ImmutableSet; +import com.google.common.collect.ImmutableList; import com.google.common.collect.Sets; import com.google.inject.Inject; import com.google.inject.assistedinject.Assisted; @@ -394,7 +394,7 @@ public class ComponentResourceProvider extends AbstractControllerResourceProvide ServiceComponentFactory serviceComponentFactory = getManagementController().getServiceComponentFactory(); // do all validation checks - Map<String, Set<Set<String>>> componentNames = new HashMap<>(); + Map<String, Set<List<String>>> componentNames = new HashMap<>(); Set<String> duplicates = new HashSet<>(); for (ServiceComponentRequest request : requests) { @@ -414,7 +414,7 @@ public class ComponentResourceProvider extends AbstractControllerResourceProvide debug("Received a createComponent request: {}", request); - Set<String> componentID = ImmutableSet.of(request.getServiceGroupName(), request.getServiceName(), request.getComponentName()); + List<String> componentID = ImmutableList.of(request.getServiceGroupName(), request.getServiceName(), request.getComponentName()); boolean added = componentNames .computeIfAbsent(request.getClusterName(), __ -> new HashSet<>()) .add(componentID); -- To stop receiving notification emails like this one, please contact [email protected].
