mcmire-cassandra 0.12.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/CHANGELOG +108 -0
  2. data/LICENSE +202 -0
  3. data/Manifest +63 -0
  4. data/README.md +352 -0
  5. data/Rakefile +169 -0
  6. data/bin/cassandra_helper +16 -0
  7. data/conf/0.6/cassandra.in.sh +47 -0
  8. data/conf/0.6/log4j.properties +38 -0
  9. data/conf/0.6/schema.json +57 -0
  10. data/conf/0.6/storage-conf.xml +352 -0
  11. data/conf/0.7/cassandra.in.sh +46 -0
  12. data/conf/0.7/cassandra.yaml +336 -0
  13. data/conf/0.7/log4j-server.properties +41 -0
  14. data/conf/0.7/schema.json +57 -0
  15. data/conf/0.7/schema.txt +45 -0
  16. data/conf/0.8/cassandra.in.sh +41 -0
  17. data/conf/0.8/cassandra.yaml +61 -0
  18. data/conf/0.8/log4j-server.properties +40 -0
  19. data/conf/0.8/schema.json +66 -0
  20. data/conf/0.8/schema.txt +51 -0
  21. data/lib/cassandra/0.6/cassandra.rb +113 -0
  22. data/lib/cassandra/0.6/columns.rb +78 -0
  23. data/lib/cassandra/0.6/protocol.rb +90 -0
  24. data/lib/cassandra/0.6.rb +7 -0
  25. data/lib/cassandra/0.7/cassandra.rb +2 -0
  26. data/lib/cassandra/0.7/columns.rb +4 -0
  27. data/lib/cassandra/0.7/protocol.rb +5 -0
  28. data/lib/cassandra/0.7.rb +7 -0
  29. data/lib/cassandra/0.8/cassandra.rb +10 -0
  30. data/lib/cassandra/0.8/columns.rb +4 -0
  31. data/lib/cassandra/0.8/protocol.rb +21 -0
  32. data/lib/cassandra/0.8.rb +7 -0
  33. data/lib/cassandra/array.rb +8 -0
  34. data/lib/cassandra/cassandra.rb +1070 -0
  35. data/lib/cassandra/column_family.rb +3 -0
  36. data/lib/cassandra/columns.rb +144 -0
  37. data/lib/cassandra/comparable.rb +28 -0
  38. data/lib/cassandra/constants.rb +11 -0
  39. data/lib/cassandra/debug.rb +9 -0
  40. data/lib/cassandra/helpers.rb +41 -0
  41. data/lib/cassandra/keyspace.rb +3 -0
  42. data/lib/cassandra/long.rb +58 -0
  43. data/lib/cassandra/mock.rb +511 -0
  44. data/lib/cassandra/ordered_hash.rb +192 -0
  45. data/lib/cassandra/protocol.rb +120 -0
  46. data/lib/cassandra/time.rb +11 -0
  47. data/lib/cassandra.rb +38 -0
  48. data/mcmire-cassandra.gemspec +43 -0
  49. data/test/cassandra_client_test.rb +20 -0
  50. data/test/cassandra_mock_test.rb +116 -0
  51. data/test/cassandra_test.rb +863 -0
  52. data/test/comparable_types_test.rb +45 -0
  53. data/test/eventmachine_test.rb +42 -0
  54. data/test/ordered_hash_test.rb +386 -0
  55. data/test/test_helper.rb +15 -0
  56. data/vendor/0.6/gen-rb/cassandra.rb +1481 -0
  57. data/vendor/0.6/gen-rb/cassandra_constants.rb +12 -0
  58. data/vendor/0.6/gen-rb/cassandra_types.rb +482 -0
  59. data/vendor/0.7/gen-rb/cassandra.rb +1936 -0
  60. data/vendor/0.7/gen-rb/cassandra_constants.rb +12 -0
  61. data/vendor/0.7/gen-rb/cassandra_types.rb +681 -0
  62. data/vendor/0.8/gen-rb/cassandra.rb +2215 -0
  63. data/vendor/0.8/gen-rb/cassandra_constants.rb +12 -0
  64. data/vendor/0.8/gen-rb/cassandra_types.rb +824 -0
  65. metadata +200 -0
@@ -0,0 +1,352 @@
1
+ <!--
2
+ ~ Licensed to the Apache Software Foundation (ASF) under one
3
+ ~ or more contributor license agreements. See the NOTICE file
4
+ ~ distributed with this work for additional information
5
+ ~ regarding copyright ownership. The ASF licenses this file
6
+ ~ to you under the Apache License, Version 2.0 (the
7
+ ~ "License"); you may not use this file except in compliance
8
+ ~ with the License. You may obtain a copy of the License at
9
+ ~
10
+ ~ http://www.apache.org/licenses/LICENSE-2.0
11
+ ~
12
+ ~ Unless required by applicable law or agreed to in writing,
13
+ ~ software distributed under the License is distributed on an
14
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ ~ KIND, either express or implied. See the License for the
16
+ ~ specific language governing permissions and limitations
17
+ ~ under the License.
18
+ -->
19
+ <Storage>
20
+ <!--======================================================================-->
21
+ <!-- Basic Configuration -->
22
+ <!--======================================================================-->
23
+
24
+ <!--
25
+ ~ The name of this cluster. This is mainly used to prevent machines in
26
+ ~ one logical cluster from joining another.
27
+ -->
28
+ <ClusterName>Test</ClusterName>
29
+
30
+ <!--
31
+ ~ Turn on to make new [non-seed] nodes automatically migrate the right data
32
+ ~ to themselves. (If no InitialToken is specified, they will pick one
33
+ ~ such that they will get half the range of the most-loaded node.)
34
+ ~ If a node starts up without bootstrapping, it will mark itself bootstrapped
35
+ ~ so that you can't subsequently accidently bootstrap a node with
36
+ ~ data on it. (You can reset this by wiping your data and commitlog
37
+ ~ directories.)
38
+ ~
39
+ ~ Off by default so that new clusters and upgraders from 0.4 don't
40
+ ~ bootstrap immediately. You should turn this on when you start adding
41
+ ~ new nodes to a cluster that already has data on it. (If you are upgrading
42
+ ~ from 0.4, start your cluster with it off once before changing it to true.
43
+ ~ Otherwise, no data will be lost but you will incur a lot of unnecessary
44
+ ~ I/O before your cluster starts up.)
45
+ -->
46
+ <AutoBootstrap>false</AutoBootstrap>
47
+
48
+ <!--
49
+ ~ Keyspaces and ColumnFamilies:
50
+ ~ A ColumnFamily is the Cassandra concept closest to a relational
51
+ ~ table. Keyspaces are separate groups of ColumnFamilies. Except in
52
+ ~ very unusual circumstances you will have one Keyspace per application.
53
+
54
+ ~ There is an implicit keyspace named 'system' for Cassandra internals.
55
+ -->
56
+ <Keyspaces>
57
+ <Keyspace Name="Twitter">
58
+ <KeysCachedFraction>0.01</KeysCachedFraction>
59
+ <ColumnFamily CompareWith="UTF8Type" Name="Users" />
60
+ <ColumnFamily CompareWith="UTF8Type" Name="UserAudits" />
61
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="UserRelationships" />
62
+ <ColumnFamily CompareWith="UTF8Type" Name="Usernames" />
63
+ <ColumnFamily CompareWith="UTF8Type" Name="Statuses" />
64
+ <ColumnFamily CompareWith="UTF8Type" Name="StatusAudits" />
65
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="StatusRelationships" />
66
+ <ColumnFamily CompareWith="UTF8Type" ColumnType="Super" Name="Index" />
67
+ <ColumnFamily CompareWith="BytesType" ColumnType="Standard" Name="TimelinishThings" />
68
+
69
+ <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
70
+ <ReplicationFactor>1</ReplicationFactor>
71
+ <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
72
+ </Keyspace>
73
+
74
+ <Keyspace Name="Multiblog">
75
+ <KeysCachedFraction>0.01</KeysCachedFraction>
76
+ <ColumnFamily CompareWith="TimeUUIDType" Name="Blogs"/>
77
+ <ColumnFamily CompareWith="TimeUUIDType" Name="Comments"/>
78
+
79
+ <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
80
+ <ReplicationFactor>1</ReplicationFactor>
81
+ <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
82
+ </Keyspace>
83
+
84
+ <Keyspace Name="MultiblogLong">
85
+ <KeysCachedFraction>0.01</KeysCachedFraction>
86
+ <ColumnFamily CompareWith="LongType" Name="Blogs"/>
87
+ <ColumnFamily CompareWith="LongType" Name="Comments"/>
88
+
89
+ <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
90
+ <ReplicationFactor>1</ReplicationFactor>
91
+ <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
92
+ </Keyspace>
93
+
94
+ <Keyspace Name="TypeConversions">
95
+ <KeysCachedFraction>0.01</KeysCachedFraction>
96
+ <ColumnFamily CompareWith="TimeUUIDType" Name="UUIDColumnConversion"/>
97
+ <ColumnFamily CompareWith="TimeUUIDType" CompareSubcolumnsWith="UTF8Type" ColumnType="Super" Name="SuperUUID"/>
98
+
99
+ <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
100
+ <ReplicationFactor>1</ReplicationFactor>
101
+ <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
102
+ </Keyspace>
103
+
104
+ <Keyspace Name="CassandraObject">
105
+ <KeysCachedFraction>0.01</KeysCachedFraction>
106
+ <ColumnFamily CompareWith="UTF8Type" Name="Customers" />
107
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="CustomerRelationships" />
108
+ <ColumnFamily CompareWith="TimeUUIDType" Name="CustomersByLastName" />
109
+ <ColumnFamily CompareWith="UTF8Type" Name="Invoices" />
110
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="InvoiceRelationships" />
111
+ <ColumnFamily CompareWith="UTF8Type" Name="InvoicesByNumber" />
112
+ <ColumnFamily CompareWith="UTF8Type" Name="Payments" />
113
+ <ColumnFamily CompareWith="UTF8Type" Name="Appointments" />
114
+ <!-- <ColumnFamily CompareWith="UTF8Type" Name="FirstNames" /> -->
115
+
116
+ <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
117
+ <ReplicationFactor>1</ReplicationFactor>
118
+ <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
119
+ </Keyspace>
120
+ </Keyspaces>
121
+
122
+ <!--
123
+ ~ Authenticator: any IAuthenticator may be used, including your own as long
124
+ ~ as it is on the classpath. Out of the box, Cassandra provides
125
+ ~ org.apache.cassandra.auth.AllowAllAuthenticator and,
126
+ ~ org.apache.cassandra.auth.SimpleAuthenticator
127
+ ~ (SimpleAuthenticator uses access.properties and passwd.properties by
128
+ ~ default).
129
+ ~
130
+ ~ If you don't specify an authenticator, AllowAllAuthenticator is used.
131
+ -->
132
+ <Authenticator>org.apache.cassandra.auth.AllowAllAuthenticator</Authenticator>
133
+
134
+ <!--
135
+ ~ Partitioner: any IPartitioner may be used, including your own as long
136
+ ~ as it is on the classpath. Out of the box, Cassandra provides
137
+ ~ org.apache.cassandra.dht.RandomPartitioner,
138
+ ~ org.apache.cassandra.dht.OrderPreservingPartitioner, and
139
+ ~ org.apache.cassandra.dht.CollatingOrderPreservingPartitioner.
140
+ ~ (CollatingOPP colates according to EN,US rules, not naive byte
141
+ ~ ordering. Use this as an example if you need locale-aware collation.)
142
+ ~ Range queries require using an order-preserving partitioner.
143
+ ~
144
+ ~ Achtung! Changing this parameter requires wiping your data
145
+ ~ directories, since the partitioner can modify the sstable on-disk
146
+ ~ format.
147
+ -->
148
+ <Partitioner>org.apache.cassandra.dht.RandomPartitioner</Partitioner>
149
+
150
+ <!--
151
+ ~ If you are using an order-preserving partitioner and you know your key
152
+ ~ distribution, you can specify the token for this node to use. (Keys
153
+ ~ are sent to the node with the "closest" token, so distributing your
154
+ ~ tokens equally along the key distribution space will spread keys
155
+ ~ evenly across your cluster.) This setting is only checked the first
156
+ ~ time a node is started.
157
+
158
+ ~ This can also be useful with RandomPartitioner to force equal spacing
159
+ ~ of tokens around the hash space, especially for clusters with a small
160
+ ~ number of nodes.
161
+ -->
162
+ <InitialToken></InitialToken>
163
+
164
+ <!--
165
+ ~ Directories: Specify where Cassandra should store different data on
166
+ ~ disk. Keep the data disks and the CommitLog disks separate for best
167
+ ~ performance
168
+ -->
169
+ <CommitLogDirectory>data/commitlog</CommitLogDirectory>
170
+ <DataFileDirectories>
171
+ <DataFileDirectory>data/data</DataFileDirectory>
172
+ </DataFileDirectories>
173
+ <CalloutLocation>data/callouts</CalloutLocation>
174
+ <StagingFileDirectory>data/staging</StagingFileDirectory>
175
+ <SavedCachesDirectory>data/saved_caches</SavedCachesDirectory>
176
+
177
+
178
+ <!--
179
+ ~ Addresses of hosts that are deemed contact points. Cassandra nodes
180
+ ~ use this list of hosts to find each other and learn the topology of
181
+ ~ the ring. You must change this if you are running multiple nodes!
182
+ -->
183
+ <Seeds>
184
+ <Seed>127.0.0.1</Seed>
185
+ </Seeds>
186
+
187
+
188
+ <!-- Miscellaneous -->
189
+
190
+ <!-- Time to wait for a reply from other nodes before failing the command -->
191
+ <RpcTimeoutInMillis>5000</RpcTimeoutInMillis>
192
+ <!-- Size to allow commitlog to grow to before creating a new segment -->
193
+ <CommitLogRotationThresholdInMB>128</CommitLogRotationThresholdInMB>
194
+
195
+
196
+ <!-- Local hosts and ports -->
197
+
198
+ <!--
199
+ ~ Address to bind to and tell other nodes to connect to. You _must_
200
+ ~ change this if you want multiple nodes to be able to communicate!
201
+ ~
202
+ ~ Leaving it blank leaves it up to InetAddress.getLocalHost(). This
203
+ ~ will always do the Right Thing *if* the node is properly configured
204
+ ~ (hostname, name resolution, etc), and the Right Thing is to use the
205
+ ~ address associated with the hostname (it might not be).
206
+ -->
207
+ <ListenAddress>localhost</ListenAddress>
208
+ <!-- internal communications port -->
209
+ <StoragePort>7000</StoragePort>
210
+
211
+ <!--
212
+ ~ The address to bind the Thrift RPC service to. Unlike ListenAddress
213
+ ~ above, you *can* specify 0.0.0.0 here if you want Thrift to listen on
214
+ ~ all interfaces.
215
+ ~
216
+ ~ Leaving this blank has the same effect it does for ListenAddress,
217
+ ~ (i.e. it will be based on the configured hostname of the node).
218
+ -->
219
+ <ThriftAddress>localhost</ThriftAddress>
220
+ <!-- Thrift RPC port (the port clients connect to). -->
221
+ <ThriftPort>9160</ThriftPort>
222
+ <!--
223
+ ~ Whether or not to use a framed transport for Thrift. If this option
224
+ ~ is set to true then you must also use a framed transport on the
225
+ ~ client-side, (framed and non-framed transports are not compatible).
226
+ -->
227
+ <ThriftFramedTransport>false</ThriftFramedTransport>
228
+
229
+
230
+ <!--======================================================================-->
231
+ <!-- Memory, Disk, and Performance -->
232
+ <!--======================================================================-->
233
+
234
+ <!--
235
+ ~ Access mode. mmapped i/o is substantially faster, but only practical on
236
+ ~ a 64bit machine (which notably does not include EC2 "small" instances)
237
+ ~ or relatively small datasets. "auto", the safe choice, will enable
238
+ ~ mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only"
239
+ ~ (which may allow you to get part of the benefits of mmap on a 32bit
240
+ ~ machine by mmapping only index files) and "standard".
241
+ ~ (The buffer size settings that follow only apply to standard,
242
+ ~ non-mmapped i/o.)
243
+ -->
244
+ <DiskAccessMode>auto</DiskAccessMode>
245
+
246
+ <!--
247
+ ~ Buffer size to use when performing contiguous column slices. Increase
248
+ ~ this to the size of the column slices you typically perform.
249
+ ~ (Name-based queries are performed with a buffer size of
250
+ ~ ColumnIndexSizeInKB.)
251
+ -->
252
+ <SlicedBufferSizeInKB>64</SlicedBufferSizeInKB>
253
+
254
+ <!--
255
+ ~ Buffer size to use when flushing memtables to disk. (Only one
256
+ ~ memtable is ever flushed at a time.) Increase (decrease) the index
257
+ ~ buffer size relative to the data buffer if you have few (many)
258
+ ~ columns per key. Bigger is only better _if_ your memtables get large
259
+ ~ enough to use the space. (Check in your data directory after your
260
+ ~ app has been running long enough.) -->
261
+ <FlushDataBufferSizeInMB>32</FlushDataBufferSizeInMB>
262
+ <FlushIndexBufferSizeInMB>8</FlushIndexBufferSizeInMB>
263
+
264
+ <!--
265
+ ~ Add column indexes to a row after its contents reach this size.
266
+ ~ Increase if your column values are large, or if you have a very large
267
+ ~ number of columns. The competing causes are, Cassandra has to
268
+ ~ deserialize this much of the row to read a single column, so you want
269
+ ~ it to be small - at least if you do many partial-row reads - but all
270
+ ~ the index data is read for each access, so you don't want to generate
271
+ ~ that wastefully either.
272
+ -->
273
+ <ColumnIndexSizeInKB>64</ColumnIndexSizeInKB>
274
+
275
+ <!--
276
+ ~ Flush memtable after this much data has been inserted, including
277
+ ~ overwritten data. There is one memtable per column family, and
278
+ ~ this threshold is based solely on the amount of data stored, not
279
+ ~ actual heap memory usage (there is some overhead in indexing the
280
+ ~ columns).
281
+ -->
282
+ <MemtableThroughputInMB>64</MemtableThroughputInMB>
283
+ <!--
284
+ ~ Throughput setting for Binary Memtables. Typically these are
285
+ ~ used for bulk load so you want them to be larger.
286
+ -->
287
+ <BinaryMemtableThroughputInMB>256</BinaryMemtableThroughputInMB>
288
+ <!--
289
+ ~ The maximum number of columns in millions to store in memory per
290
+ ~ ColumnFamily before flushing to disk. This is also a per-memtable
291
+ ~ setting. Use with MemtableThroughputInMB to tune memory usage.
292
+ -->
293
+ <MemtableOperationsInMillions>0.3</MemtableOperationsInMillions>
294
+ <!--
295
+ ~ The maximum time to leave a dirty memtable unflushed.
296
+ ~ (While any affected columnfamilies have unflushed data from a
297
+ ~ commit log segment, that segment cannot be deleted.)
298
+ ~ This needs to be large enough that it won't cause a flush storm
299
+ ~ of all your memtables flushing at once because none has hit
300
+ ~ the size or count thresholds yet. For production, a larger
301
+ ~ value such as 1440 is recommended.
302
+ -->
303
+ <MemtableFlushAfterMinutes>60</MemtableFlushAfterMinutes>
304
+
305
+ <!--
306
+ ~ Unlike most systems, in Cassandra writes are faster than reads, so
307
+ ~ you can afford more of those in parallel. A good rule of thumb is 2
308
+ ~ concurrent reads per processor core. Increase ConcurrentWrites to
309
+ ~ the number of clients writing at once if you enable CommitLogSync +
310
+ ~ CommitLogSyncDelay. -->
311
+ <ConcurrentReads>8</ConcurrentReads>
312
+ <ConcurrentWrites>32</ConcurrentWrites>
313
+
314
+ <!--
315
+ ~ CommitLogSync may be either "periodic" or "batch." When in batch
316
+ ~ mode, Cassandra won't ack writes until the commit log has been
317
+ ~ fsynced to disk. It will wait up to CommitLogSyncBatchWindowInMS
318
+ ~ milliseconds for other writes, before performing the sync.
319
+
320
+ ~ This is less necessary in Cassandra than in traditional databases
321
+ ~ since replication reduces the odds of losing data from a failure
322
+ ~ after writing the log entry but before it actually reaches the disk.
323
+ ~ So the other option is "timed," where writes may be acked immediately
324
+ ~ and the CommitLog is simply synced every CommitLogSyncPeriodInMS
325
+ ~ milliseconds.
326
+ -->
327
+ <CommitLogSync>periodic</CommitLogSync>
328
+ <!--
329
+ ~ Interval at which to perform syncs of the CommitLog in periodic mode.
330
+ ~ Usually the default of 10000ms is fine; increase it if your i/o
331
+ ~ load is such that syncs are taking excessively long times.
332
+ -->
333
+ <CommitLogSyncPeriodInMS>10000</CommitLogSyncPeriodInMS>
334
+ <!--
335
+ ~ Delay (in milliseconds) during which additional commit log entries
336
+ ~ may be written before fsync in batch mode. This will increase
337
+ ~ latency slightly, but can vastly improve throughput where there are
338
+ ~ many writers. Set to zero to disable (each entry will be synced
339
+ ~ individually). Reasonable values range from a minimal 0.1 to 10 or
340
+ ~ even more if throughput matters more than latency.
341
+ -->
342
+ <!-- <CommitLogSyncBatchWindowInMS>1</CommitLogSyncBatchWindowInMS> -->
343
+
344
+ <!--
345
+ ~ Time to wait before garbage-collection deletion markers. Set this to
346
+ ~ a large enough value that you are confident that the deletion marker
347
+ ~ will be propagated to all replicas by the time this many seconds has
348
+ ~ elapsed, even in the face of hardware failures. The default value is
349
+ ~ ten days.
350
+ -->
351
+ <GCGraceSeconds>864000</GCGraceSeconds>
352
+ </Storage>
@@ -0,0 +1,46 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ if [ "x$CASSANDRA_HOME" = "x" ]; then
18
+ CASSANDRA_HOME=`dirname $0`/..
19
+ fi
20
+
21
+ # The directory where Cassandra's configs live (required)
22
+ if [ "x$CASSANDRA_CONF" = "x" ]; then
23
+ CASSANDRA_CONF=$CASSANDRA_HOME/conf
24
+ fi
25
+
26
+ # This can be the path to a jar file, or a directory containing the
27
+ # compiled classes. NOTE: This isn't needed by the startup script,
28
+ # it's just used here in constructing the classpath.
29
+ cassandra_bin=$CASSANDRA_HOME/build/classes
30
+ #cassandra_bin=$cassandra_home/build/cassandra.jar
31
+
32
+ # JAVA_HOME can optionally be set here
33
+ #JAVA_HOME=/usr/local/jdk6
34
+
35
+ # The java classpath (required)
36
+ CLASSPATH=$CASSANDRA_CONF:$cassandra_bin
37
+
38
+ for jar in $CASSANDRA_HOME/lib/*.jar; do
39
+ CLASSPATH=$CLASSPATH:$jar
40
+ done
41
+
42
+ # Arguments to pass to the JVM
43
+ JVM_OPTS=" \
44
+ -ea \
45
+ -Xms128M \
46
+ -Xmx1G"