Package com.vmware.bdd.plugin.clouderamgr.model.support

Examples of com.vmware.bdd.plugin.clouderamgr.model.support.AvailableServiceRole$Dependency


         return;
      }

      for (String key : config.keySet()) {
         try {
            AvailableServiceRole def = AvailableServiceRoleContainer.load(key);
            if (!AvailableServiceRoleContainer.isSupported(majorVersion, def)) {
               unRecogConfigTypes.add(key);
               continue;
            }

            Map<String, String> items = (Map<String, String>) config.get(key);
            for (String subKey : items.keySet()) {
               if (!def.getAvailableConfigurations().containsKey(subKey)) {
                  unRecogConfigKeys.add(subKey);
               }
            }
         } catch (IOException e) {
            unRecogConfigTypes.add(key);
View Full Code Here


            nodeDef.setNodeId(node.getName()); // temp id, will be updated when installed.
            nodeDef.setConfigs(null);
            this.nodes.add(nodeDef);

            for (String type : group.getRoles()) {
               AvailableServiceRole roleType = AvailableServiceRoleContainer.load(type);
               AvailableServiceRole serviceType = roleType.getParent();
               if (serviceType.getDisplayName().equals("IMPALA")) {
                  hasImpala = true;
               }
               CmServiceDef service = serviceDefOfType(serviceType, blueprint.getConfiguration());
               CmRoleDef roleDef = new CmRoleDef();
               roleDef.setName(node.getName() + NAME_SEPARATOR + service.getType().getName() + NAME_SEPARATOR + roleType.getName()); // temp name
               roleDef.setDisplayName(roleDef.getName());
               roleDef.setType(roleType);
               roleDef.setNodeRef(nodeDef.getNodeId());
               switch (roleType.getDisplayName()) {
                  case "HDFS_NAMENODE":
                     roleDef.addConfig(Constants.CONFIG_DFS_NAME_DIR_LIST, dataDirs(node.getVolumes(), "/dfs/nn"));
                     if (failoverEnabled) {
                        if (!alreadyHasActive) {
                           nameServiceIndex++;
                        }
                        roleDef.addConfig(Constants.CONFIG_AUTO_FAILOVER_ENABLED, "true");
                        roleDef.addConfig(Constants.CONFIG_DFS_FEDERATION_NAMESERVICE, "nameservice" + nameServiceIndex.toString()); // TODO: federation
                        roleDef.addConfig(Constants.CONFIG_DFS_NAMENODE_QUORUM_JOURNAL_NAME, "nameservice" + nameServiceIndex.toString());
                        //roleDef.addConfig(Constants.CONFIG_DFS_NAMESERVICE_MOUNTPOINTS, "/");
                        roleDef.setActive(!alreadyHasActive);

                        // auto-complete Failover Controller role
                        if (!group.getRoles().contains("HDFS_FAILOVER_CONTROLLER")) {
                           CmRoleDef failoverRole = new CmRoleDef();
                           AvailableServiceRole failoverRoleType = AvailableServiceRoleContainer.load("HDFS_FAILOVER_CONTROLLER");
                           failoverRole.setName(node.getName() + NAME_SEPARATOR + service.getType().getName() + NAME_SEPARATOR + failoverRoleType.getName()); // temp name
                           failoverRole.setType(failoverRoleType);
                           failoverRole.setNodeRef(nodeDef.getNodeId());
                           failoverRole.addConfigs(blueprint.getConfiguration());
                           failoverRole.addConfigs(group.getConfiguration()); // group level configs will override cluster level configs
                           failoverRole.setActive(!alreadyHasActive);
View Full Code Here

                Connector15DCBRoot root = (Connector15DCBRoot) config.getDConfigBeanRoot(ddBeanRoot);
                ConnectorDCB connector = (ConnectorDCB) root.getDConfigBean(ddBeanRoot.getChildBean(root.getXpaths()[0])[0]);
                connector.setConfigID("user/database-pool-"+data.getName() + "/1/car");
                // Use a parentId of null to pick up the default
                if(data.jar1 != null && !data.jar1.equals("")) {
                    Dependency dep = new Dependency();
                    connector.setDependency(new Dependency[]{dep});
                    dep.setURI(data.jar1);
                }
                if(data.jar2 != null && !data.jar2.equals("")) {
                    Dependency dep = new Dependency();
                    Dependency[] old = connector.getDependency();
                    Dependency[] longer = new Dependency[old.length+1];
                    System.arraycopy(old, 0, longer, 0, old.length);
                    longer[old.length] = dep;
                    connector.setDependency(longer);
                    dep.setURI(data.jar2);
                }
                if(data.jar3 != null && !data.jar3.equals("")) {
                    Dependency dep = new Dependency();
                    Dependency[] old = connector.getDependency();
                    Dependency[] longer = new Dependency[old.length+1];
                    System.arraycopy(old, 0, longer, 0, old.length);
                    longer[old.length] = dep;
                    connector.setDependency(longer);
                    dep.setURI(data.jar3);
                }
                ResourceAdapter adapter = connector.getResourceAdapter()[0];
                ConnectionDefinition definition = new ConnectionDefinition();
                adapter.setConnectionDefinition(new ConnectionDefinition[]{definition});
                definition.setConnectionFactoryInterface("javax.sql.DataSource");
View Full Code Here

TOP

Related Classes of com.vmware.bdd.plugin.clouderamgr.model.support.AvailableServiceRole$Dependency

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.