Last active
December 17, 2015 02:09
-
-
Save jsanda/5534011 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'java' | |
import org.rhq.cassandra.schema.SchemaManager | |
if $project.properties['db'] == 'dev' | |
$self.log 'PERFORMING STORAGE NODE SETUP TO LATEST SCHEMA' | |
username = $project.properties.fetch('rhq.dev.cassandra.username', 'cassandra') | |
password = $project.properties.fetch('rhq.dev.cassandra.password', 'cassandra') | |
seeds = $project.properties.fetch('rhq.dev.cassandra.seeds', '127.0.0.1|9160|9142') | |
schemaManager = SchemaManager.new(username, password, seeds) | |
schemaManager.resetSchema | |
else | |
$self.log 'SKIPPING SCHEMA SETUP FOR STORAGE NODE' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment