[06/50] [abbrv] ambari git commit: AMBARI-14714. add new v2 interfaces for blueprint
AMBARI-14714. add new v2 interfaces for blueprint Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c8ed58d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c8ed58d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c8ed58d Branch: refs/heads/branch-feature-AMBARI-14714-ui Commit: 9c8ed58d11a904392bebb89b42049eed10932a17 Parents: 9306544 Author: Sandor MagyariAuthored: Fri Oct 6 18:20:28 2017 +0200 Committer: Sandor Magyari Committed: Fri Oct 6 18:21:47 2017 +0200 -- .../ambari/server/controller/StackV2.java | 816 +++ .../ambari/server/topology/BlueprintImplV2.java | 134 +++ .../ambari/server/topology/BlueprintV2.java | 179 .../ambari/server/topology/ComponentV2.java | 72 ++ .../ambari/server/topology/HostGroupV2.java | 124 +++ 5 files changed, 1325 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c8ed58d/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java new file mode 100644 index 000..3e34951 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java @@ -0,0 +1,816 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.controller; + +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.orm.entities.StackEntity; +import org.apache.ambari.server.state.*; +import org.apache.ambari.server.topology.Cardinality; +import org.apache.ambari.server.topology.Configuration; + +import java.util.*; + +/** + * Encapsulates stack information. + */ +public class StackV2 { + /** + * Stack name + */ + private String name; + + /** + * Stack version + */ + private String version; + +/** + * Repo version + */ + private String repoVersion; + + /** + * Map of service name to components + */ + private Map serviceComponents = +new HashMap<>(); + + /** + * Map of component to service + */ + private Map componentService = new HashMap<>(); + + /** + * Map of component to dependencies + */ + private Map dependencies = +new HashMap<>(); + + /** + * Map of dependency to conditional service + */ + private Map dependencyConditionalServiceMap = +new HashMap<>(); + + /** + * Map of database component name to configuration property which indicates whether + * the database in to be managed or if it is an external non-managed instance. + * If the value of the config property starts with 'New', the database is determined + * to be managed, otherwise it is non-managed. + */ + private Map dbDependencyInfo = new HashMap<>(); + + /** + * Map of component to required cardinality + */ + private Map cardinalityRequirements = new HashMap<>(); + + //todo: instead of all these maps from component -> * , + //todo: we should use a Component object with all of these attributes + private Set masterComponents = new HashSet<>(); + + /** + * Map of component to auto-deploy information + */ + private Map componentAutoDeployInfo = +new HashMap<>(); + + /** + * Map of service to config type properties + */ + private Map >> serviceConfigurations = +new HashMap<>(); + + /** + * Map of service to required type properties + */ + private Map >> requiredServiceConfigurations = +new HashMap<>(); + + /** + * Map of service to config type properties + */ + private Map > stackConfigurations = +new HashMap<>(); + + /** +
ambari git commit: AMBARI-14714. add new v2 interfaces for blueprint
Repository: ambari Updated Branches: refs/heads/branch-feature-AMBARI-14714 9306544e5 -> 9c8ed58d1 AMBARI-14714. add new v2 interfaces for blueprint Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c8ed58d Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c8ed58d Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c8ed58d Branch: refs/heads/branch-feature-AMBARI-14714 Commit: 9c8ed58d11a904392bebb89b42049eed10932a17 Parents: 9306544 Author: Sandor MagyariAuthored: Fri Oct 6 18:20:28 2017 +0200 Committer: Sandor Magyari Committed: Fri Oct 6 18:21:47 2017 +0200 -- .../ambari/server/controller/StackV2.java | 816 +++ .../ambari/server/topology/BlueprintImplV2.java | 134 +++ .../ambari/server/topology/BlueprintV2.java | 179 .../ambari/server/topology/ComponentV2.java | 72 ++ .../ambari/server/topology/HostGroupV2.java | 124 +++ 5 files changed, 1325 insertions(+) -- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c8ed58d/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java -- diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java new file mode 100644 index 000..3e34951 --- /dev/null +++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackV2.java @@ -0,0 +1,816 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ambari.server.controller; + +import org.apache.ambari.server.AmbariException; +import org.apache.ambari.server.orm.entities.StackEntity; +import org.apache.ambari.server.state.*; +import org.apache.ambari.server.topology.Cardinality; +import org.apache.ambari.server.topology.Configuration; + +import java.util.*; + +/** + * Encapsulates stack information. + */ +public class StackV2 { + /** + * Stack name + */ + private String name; + + /** + * Stack version + */ + private String version; + +/** + * Repo version + */ + private String repoVersion; + + /** + * Map of service name to components + */ + private Map serviceComponents = +new HashMap<>(); + + /** + * Map of component to service + */ + private Map componentService = new HashMap<>(); + + /** + * Map of component to dependencies + */ + private Map dependencies = +new HashMap<>(); + + /** + * Map of dependency to conditional service + */ + private Map dependencyConditionalServiceMap = +new HashMap<>(); + + /** + * Map of database component name to configuration property which indicates whether + * the database in to be managed or if it is an external non-managed instance. + * If the value of the config property starts with 'New', the database is determined + * to be managed, otherwise it is non-managed. + */ + private Map dbDependencyInfo = new HashMap<>(); + + /** + * Map of component to required cardinality + */ + private Map cardinalityRequirements = new HashMap<>(); + + //todo: instead of all these maps from component -> * , + //todo: we should use a Component object with all of these attributes + private Set masterComponents = new HashSet<>(); + + /** + * Map of component to auto-deploy information + */ + private Map componentAutoDeployInfo = +new HashMap<>(); + + /** + * Map of service to config type properties + */ + private Map >> serviceConfigurations = +new HashMap<>(); + + /** + * Map of service to required type properties + */ + private Map >> requiredServiceConfigurations = +new HashMap<>(); + + /** + * Map of service to config type properties + */ +