Package org.rhq.cassandra.util

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


            newYamlEditor.setCommitLogDirectory(oldYamlEditor.getCommitLogDirectory());
            newYamlEditor.setSavedCachesDirectory(oldYamlEditor.getSavedCachesDirectory());
            newYamlEditor.setDataFileDirectories(oldYamlEditor.getDataFileDirectories());
            newYamlEditor.setSeeds(installerInfo.hostname);

            newYamlEditor.save();

            if (isRHQ48Install) {
                Properties jvmProps = new Properties();
                jvmProps.load(new FileInputStream(cassandraJvmPropsFile));
                PropertiesFileUpdate propertiesUpdater = new PropertiesFileUpdate(
View Full Code Here


            PropertySimple gossipPortProperty = newConfig.getSimple("gossipPort");
            if (gossipPortProperty != null) {
                editor.setStoragePort(gossipPortProperty.getIntegerValue());
            }

            editor.save();
        } catch (ConfigEditorException e) {
            if (e.getCause() instanceof YAMLException) {
                log.error("Failed to update " + cassandraYamlFile);
                log.info("Attempting to restore " + cassandraYamlFile);
                try {
View Full Code Here

            configEditor.setSeeds(seeds.toArray(new String[seeds.size()]));
            configEditor.setNativeTransportPort(cqlPort);
            configEditor.setStoragePort(gossipPort);

            configEditor.save();
            log.info("Cluster configuration settings have been applied to " + configEditor.getConfigFile());

            updateInternodeAuthConfFile(new HashSet<String>(addresses));

            log.info(this + " is ready to be bootstrap. Restarting storage node...");
View Full Code Here

                configEditor.restore();
                purgeDirectories(createdDataDirectories);
            } else {
                result.setSimpleResult("The storage node was succesfully updated.");
                // Commit changes, remove old directories
                configEditor.save(); // This can still throw an exception, in which case we need to rollback
                purgeDirectories(originalDataDirectories);
            }

            return result;
        } catch (ConfigEditorException e) {
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.