jamesgolick-cassandra 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,45 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{jamesgolick-cassandra}
5
+ s.version = "0.8.2"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Evan Weaver, Ryan King"]
9
+ s.date = %q{2010-04-13}
10
+ s.default_executable = %q{cassandra_helper}
11
+ s.description = %q{A Ruby client for the Cassandra distributed database.}
12
+ s.email = %q{}
13
+ s.executables = ["cassandra_helper"]
14
+ s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README.rdoc", "bin/cassandra_helper", "lib/cassandra.rb", "lib/cassandra/array.rb", "lib/cassandra/cassandra.rb", "lib/cassandra/columns.rb", "lib/cassandra/comparable.rb", "lib/cassandra/constants.rb", "lib/cassandra/debug.rb", "lib/cassandra/helpers.rb", "lib/cassandra/long.rb", "lib/cassandra/mock.rb", "lib/cassandra/ordered_hash.rb", "lib/cassandra/protocol.rb", "lib/cassandra/time.rb"]
15
+ s.files = ["CHANGELOG", "LICENSE", "Manifest", "README.rdoc", "Rakefile", "bin/cassandra_helper", "conf/cassandra.in.sh", "conf/log4j.properties", "conf/storage-conf.xml", "lib/cassandra.rb", "lib/cassandra/array.rb", "lib/cassandra/cassandra.rb", "lib/cassandra/columns.rb", "lib/cassandra/comparable.rb", "lib/cassandra/constants.rb", "lib/cassandra/debug.rb", "lib/cassandra/helpers.rb", "lib/cassandra/long.rb", "lib/cassandra/mock.rb", "lib/cassandra/ordered_hash.rb", "lib/cassandra/protocol.rb", "lib/cassandra/time.rb", "test/cassandra_client_test.rb", "test/cassandra_mock_test.rb", "test/cassandra_test.rb", "test/comparable_types_test.rb", "test/ordered_hash_test.rb", "test/test_helper.rb", "vendor/gen-rb/cassandra.rb", "vendor/gen-rb/cassandra_constants.rb", "vendor/gen-rb/cassandra_types.rb", "cassandra.gemspec", "test/eventmachine_test.rb"]
16
+ s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/cassandra/}
17
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Cassandra", "--main", "README.rdoc"]
18
+ s.require_paths = ["lib"]
19
+ s.rubyforge_project = %q{fauna}
20
+ s.rubygems_version = %q{1.3.6}
21
+ s.summary = %q{A Ruby client for the Cassandra distributed database.}
22
+ s.test_files = ["test/cassandra_client_test.rb", "test/cassandra_mock_test.rb", "test/cassandra_test.rb", "test/comparable_types_test.rb", "test/eventmachine_test.rb", "test/ordered_hash_test.rb", "test/test_helper.rb"]
23
+
24
+ if s.respond_to? :specification_version then
25
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
+ s.specification_version = 3
27
+
28
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
29
+ s.add_runtime_dependency(%q<thrift_client>, [">= 0.4.0"])
30
+ s.add_runtime_dependency(%q<json_pure>, [">= 0"])
31
+ s.add_runtime_dependency(%q<rake>, [">= 0"])
32
+ s.add_runtime_dependency(%q<simple_uuid>, [">= 0.1.0"])
33
+ else
34
+ s.add_dependency(%q<thrift_client>, [">= 0.4.0"])
35
+ s.add_dependency(%q<json>, [">= 0"])
36
+ s.add_dependency(%q<rake>, [">= 0"])
37
+ s.add_dependency(%q<simple_uuid>, [">= 0.1.0"])
38
+ end
39
+ else
40
+ s.add_dependency(%q<thrift_client>, [">= 0.4.0"])
41
+ s.add_dependency(%q<json>, [">= 0"])
42
+ s.add_dependency(%q<rake>, [">= 0"])
43
+ s.add_dependency(%q<simple_uuid>, [">= 0.1.0"])
44
+ end
45
+ end
@@ -0,0 +1,47 @@
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
+ # The directory where Cassandra's configs live (required)
18
+ CASSANDRA_CONF=$CASSANDRA_CONF
19
+
20
+ # This can be the path to a jar file, or a directory containing the
21
+ # compiled classes. NOTE: This isn't needed by the startup script,
22
+ # it's just used here in constructing the classpath.
23
+ cassandra_bin=$CASSANDRA_HOME/build/classes
24
+
25
+ # The java classpath (required)
26
+ CLASSPATH=$CASSANDRA_CONF:$CASSANDRA_BIN
27
+
28
+ for jar in $CASSANDRA_HOME/lib/*.jar $CASSANDRA_HOME/build/lib/jars/*.jar; do
29
+ CLASSPATH=$CLASSPATH:$jar
30
+ done
31
+
32
+ # Arguments to pass to the JVM
33
+ JVM_OPTS=" \
34
+ -ea \
35
+ -Xms128M \
36
+ -Xmx1G \
37
+ -XX:TargetSurvivorRatio=90 \
38
+ -XX:+AggressiveOpts \
39
+ -XX:+UseParNewGC \
40
+ -XX:+UseConcMarkSweepGC \
41
+ -XX:+CMSParallelRemarkEnabled \
42
+ -XX:+HeapDumpOnOutOfMemoryError \
43
+ -XX:SurvivorRatio=128 \
44
+ -XX:MaxTenuringThreshold=0 \
45
+ -Dcom.sun.management.jmxremote.port=8080 \
46
+ -Dcom.sun.management.jmxremote.ssl=false \
47
+ -Dcom.sun.management.jmxremote.authenticate=false"
@@ -0,0 +1,38 @@
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
+ # for production, you should probably set the root to INFO
18
+ # and the pattern to %c instead of %l. (%l is slower.)
19
+
20
+ # output messages into a rolling log file as well as stdout
21
+ log4j.rootLogger=DEBUG,stdout,R
22
+
23
+ # stdout
24
+ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
25
+ log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
26
+
27
+ # rolling log file ("system.log
28
+ log4j.appender.R=org.apache.log4j.DailyRollingFileAppender
29
+ log4j.appender.R.DatePattern='.'yyyy-MM-dd-HH
30
+ log4j.appender.R.layout=org.apache.log4j.PatternLayout
31
+ log4j.appender.R.layout.ConversionPattern=%5p [%t] %d{ISO8601} %F (line %L) %m%n
32
+ # Edit the next line to point to your logs directory
33
+ log4j.appender.R.File=data/logs/system.log
34
+
35
+ # Application logging options
36
+ #log4j.logger.com.facebook=DEBUG
37
+ #log4j.logger.com.facebook.infrastructure.gms=DEBUG
38
+ #log4j.logger.com.facebook.infrastructure.db=DEBUG
@@ -0,0 +1,340 @@
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="CassandraObject">
95
+ <KeysCachedFraction>0.01</KeysCachedFraction>
96
+ <ColumnFamily CompareWith="UTF8Type" Name="Customers" />
97
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="CustomerRelationships" />
98
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="CustomersByLastName" />
99
+ <ColumnFamily CompareWith="UTF8Type" Name="Invoices" />
100
+ <ColumnFamily CompareWith="UTF8Type" CompareSubcolumnsWith="TimeUUIDType" ColumnType="Super" Name="InvoiceRelationships" />
101
+ <ColumnFamily CompareWith="UTF8Type" Name="InvoicesByNumber" />
102
+ <ColumnFamily CompareWith="UTF8Type" Name="Payments" />
103
+ <ColumnFamily CompareWith="UTF8Type" Name="Appointments" />
104
+
105
+ <ReplicaPlacementStrategy>org.apache.cassandra.locator.RackUnawareStrategy</ReplicaPlacementStrategy>
106
+ <ReplicationFactor>1</ReplicationFactor>
107
+ <EndPointSnitch>org.apache.cassandra.locator.EndPointSnitch</EndPointSnitch>
108
+ </Keyspace>
109
+ </Keyspaces>
110
+
111
+ <!--
112
+ ~ Authenticator: any IAuthenticator may be used, including your own as long
113
+ ~ as it is on the classpath. Out of the box, Cassandra provides
114
+ ~ org.apache.cassandra.auth.AllowAllAuthenticator and,
115
+ ~ org.apache.cassandra.auth.SimpleAuthenticator
116
+ ~ (SimpleAuthenticator uses access.properties and passwd.properties by
117
+ ~ default).
118
+ ~
119
+ ~ If you don't specify an authenticator, AllowAllAuthenticator is used.
120
+ -->
121
+ <Authenticator>org.apache.cassandra.auth.AllowAllAuthenticator</Authenticator>
122
+
123
+ <!--
124
+ ~ Partitioner: any IPartitioner may be used, including your own as long
125
+ ~ as it is on the classpath. Out of the box, Cassandra provides
126
+ ~ org.apache.cassandra.dht.RandomPartitioner,
127
+ ~ org.apache.cassandra.dht.OrderPreservingPartitioner, and
128
+ ~ org.apache.cassandra.dht.CollatingOrderPreservingPartitioner.
129
+ ~ (CollatingOPP colates according to EN,US rules, not naive byte
130
+ ~ ordering. Use this as an example if you need locale-aware collation.)
131
+ ~ Range queries require using an order-preserving partitioner.
132
+ ~
133
+ ~ Achtung! Changing this parameter requires wiping your data
134
+ ~ directories, since the partitioner can modify the sstable on-disk
135
+ ~ format.
136
+ -->
137
+ <Partitioner>org.apache.cassandra.dht.RandomPartitioner</Partitioner>
138
+
139
+ <!--
140
+ ~ If you are using an order-preserving partitioner and you know your key
141
+ ~ distribution, you can specify the token for this node to use. (Keys
142
+ ~ are sent to the node with the "closest" token, so distributing your
143
+ ~ tokens equally along the key distribution space will spread keys
144
+ ~ evenly across your cluster.) This setting is only checked the first
145
+ ~ time a node is started.
146
+
147
+ ~ This can also be useful with RandomPartitioner to force equal spacing
148
+ ~ of tokens around the hash space, especially for clusters with a small
149
+ ~ number of nodes.
150
+ -->
151
+ <InitialToken></InitialToken>
152
+
153
+ <!--
154
+ ~ Directories: Specify where Cassandra should store different data on
155
+ ~ disk. Keep the data disks and the CommitLog disks separate for best
156
+ ~ performance
157
+ -->
158
+ <CommitLogDirectory>data/cassandra/commitlog</CommitLogDirectory>
159
+ <DataFileDirectories>
160
+ <DataFileDirectory>data/cassandra/data</DataFileDirectory>
161
+ </DataFileDirectories>
162
+ <CalloutLocation>data/cassandra/callouts</CalloutLocation>
163
+ <StagingFileDirectory>data/cassandra/staging</StagingFileDirectory>
164
+
165
+
166
+ <!--
167
+ ~ Addresses of hosts that are deemed contact points. Cassandra nodes
168
+ ~ use this list of hosts to find each other and learn the topology of
169
+ ~ the ring. You must change this if you are running multiple nodes!
170
+ -->
171
+ <Seeds>
172
+ <Seed>127.0.0.1</Seed>
173
+ </Seeds>
174
+
175
+
176
+ <!-- Miscellaneous -->
177
+
178
+ <!-- Time to wait for a reply from other nodes before failing the command -->
179
+ <RpcTimeoutInMillis>5000</RpcTimeoutInMillis>
180
+ <!-- Size to allow commitlog to grow to before creating a new segment -->
181
+ <CommitLogRotationThresholdInMB>128</CommitLogRotationThresholdInMB>
182
+
183
+
184
+ <!-- Local hosts and ports -->
185
+
186
+ <!--
187
+ ~ Address to bind to and tell other nodes to connect to. You _must_
188
+ ~ change this if you want multiple nodes to be able to communicate!
189
+ ~
190
+ ~ Leaving it blank leaves it up to InetAddress.getLocalHost(). This
191
+ ~ will always do the Right Thing *if* the node is properly configured
192
+ ~ (hostname, name resolution, etc), and the Right Thing is to use the
193
+ ~ address associated with the hostname (it might not be).
194
+ -->
195
+ <ListenAddress>localhost</ListenAddress>
196
+ <!-- internal communications port -->
197
+ <StoragePort>7000</StoragePort>
198
+
199
+ <!--
200
+ ~ The address to bind the Thrift RPC service to. Unlike ListenAddress
201
+ ~ above, you *can* specify 0.0.0.0 here if you want Thrift to listen on
202
+ ~ all interfaces.
203
+ ~
204
+ ~ Leaving this blank has the same effect it does for ListenAddress,
205
+ ~ (i.e. it will be based on the configured hostname of the node).
206
+ -->
207
+ <ThriftAddress>localhost</ThriftAddress>
208
+ <!-- Thrift RPC port (the port clients connect to). -->
209
+ <ThriftPort>9160</ThriftPort>
210
+ <!--
211
+ ~ Whether or not to use a framed transport for Thrift. If this option
212
+ ~ is set to true then you must also use a framed transport on the
213
+ ~ client-side, (framed and non-framed transports are not compatible).
214
+ -->
215
+ <ThriftFramedTransport>false</ThriftFramedTransport>
216
+
217
+
218
+ <!--======================================================================-->
219
+ <!-- Memory, Disk, and Performance -->
220
+ <!--======================================================================-->
221
+
222
+ <!--
223
+ ~ Access mode. mmapped i/o is substantially faster, but only practical on
224
+ ~ a 64bit machine (which notably does not include EC2 "small" instances)
225
+ ~ or relatively small datasets. "auto", the safe choice, will enable
226
+ ~ mmapping on a 64bit JVM. Other values are "mmap", "mmap_index_only"
227
+ ~ (which may allow you to get part of the benefits of mmap on a 32bit
228
+ ~ machine by mmapping only index files) and "standard".
229
+ ~ (The buffer size settings that follow only apply to standard,
230
+ ~ non-mmapped i/o.)
231
+ -->
232
+ <DiskAccessMode>auto</DiskAccessMode>
233
+
234
+ <!--
235
+ ~ Buffer size to use when performing contiguous column slices. Increase
236
+ ~ this to the size of the column slices you typically perform.
237
+ ~ (Name-based queries are performed with a buffer size of
238
+ ~ ColumnIndexSizeInKB.)
239
+ -->
240
+ <SlicedBufferSizeInKB>64</SlicedBufferSizeInKB>
241
+
242
+ <!--
243
+ ~ Buffer size to use when flushing memtables to disk. (Only one
244
+ ~ memtable is ever flushed at a time.) Increase (decrease) the index
245
+ ~ buffer size relative to the data buffer if you have few (many)
246
+ ~ columns per key. Bigger is only better _if_ your memtables get large
247
+ ~ enough to use the space. (Check in your data directory after your
248
+ ~ app has been running long enough.) -->
249
+ <FlushDataBufferSizeInMB>32</FlushDataBufferSizeInMB>
250
+ <FlushIndexBufferSizeInMB>8</FlushIndexBufferSizeInMB>
251
+
252
+ <!--
253
+ ~ Add column indexes to a row after its contents reach this size.
254
+ ~ Increase if your column values are large, or if you have a very large
255
+ ~ number of columns. The competing causes are, Cassandra has to
256
+ ~ deserialize this much of the row to read a single column, so you want
257
+ ~ it to be small - at least if you do many partial-row reads - but all
258
+ ~ the index data is read for each access, so you don't want to generate
259
+ ~ that wastefully either.
260
+ -->
261
+ <ColumnIndexSizeInKB>64</ColumnIndexSizeInKB>
262
+
263
+ <!--
264
+ ~ Flush memtable after this much data has been inserted, including
265
+ ~ overwritten data. There is one memtable per column family, and
266
+ ~ this threshold is based solely on the amount of data stored, not
267
+ ~ actual heap memory usage (there is some overhead in indexing the
268
+ ~ columns).
269
+ -->
270
+ <MemtableThroughputInMB>64</MemtableThroughputInMB>
271
+ <!--
272
+ ~ Throughput setting for Binary Memtables. Typically these are
273
+ ~ used for bulk load so you want them to be larger.
274
+ -->
275
+ <BinaryMemtableThroughputInMB>256</BinaryMemtableThroughputInMB>
276
+ <!--
277
+ ~ The maximum number of columns in millions to store in memory per
278
+ ~ ColumnFamily before flushing to disk. This is also a per-memtable
279
+ ~ setting. Use with MemtableThroughputInMB to tune memory usage.
280
+ -->
281
+ <MemtableOperationsInMillions>0.3</MemtableOperationsInMillions>
282
+ <!--
283
+ ~ The maximum time to leave a dirty memtable unflushed.
284
+ ~ (While any affected columnfamilies have unflushed data from a
285
+ ~ commit log segment, that segment cannot be deleted.)
286
+ ~ This needs to be large enough that it won't cause a flush storm
287
+ ~ of all your memtables flushing at once because none has hit
288
+ ~ the size or count thresholds yet. For production, a larger
289
+ ~ value such as 1440 is recommended.
290
+ -->
291
+ <MemtableFlushAfterMinutes>60</MemtableFlushAfterMinutes>
292
+
293
+ <!--
294
+ ~ Unlike most systems, in Cassandra writes are faster than reads, so
295
+ ~ you can afford more of those in parallel. A good rule of thumb is 2
296
+ ~ concurrent reads per processor core. Increase ConcurrentWrites to
297
+ ~ the number of clients writing at once if you enable CommitLogSync +
298
+ ~ CommitLogSyncDelay. -->
299
+ <ConcurrentReads>8</ConcurrentReads>
300
+ <ConcurrentWrites>32</ConcurrentWrites>
301
+
302
+ <!--
303
+ ~ CommitLogSync may be either "periodic" or "batch." When in batch
304
+ ~ mode, Cassandra won't ack writes until the commit log has been
305
+ ~ fsynced to disk. It will wait up to CommitLogSyncBatchWindowInMS
306
+ ~ milliseconds for other writes, before performing the sync.
307
+
308
+ ~ This is less necessary in Cassandra than in traditional databases
309
+ ~ since replication reduces the odds of losing data from a failure
310
+ ~ after writing the log entry but before it actually reaches the disk.
311
+ ~ So the other option is "timed," where writes may be acked immediately
312
+ ~ and the CommitLog is simply synced every CommitLogSyncPeriodInMS
313
+ ~ milliseconds.
314
+ -->
315
+ <CommitLogSync>periodic</CommitLogSync>
316
+ <!--
317
+ ~ Interval at which to perform syncs of the CommitLog in periodic mode.
318
+ ~ Usually the default of 10000ms is fine; increase it if your i/o
319
+ ~ load is such that syncs are taking excessively long times.
320
+ -->
321
+ <CommitLogSyncPeriodInMS>10000</CommitLogSyncPeriodInMS>
322
+ <!--
323
+ ~ Delay (in milliseconds) during which additional commit log entries
324
+ ~ may be written before fsync in batch mode. This will increase
325
+ ~ latency slightly, but can vastly improve throughput where there are
326
+ ~ many writers. Set to zero to disable (each entry will be synced
327
+ ~ individually). Reasonable values range from a minimal 0.1 to 10 or
328
+ ~ even more if throughput matters more than latency.
329
+ -->
330
+ <!-- <CommitLogSyncBatchWindowInMS>1</CommitLogSyncBatchWindowInMS> -->
331
+
332
+ <!--
333
+ ~ Time to wait before garbage-collection deletion markers. Set this to
334
+ ~ a large enough value that you are confident that the deletion marker
335
+ ~ will be propagated to all replicas by the time this many seconds has
336
+ ~ elapsed, even in the face of hardware failures. The default value is
337
+ ~ ten days.
338
+ -->
339
+ <GCGraceSeconds>864000</GCGraceSeconds>
340
+ </Storage>