Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix cassandra attribute types and autoconf

  • Loading branch information...
commit afef9ef9da397031a816751a1030b07d50c3077a 1 parent b9af198
Benjamin Black authored

Showing 2 changed files with 21 additions and 22 deletions. Show diff stats Hide diff stats

  1. +18 18 cassandra/metadata.rb
  2. +3 4 cassandra/recipes/autoconf.rb
36 cassandra/metadata.rb
@@ -22,7 +22,7 @@
22 22 attribute "cassandra/auto_bootstrap",
23 23 :display_name => "Cassandra automatic boostrap boolean",
24 24 :description => "Boolean indicating whether a node should automatically boostrap on startup.",
25   - :default => false
  25 + :default => "false"
26 26
27 27 attribute "cassandra/keyspaces",
28 28 :display_name => "Cassandra keyspaces",
@@ -72,12 +72,12 @@
72 72 attribute "cassandra/rpc_timeout",
73 73 :display_name => "",
74 74 :description => "",
75   - :default => 5000
  75 + :default => "5000"
76 76
77 77 attribute "cassandra/commit_log_rotation_threshold",
78 78 :display_name => "",
79 79 :description => "",
80   - :default => 128
  80 + :default => "128"
81 81
82 82 attribute "cassandra/listen_addr",
83 83 :display_name => "",
@@ -87,7 +87,7 @@
87 87 attribute "cassandra/storage_port",
88 88 :display_name => "",
89 89 :description => "",
90   - :default => 7000
  90 + :default => "7000"
91 91
92 92 attribute "cassandra/thrift_addr",
93 93 :display_name => "",
@@ -97,12 +97,12 @@
97 97 attribute "cassandra/thrift_port",
98 98 :display_name => "",
99 99 :description => "",
100   - :default => 9160
  100 + :default => "9160"
101 101
102 102 attribute "cassandra/thrift_framed_transport",
103 103 :display_name => "",
104 104 :description => "",
105   - :default => false
  105 + :default => "false"
106 106
107 107 attribute "cassandra/disk_access_mode",
108 108 :display_name => "",
@@ -112,52 +112,52 @@
112 112 attribute "cassandra/sliced_buffer_size",
113 113 :display_name => "",
114 114 :description => "",
115   - :default => 64
  115 + :default => "64"
116 116
117 117 attribute "cassandra/flush_data_buffer_size",
118 118 :display_name => "",
119 119 :description => "",
120   - :default => 32
  120 + :default => "32"
121 121
122 122 attribute "cassandra/flush_index_buffer_size",
123 123 :display_name => "",
124 124 :description => "",
125   - :default => 8
  125 + :default => "8"
126 126
127 127 attribute "cassandra/column_index_size",
128 128 :display_name => "",
129 129 :description => "",
130   - :default => 64
  130 + :default => "64"
131 131
132 132 attribute "cassandra/memtable_throughput",
133 133 :display_name => "",
134 134 :description => "",
135   - :default => 64
  135 + :default => "64"
136 136
137 137 attribute "cassandra/binary_memtable_throughput",
138 138 :display_name => "",
139 139 :description => "",
140   - :default => 256
  140 + :default => "256"
141 141
142 142 attribute "cassandra/memtable_ops",
143 143 :display_name => "",
144 144 :description => "",
145   - :default => 0.3
  145 + :default => "0.3"
146 146
147 147 attribute "cassandra/memtable_flush_after",
148 148 :display_name => "",
149 149 :description => "",
150   - :default => 60
  150 + :default => "60"
151 151
152 152 attribute "cassandra/concurrent_reads",
153 153 :display_name => "",
154 154 :description => "",
155   - :default => 8
  155 + :default => "8"
156 156
157 157 attribute "cassandra/concurrent_writes",
158 158 :display_name => "",
159 159 :description => "",
160   - :default => 32
  160 + :default => "32"
161 161
162 162 attribute "cassandra/commit_log_sync",
163 163 :display_name => "",
@@ -167,9 +167,9 @@
167 167 attribute "cassandra/commit_log_sync_period",
168 168 :display_name => "",
169 169 :description => "",
170   - :default => 10000
  170 + :default => "10000"
171 171
172 172 attribute "cassandra/gc_grace",
173 173 :display_name => "",
174 174 :description => "",
175   - :default => 864000
  175 + :default => "864000"
7 cassandra/recipes/autoconf.rb
@@ -48,11 +48,10 @@
48 48 # Nodes are expected to be tagged with [:cassandra][:cluster_name] to indicate the cluster to which
49 49 # they belong (nodes are in exactly 1 cluster in this version of the cookbook), and may optionally be
50 50 # tagged with [:cassandra][:seed] set to true if a node is to act as a seed.
51   -seeds = search(:node, "cassandra_cluster_name:#{node[:cassandra][:cluster_name]} AND cassandra_seed:true", "ipaddress")
  51 +clusters = data_bag_item('cassandra', 'clusters')
  52 +node[:cassandra] = Chef::Mixin::DeepMerge.deep_merge!(node[:cassandra], clusters[node[:cassandra][:cluster_name]])
52 53
53   -# Load cluster settings from chef-server
54   -cassandra_info = data_bag('cassandra')
55   -node[:cassandra].merge!(cassandra_info['clusters'][node[:cassandra][:cluster_name]])
  54 +seeds = search(:node, "cassandra_cluster_name:#{node[:cassandra][:cluster_name]} AND cassandra_seed:true").map {|n| n['ipaddress']}
56 55 node[:cassandra][:seeds] = seeds
57 56
58 57 # Configure the various addrs for binding

0 comments on commit afef9ef

Please sign in to comment.
Something went wrong with that request. Please try again.