Examples of ClusterType


Examples of com.vmware.bdd.apitypes.ClusterType

            clusterCreate.setPassword(password);
         }
      }

      if (type != null) {
         ClusterType clusterType = ClusterType.getByDescription(type);
         if (clusterType == null) {
            CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER,
                  name, Constants.OUTPUT_OP_CREATE,
                  Constants.OUTPUT_OP_RESULT_FAIL, Constants.INVALID_VALUE
                        + " " + "type=" + type);
View Full Code Here

Examples of org.apache.geronimo.tomcat.model.ClusterType

    public void testLoadServer2() throws Exception {
        File server2 = resolveFile(SERVER_2);
        FileReader in = new FileReader(server2);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            ClusterType engineClusterType = serverType.getService().get(0).getEngine().getCluster();
            assertNotNull(engineClusterType);
            validateClusterType(engineClusterType);
            ClusterType hostClusterType = serverType.getService().get(0).getEngine().getHost().get(0).getCluster();
            assertNotNull(hostClusterType);
            validateClusterType(hostClusterType);
            serverType.build(getClass().getClassLoader(), null);
        } finally {
            in.close();
View Full Code Here

Examples of org.apache.geronimo.tomcat.model.ClusterType

    public void testLoadServer2() throws Exception {
        File server2 = resolveFile(SERVER_2);
        FileReader in = new FileReader(server2);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            ClusterType engineClusterType = serverType.getService().get(0).getEngine().getCluster();
            assertNotNull(engineClusterType);
            validateClusterType(engineClusterType);
            ClusterType hostClusterType = serverType.getService().get(0).getEngine().getHost().get(0).getCluster();
            assertNotNull(hostClusterType);
            validateClusterType(hostClusterType);
            serverType.build(getClass().getClassLoader(), null);
        } finally {
            in.close();
View Full Code Here

Examples of org.apache.geronimo.tomcat.model.ClusterType

    public void testLoadServer2() throws Exception {
        File server2 = resolveFile(SERVER_2);
        FileReader in = new FileReader(server2);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            ClusterType engineClusterType = serverType.getService().get(0).getEngine().getCluster();
            assertNotNull(engineClusterType);
            validateClusterType(engineClusterType);
            ClusterType hostClusterType = serverType.getService().get(0).getEngine().getHost().get(0).getCluster();
            assertNotNull(hostClusterType);
            validateClusterType(hostClusterType);
            serverType.build(getClass().getClassLoader(), null);
        } finally {
            in.close();
View Full Code Here

Examples of org.apache.geronimo.tomcat.model.ClusterType

    public void testLoadServer2() throws Exception {
        File server2 = resolveFile(SERVER_2);
        FileReader in = new FileReader(server2);
        try {
            ServerType serverType = TomcatServerGBean.loadServerType(in);
            ClusterType engineClusterType = serverType.getService().get(0).getEngine().getCluster();
            assertNotNull(engineClusterType);
            validateClusterType(engineClusterType);
            ClusterType hostClusterType = serverType.getService().get(0).getEngine().getHost().get(0).getCluster();
            assertNotNull(hostClusterType);
            validateClusterType(hostClusterType);
            serverType.build(getClass().getClassLoader(), null);
        } finally {
            in.close();
View Full Code Here

Examples of org.voltdb.compiler.deploymentfile.ClusterType

        // <deployment>
        DeploymentType deployment = factory.createDeploymentType();
        JAXBElement<DeploymentType> doc = factory.createDeployment(deployment);

        // <cluster>
        ClusterType cluster = factory.createClusterType();
        deployment.setCluster(cluster);
        cluster.setHostcount(m_hostCount);
        cluster.setSitesperhost(m_sitesPerHost);
        cluster.setKfactor(m_replication);
        cluster.setSchema(m_useDDLSchema ? SchemaType.DDL : SchemaType.CATALOG);

        // <paths>
        PathsType paths = factory.createPathsType();
        deployment.setPaths(paths);
        Voltdbroot voltdbroot = factory.createPathsTypeVoltdbroot();
View Full Code Here

Examples of org.voltdb.compiler.deploymentfile.ClusterType

        // <deployment>
        DeploymentType deployment = factory.createDeploymentType();
        JAXBElement<DeploymentType> doc = factory.createDeployment(deployment);

        // <cluster>
        ClusterType cluster = factory.createClusterType();
        deployment.setCluster(cluster);
        cluster.setHostcount(dinfo.hostCount);
        cluster.setSitesperhost(dinfo.sitesPerHost);
        cluster.setKfactor(dinfo.replication);
        cluster.setSchema(m_useDDLSchema ? SchemaType.DDL : SchemaType.CATALOG);

        // <paths>
        PathsType paths = factory.createPathsType();
        deployment.setPaths(paths);
        Voltdbroot voltdbroot = factory.createPathsTypeVoltdbroot();
View Full Code Here

Examples of org.voltdb.compiler.deploymentfile.ClusterType

     * @param leader The leader hostname
     * @param catalog The catalog to be updated.
     * @param printLog Whether or not to print cluster configuration.
     */
    private static void setClusterInfo(Catalog catalog, DeploymentType deployment) {
        ClusterType cluster = deployment.getCluster();
        int hostCount = cluster.getHostcount();
        int sitesPerHost = cluster.getSitesperhost();
        int kFactor = cluster.getKfactor();

        ClusterConfig config = new ClusterConfig(hostCount, sitesPerHost, kFactor);

        if (!config.validate()) {
            hostLog.error(config.getErrorMsg());
        } else {
            Cluster catCluster = catalog.getClusters().get("cluster");
            // copy the deployment info that is currently not recorded anywhere else
            Deployment catDeploy = catCluster.getDeployment().get("deployment");
            catDeploy.setHostcount(hostCount);
            catDeploy.setSitesperhost(sitesPerHost);
            catDeploy.setKfactor(kFactor);
            // copy partition detection configuration from xml to catalog
            String defaultPPDPrefix = "partition_detection";
            if (deployment.getPartitionDetection() != null) {
                if (deployment.getPartitionDetection().isEnabled()) {
                    catCluster.setNetworkpartition(true);
                    CatalogMap<SnapshotSchedule> faultsnapshots = catCluster.getFaultsnapshots();
                    SnapshotSchedule sched = faultsnapshots.add("CLUSTER_PARTITION");
                    if (deployment.getPartitionDetection().getSnapshot() != null) {
                        sched.setPrefix(deployment.getPartitionDetection().getSnapshot().getPrefix());
                    }
                    else {
                        sched.setPrefix(defaultPPDPrefix);
                    }
                }
                else {
                    catCluster.setNetworkpartition(false);
                }
            }
            else {
                // Default partition detection on
                catCluster.setNetworkpartition(true);
                CatalogMap<SnapshotSchedule> faultsnapshots = catCluster.getFaultsnapshots();
                SnapshotSchedule sched = faultsnapshots.add("CLUSTER_PARTITION");
                sched.setPrefix(defaultPPDPrefix);
            }

            // copy admin mode configuration from xml to catalog
            if (deployment.getAdminMode() != null)
            {
                catCluster.setAdminport(deployment.getAdminMode().getPort());
                catCluster.setAdminstartup(deployment.getAdminMode().isAdminstartup());
            }
            else
            {
                // encode the default values
                catCluster.setAdminport(VoltDB.DEFAULT_ADMIN_PORT);
                catCluster.setAdminstartup(false);
            }

            setSystemSettings(deployment, catDeploy);

            if (deployment.getHeartbeat() != null)
            {
                catCluster.setHeartbeattimeout(deployment.getHeartbeat().getTimeout());
            }
            else
            {
                // default to 10 seconds
                catCluster.setHeartbeattimeout(10);
            }

            // copy schema modification behavior from xml to catalog
            if (cluster.getSchema() != null) {
                catCluster.setUseddlschema(cluster.getSchema() == SchemaType.DDL);
            }
            else {
                // Don't think we can get here, deployment schema guarantees a default value
                hostLog.warn("Schema modification setting not found. " +
                        "Forcing default behavior of UpdateCatalog to modify database schema.");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.