<commit_before>#
# Cookbook Name:: cassandra
# Recipe:: install
#
# Copyright 2011, DataStax
#
# Apache License
#

###################################################
# 
# Install Cassandra
# 
###################################################
#
#

# Not sure we need this?  
execute "clear-data" do
  command "rm -rf /var/lib/cassandra/data/system"
  action :nothing
end

#service "cassandra" do 
#  supports :status => true, :restart => true, :reload => true
#  action [ :enable, :start ]
#end

# Sets up a user to own the data directories
node[:internal][:package_user] = "cassandra"

# Installs the latest Cassandra version depending on your deployment choice
if node[:setup][:deployment] == "08x" or node[:setup][:deployment] == "07x" or  node[:setup][:deployment] == "10x" or  node[:setup][:deployment] == "11x"
  case node[:platform]
    when "ubuntu", "debian"
      package "cassandra" do
        notifies :run, resources(:execute => "clear-data"), :immediately
      end

    when "centos", "redhat", "fedora"
#   Download cassandra rpm based on OS choice..  (hard set to 8 for the time being)
       execute "rpm -Uvh http://cassandra-rpm.googlecode.com/files/apache-cassandra-0.8.5-0.el5.noarch.rpm"
#      package "cassandra" do
#        notifies :run, resources(:execute => "clear-data"), :immediately
#      end
  end
end

# Drop the config.
template "/etc/cassandra/cassandra-env.sh" do
   owner "cassandra"<commit_msg>changed cass rpm to 1.<commit_after>#
# Cookbook Name:: cassandra
# Recipe:: install
#
# Copyright 2011, DataStax
#
# Apache License
#

###################################################
# 
# Install Cassandra
# 
###################################################
#
#

# Not sure we need this?  
execute "clear-data" do
  command "rm -rf /var/lib/cassandra/data/system"
  action :nothing
end

#service "cassandra" do 
#  supports :status => true, :restart => true, :reload => true
#  action [ :enable, :start ]
#end

# Sets up a user to own the data directories
node[:internal][:package_user] = "cassandra"

# Installs the latest Cassandra version depending on your deployment choice
if node[:setup][:deployment] == "08x" or node[:setup][:deployment] == "07x" or  node[:setup][:deployment] == "10x" or  node[:setup][:deployment] == "11x"
  case node[:platform]
    when "ubuntu", "debian"
      package "cassandra" do
        notifies :run, resources(:execute => "clear-data"), :immediately
      end

    when "centos", "redhat", "fedora"
#   Download cassandra rpm based on OS choice..  (hard set to 8 for the time being)
#       execute "rpm -Uvh http://cassandra-rpm.googlecode.com/files/apache-cassandra-0.8.5-0.el5.noarch.rpm"
       execute "rpm -Uvh http://cassandra-rpm.googlecode.com/files/apache-cassandra-1.0.10-0.el5.noarch.rpm"
#      package "cassandra" do
#        notifies :run, resources(:execute => "clear-data"), :immediately
#      end
  end
end

# Drop the config.
template "/etc/cassandra/cassandra-env.sh" do
   owner "cassandra"
{'fraction_non_alphanumeric': 0.20227348712805082, 'fraction_numerical': 0.014376462721497826, 'mean_word_length': 4.0285714285714285, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2633970', 'n_tokens_mistral': 1027, 'n_tokens_neox': 968, 'n_words': 269}