Package org.rhq.cassandra.util

Examples of org.rhq.cassandra.util.ConfigEditor.load()


        assertEquals(log4jProps.getProperty("log4j.appender.R.File"), StorageInstaller.STORAGE_LOG_FILE_PATH,
            "The log file is wrong");

        File yamlFile = new File(confDir, "cassandra.yaml");
        ConfigEditor yamlEditor = new ConfigEditor(yamlFile);
        yamlEditor.load();

        assertEquals(yamlEditor.getInternodeAuthenticator(), "org.rhq.cassandra.auth.RhqInternodeAuthenticator",
            "Failed to set the internode_authenticator property in " + yamlFile);
        assertEquals(yamlEditor.getAuthenticator(), "org.apache.cassandra.auth.PasswordAuthenticator",
            "The authenticator property is wrong");
View Full Code Here


        assertEquals(log4jProps.getProperty("log4j.appender.R.File"), StorageInstaller.STORAGE_LOG_FILE_PATH,
            "The log file is wrong");

        File yamlFile = new File(confDir, "cassandra.yaml");
        ConfigEditor yamlEditor = new ConfigEditor(yamlFile);
        yamlEditor.load();

        assertEquals(yamlEditor.getInternodeAuthenticator(), "org.rhq.cassandra.auth.RhqInternodeAuthenticator",
            "Failed to set the internode_authenticator property in " + yamlFile);
        assertEquals(yamlEditor.getAuthenticator(), "org.apache.cassandra.auth.PasswordAuthenticator",
            "The authenticator property is wrong");
View Full Code Here

        assertEquals(properties.getProperty("jmx_port"), "7399", "Failed to update the JMX port in "
            + cassandraJvmPropsFile);

        File yamlFile = new File(confDir, "cassandra.yaml");
        ConfigEditor newYamlEditor = new ConfigEditor(yamlFile);
        newYamlEditor.load();

        ConfigEditor oldYamlEditor = new ConfigEditor(oldCassandraYamlFile);
        oldYamlEditor.load();

        assertEquals(newYamlEditor.getInternodeAuthenticator(), "org.rhq.cassandra.auth.RhqInternodeAuthenticator",
View Full Code Here

        File yamlFile = new File(confDir, "cassandra.yaml");
        ConfigEditor newYamlEditor = new ConfigEditor(yamlFile);
        newYamlEditor.load();

        ConfigEditor oldYamlEditor = new ConfigEditor(oldCassandraYamlFile);
        oldYamlEditor.load();

        assertEquals(newYamlEditor.getInternodeAuthenticator(), "org.rhq.cassandra.auth.RhqInternodeAuthenticator",
            "Failed to set the internode_authenticator property in " + yamlFile);
        assertEquals(newYamlEditor.getAuthenticator(), oldYamlEditor.getAuthenticator(), "The authenticator property "
            + "is wrong");
View Full Code Here

            deployer.unzipDistro();
            deployer.applyConfigChanges();
            deployer.updateFilePerms();

            ConfigEditor oldYamlEditor = new ConfigEditor(oldYamlFile);
            oldYamlEditor.load();
            ConfigEditor newYamlEditor = new ConfigEditor(newYamlFile);
            newYamlEditor.load();

            installerInfo.hostname = oldYamlEditor.getListenAddress();
            newYamlEditor.setListenAddress(installerInfo.hostname);
View Full Code Here

            deployer.updateFilePerms();

            ConfigEditor oldYamlEditor = new ConfigEditor(oldYamlFile);
            oldYamlEditor.load();
            ConfigEditor newYamlEditor = new ConfigEditor(newYamlFile);
            newYamlEditor.load();

            installerInfo.hostname = oldYamlEditor.getListenAddress();
            newYamlEditor.setListenAddress(installerInfo.hostname);
            newYamlEditor.setRpcAddress(installerInfo.hostname);
View Full Code Here

            }

            File oldConfDir = new File(existingStorageDir, "conf");
            File oldYamlFile = new File(oldConfDir, "cassandra.yaml");
            ConfigEditor oldYamlEditor = new ConfigEditor(oldYamlFile);
            oldYamlEditor.load();

            String storageNodeAddress = oldYamlEditor.getListenAddress();

            Properties dbProperties;
            File oldServerPropsFile = new File(fromDir, "bin/rhq-server.properties");
View Full Code Here

            }

            if (yamlConfigurationPath != null) {
                File yamlConfigurationFile = new File(yamlConfigurationPath, "cassandra.yaml");
                ConfigEditor yamlEditor = new ConfigEditor(yamlConfigurationFile);
                yamlEditor.load();

                pluginConfig.put(new PropertySimple(YAML_PROPERTY, yamlConfigurationFile.getAbsolutePath()));
                pluginConfig.put(new PropertySimple(CLUSTER_NAME_PROPERTY, yamlEditor.getClusterName()));
                pluginConfig.put(new PropertySimple(HOST_PROPERTY, yamlEditor.getListenAddress()));
                pluginConfig.put(new PropertySimple(AUTHENTICATOR_PROPERTY, yamlEditor.getAuthenticator()));
View Full Code Here

            File basedir = jvmOptsFile.getParentFile().getParentFile();
            config.put(new PropertySimple("heapDumpDir", new File(basedir, "bin").getAbsolutePath()));
        }

        ConfigEditor yamlEditor = new ConfigEditor(cassandraYamlFile);
        yamlEditor.load();
        config.put(new PropertySimple("cqlPort", yamlEditor.getNativeTransportPort()));
        config.put(new PropertySimple("gossipPort", yamlEditor.getStoragePort()));

        // Read data directories here..
        config.put(new PropertySimple("CommitLogLocation", yamlEditor.getCommitLogDirectory()));
View Full Code Here

    }

    private void updateCassandraYaml(Configuration newConfig) {
        ConfigEditor editor = new ConfigEditor(cassandraYamlFile);
        try {
            editor.load();

            PropertySimple cqlPortProperty = newConfig.getSimple("cqlPort");
            if (cqlPortProperty != null) {
                editor.setNativeTransportPort(cqlPortProperty.getIntegerValue());
            }
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.