Skip to content

Commit

Permalink
Skip loading the schema on 0.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Jackson committed May 2, 2011
1 parent dcbc8fb commit 3099f1a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Rakefile
Expand Up @@ -85,15 +85,16 @@ namespace :data do

desc "Load test data structures."
task :load do
return true if CASSANDRA_VERSION == '0.6'

schema_path = "#{File.expand_path(Dir.pwd)}/conf/#{CASSANDRA_VERSION}/schema.txt"
puts "Loading test data structures."
Dir.chdir(File.join(CASSANDRA_HOME, "cassandra-#{CASSANDRA_VERSION}")) do
begin
sh("bin/cassandra-cli --host localhost --batch < #{schema_path}")
rescue
puts "Schema already loaded."
unless CASSANDRA_VERSION == '0.6'

schema_path = "#{File.expand_path(Dir.pwd)}/conf/#{CASSANDRA_VERSION}/schema.txt"
puts "Loading test data structures."
Dir.chdir(File.join(CASSANDRA_HOME, "cassandra-#{CASSANDRA_VERSION}")) do
begin
sh("bin/cassandra-cli --host localhost --batch < #{schema_path}")
rescue
puts "Schema already loaded."
end
end
end
end
Expand Down

0 comments on commit 3099f1a

Please sign in to comment.