Package org.voltdb.catalog

Examples of org.voltdb.catalog.Systemsettings


        }
        results.addRow("users", users);

        // Add system setting information also
        // the attribute names follows the above naming rule
        Systemsettings sysSettings = deploy.getSystemsettings().get("systemsettings");
        results.addRow("elasticduration", Integer.toString(sysSettings.getElasticduration()));
        results.addRow("elasticthroughput", Integer.toString(sysSettings.getElasticthroughput()));
        results.addRow("snapshotpriority", Integer.toString(sysSettings.getSnapshotpriority()));
        results.addRow("temptablesmaxsize", Integer.toString(sysSettings.getTemptablemaxsize()));
        results.addRow("querytimeout", Integer.toString(sysSettings.getQuerytimeout()));

        return results;
    }
View Full Code Here


            "</deployment>";

        final File tmpDepOff = VoltProjectBuilder.writeStringToTempFile(depOff);
        long crcDepOff = CatalogUtil.compileDeployment(catalog, tmpDepOff.getPath(), true, false);
        assertTrue(crcDepOff >= 0);
        Systemsettings sysset = catalog.getClusters().get("cluster").getDeployment().get("deployment").getSystemsettings().get("systemsettings");
        assertEquals(100, sysset.getTemptablemaxsize());

        setUp();
        final File tmpDepOn = VoltProjectBuilder.writeStringToTempFile(depOn);
        long crcDepOn = CatalogUtil.compileDeployment(catalog, tmpDepOn.getPath(), true, false);
        assertTrue(crcDepOn >= 0);
        sysset = catalog.getClusters().get("cluster").getDeployment().get("deployment").getSystemsettings().get("systemsettings");
        assertEquals(200, sysset.getTemptablemaxsize());
    }
View Full Code Here

            "</deployment>";

        final File tmpDepOff = VoltProjectBuilder.writeStringToTempFile(depOff);
        long crcDepOff = CatalogUtil.compileDeployment(catalog, tmpDepOff.getPath(), true, false);
        assertTrue(crcDepOff >= 0);
        Systemsettings sysset = catalog.getClusters().get("cluster").getDeployment().get("deployment").getSystemsettings().get("systemsettings");
        assertEquals(0, sysset.getQuerytimeout());

        setUp();
        final File tmpDepOn = VoltProjectBuilder.writeStringToTempFile(depOn);
        long crcDepOn = CatalogUtil.compileDeployment(catalog, tmpDepOn.getPath(), true, false);
        assertTrue(crcDepOn >= 0);
        sysset = catalog.getClusters().get("cluster").getDeployment().get("deployment").getSystemsettings().get("systemsettings");
        assertEquals(200, sysset.getQuerytimeout());
    }
View Full Code Here

    void logSystemSettingFromCatalogContext() {
        if (m_catalogContext == null) {
            return;
        }
        Deployment deploy = m_catalogContext.cluster.getDeployment().get("deployment");
        Systemsettings sysSettings = deploy.getSystemsettings().get("systemsettings");

        if (sysSettings == null) {
            return;
        }

        hostLog.info("Elastic duration set to " + sysSettings.getElasticduration() + " milliseconds");
        hostLog.info("Elastic throughput set to " + sysSettings.getElasticthroughput() + " mb/s");
        hostLog.info("Max temptable size set to " + sysSettings.getTemptablemaxsize() + " mb");
        hostLog.info("Snapshot priority set to " + sysSettings.getSnapshotpriority() + " [0 - 10]");

        if (sysSettings.getQuerytimeout() > 0) {
            hostLog.info("Query timeout set to " + sysSettings.getQuerytimeout() + " milliseconds");
        }
    }
View Full Code Here

    private static void setSystemSettings(DeploymentType deployment,
                                          Deployment catDeployment)
    {
        // Create catalog Systemsettings
        Systemsettings syssettings =
            catDeployment.getSystemsettings().add("systemsettings");
        int temptableMaxSize = 100;
        int snapshotPriority = 6;
        int elasticDuration = 50;
        int elasticThroughput = 2;
        int queryTimeout = 0;
        if (deployment.getSystemsettings() != null)
        {
            Temptables temptables = deployment.getSystemsettings().getTemptables();
            if (temptables != null)
            {
                temptableMaxSize = temptables.getMaxsize();
            }
            SystemSettingsType.Snapshot snapshot = deployment.getSystemsettings().getSnapshot();
            if (snapshot != null) {
                snapshotPriority = snapshot.getPriority();
            }
            SystemSettingsType.Elastic elastic = deployment.getSystemsettings().getElastic();
            if (elastic != null) {
                elasticDuration = elastic.getDuration();
                elasticThroughput = elastic.getThroughput();
            }

            SystemSettingsType.Query timeout = deployment.getSystemsettings().getQuery();
            if (timeout != null)
            {
                queryTimeout = timeout.getTimeout();
            }
        }
        syssettings.setTemptablemaxsize(temptableMaxSize);
        syssettings.setSnapshotpriority(snapshotPriority);
        syssettings.setElasticduration(elasticDuration);
        syssettings.setElasticthroughput(elasticThroughput);
        syssettings.setQuerytimeout(queryTimeout);
    }
View Full Code Here

TOP

Related Classes of org.voltdb.catalog.Systemsettings

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.