Commit Graph

28910 Commits

Author SHA1 Message Date
Jonathan Ellis 39de2d0d33 expose redone remove to thrift. patch by jbellis; reviewed by Jun Rao for #83
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765680 13f79535-47bb-0310-9956-ffa450edef68
2009-04-16 16:23:20 +00:00
Jonathan Ellis cb7cacfea7 generate supercolumn tombstone when a 2-tuple delete is passed to a super CF.
patch by jbellis; reviewed by Sandeep Tata for #84

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765451 13f79535-47bb-0310-9956-ffa450edef68
2009-04-16 02:09:24 +00:00
Jonathan Ellis 040bfd4c29 make remove test code use the same api that the thrift interface does. patch by
jbellis; reviewed by Sandeep Tata for #84

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765450 13f79535-47bb-0310-9956-ffa450edef68
2009-04-16 02:09:18 +00:00
Jonathan Ellis 2b4a0e4266 Move from ExecutorService per ColumnFamily to ES per Memtable. This allows us to
wait for the ES to quiesce completely before flushing, preventing the possibility
of ConcurrentModificationException when a get scheduled before the switch executes
concurrently with flush.  It also provides a simpler mental model (only one thread
touches memtable at a time, period) which is a valuable property.  Finally, it is
slightly more performant since it avoids hashing the CF name for each operation.

Patch by jbellis; reviewed by Todd Lipcon for #9

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765343 13f79535-47bb-0310-9956-ffa450edef68
2009-04-15 20:30:43 +00:00
Jonathan Ellis 6b2050c1fc Add MemtableSizeInMB and MemtableObjectCountInMillions to the default config. Uses a more conservative value for MemtableSizeInMB the default. Patch by Eric Evans; reviewed by jbellis for #51
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765269 13f79535-47bb-0310-9956-ffa450edef68
2009-04-15 16:56:11 +00:00
Jonathan Ellis 5e72feef0e upgrade to thrift svn r763981. for Java, this should be identical to thrift 0.1. patch by jbellis; reviewed by Eric Evans for #72
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765262 13f79535-47bb-0310-9956-ffa450edef68
2009-04-15 16:28:03 +00:00
Jonathan Ellis 4c76970c4a fix ColumnComparatorFactoryTest. patch by Jun Rao; reviewed by jbellis for #82
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@765020 13f79535-47bb-0310-9956-ffa450edef68
2009-04-15 00:22:13 +00:00
Jonathan Ellis 49b45026bd RangeFilter that filters by column name so that min <= name <= max. patch by Jun Rao; reviewed by Todd Lipcon for #77
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764848 13f79535-47bb-0310-9956-ffa450edef68
2009-04-14 15:52:49 +00:00
Jonathan Ellis 137a28fc07 jmx resource names to reflect the move to apache
This is primarily a cosmetic change. If the Facebook folks have existing
tools which use these names, and they can not easily be updated, then
this changeset can safely be omitted.

patch by Eric Evans; reviewed by jbellis for #75

for your changes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764842 13f79535-47bb-0310-9956-ffa450edef68
2009-04-14 15:47:49 +00:00
Jonathan Ellis 31e3033afd an MBean attribute for displaying a flush counter
This changeset adds a new attribute to the ColumnFamilyStore MBean which
displays the number of times the memtable has been "switched". This
attribute (along with the newly added count and size attributes),
should prove useful in tuning thresholds.

patch by Eric Evans; reviewed by jbellis for #75

for your changes.

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764841 13f79535-47bb-0310-9956-ffa450edef68
2009-04-14 15:47:44 +00:00
Jonathan Ellis a332fad07d add instrumentation for memtable attributes
The current Memtable class implements an MBean interface, but it is not
wired up. Most likely, this is because it would become defunct after
the first flush when the memtable is switched out for a new one.

The solution is to instrument ColumnFamilyStore and expose the memtable
attributes from there.

patch by Eric Evans; reviewed by jbellis for #75

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764840 13f79535-47bb-0310-9956-ffa450edef68
2009-04-14 15:47:51 +00:00
Jonathan Ellis 732695503b fix compaction regression. patch by jbellis; reviewed by Todd Lipcon and Jun Rao
for #80.

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764679 13f79535-47bb-0310-9956-ffa450edef68
2009-04-14 05:12:44 +00:00
Jonathan Ellis a1ef3b5be5 add compaction test showing regression. patch by jbellis; reviewed by Todd Lipcon
and Jun Rao for #80.

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764678 13f79535-47bb-0310-9956-ffa450edef68
2009-04-14 05:12:42 +00:00
Jonathan Ellis 50c1987265 fix getCompactionBuckets -- something is broken in NonBlockingHashMap when removing and re-adding the same collection mid-iteration; it ends up with multiple references to that collection. going back to ConcurrentHashMap fixes the problem. (any additional overhead from CHM is negligible here.) patch by jbellis; reviewed by Eric Evans for #57
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@764004 13f79535-47bb-0310-9956-ffa450edef68
2009-04-10 19:08:27 +00:00
Jonathan Ellis a7d5c6506b Remove unused method CF.merge and add more tests to ColumnFamilyTest. patch by Sandeep Tata; review by jbellis for #69
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@763859 13f79535-47bb-0310-9956-ffa450edef68
2009-04-10 02:34:17 +00:00
Jonathan Ellis 768d2d1493 Clean up FileStruct API and fix key decoration bug in anticompaction. patch by jbellis; reviewed by Jun Rao for #67
Also fix calls to isKeyInRanges in anticompaction.

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@763820 13f79535-47bb-0310-9956-ffa450edef68
2009-04-09 21:40:49 +00:00
Jonathan Ellis db2fdd8740 sanity check configuration before starting. patch by jbellis; reviewed by Eric Evans for #6
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@763387 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 20:49:37 +00:00
Jonathan Ellis f0f5ec427c don't manually create commitlog directory; cassandra will do it automatically. also put commitlog under cassandra/ with other server artifacts. patch by jbellis; reviewed by Eric Evans for #6
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@763386 13f79535-47bb-0310-9956-ffa450edef68
2009-04-08 20:49:33 +00:00
Jonathan Ellis b3d4f4a93d add log4j.properties for testing; output is to build/test/logs/system.log. patch by jbellis; reviewed by Jun Rao for #64
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762913 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 19:17:54 +00:00
Jonathan Ellis 40fa7d4a66 consolidate partition behavior in IPartitioner, so creating a new partitioner should be only a matter of implementing that interface. all the external switch statements on PartitionerType have been folded into that.
SSTable is now the only part of the code that cares about the distinction between a 'raw' key and a 'decorated' key.  variables in that class have been named clientKey or decoratedKey to show which is which.  others don't care either because they only deal with decorated keys (SequenceFile, FileStruct) or only with client keys (everyone else).

patch by jbellis; reviewed by Jun Rao for #58

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762848 13f79535-47bb-0310-9956-ffa450edef68
2009-04-07 16:55:30 +00:00
Jonathan Ellis 21f4bd568b add sleep to ColumnFamilyStoreTest to workaround waitForFlush bug. see #59
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762547 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 22:43:50 +00:00
Jonathan Ellis 9e027cef72 enable line numbers in test stack traces. patch by johano; reviewed by jbellis for #60
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762508 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 21:23:11 +00:00
Jonathan Ellis 29f5255169 add cobertura support ('ant codecoverage -Dcobertura.dir=/path/to/cobertura'). patch by johano; reviewed by jbellis for #55
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762442 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 18:00:43 +00:00
Jonathan Ellis 85c9bda653 r/m redundant or unused code. patch by jbellis; reviewed by johano for #56
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762441 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 17:56:01 +00:00
Jonathan Ellis d1e78cbf84 replace .indexOf != -1 with .contains. patch by jbellis; reviewed by johano for #56
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762440 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 17:55:52 +00:00
Jonathan Ellis fc72d43058 merge #54
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762439 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 17:55:44 +00:00
Jonathan Ellis 9452cad277 combine overloads of SSTable.next; inline getData. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762383 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:38 +00:00
Jonathan Ellis e6b830c3be combine next / getData overloads. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762382 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:34 +00:00
Jonathan Ellis 1068ee7b0c merge common parts of next(timeRange) and next(columnNames). patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762381 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:30 +00:00
Jonathan Ellis 49d75c4303 emphasize that when getting a time-based slice only the CF name is used. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762380 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:26 +00:00
Jonathan Ellis 27013dad79 semantics of TimeFilter (include all columns newer than some timestamp) mean we should use Long.MAX_VALUE as upper range, not current ms. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762379 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:22 +00:00
Jonathan Ellis 28cf5d7330 refactor SF.next(String key, DataOutputBuffer bufOut, String cf, Coordinate section) to call its overload to reduce code duplication. this will make auditing the partitioner changes easier. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762378 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:19 +00:00
Jonathan Ellis 960b9164e6 r/m no-op seeks. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762377 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:15 +00:00
Jonathan Ellis eec2f8aa03 reformat code (mostly whitespace changes) to keep subsequent patches clean. patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762376 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:12 +00:00
Jonathan Ellis 9cdc839ee8 write get_columns_since test to exercise sequenceFile.next(timeRange). patch by jbellis; reviewed by Jun Rau. see #52
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@762375 13f79535-47bb-0310-9956-ffa450edef68
2009-04-06 15:10:07 +00:00
Jonathan Ellis b61cbd37e8 add antlr-3.1.3 (should have been in r761805
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761820 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 22:18:39 +00:00
Jonathan Ellis b9bc065e3d upgrade to latest antlr; expunge 2.x. patch by Per Mellqvist, reviewed by jbellis. see #46
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761805 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 21:27:40 +00:00
Jonathan Ellis 238758b32a expunge ConcurrentHashMap in favor of NonBlockingHashMap. patch by jbellis, review by johano. see #50
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761804 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 21:27:34 +00:00
Jonathan Ellis 64b69c41b6 add svn:ignore from #25. suggested by johano, reviewed by jbellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761730 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 16:53:09 +00:00
Jonathan Ellis 9017f33e7f upgrade NBHM to latest version (1.1.1) from sf.net
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761714 13f79535-47bb-0310-9956-ffa450edef68
2009-04-03 15:57:58 +00:00
Jonathan Ellis cfb3115f09 simplify 4 if's into 1
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761452 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 22:29:14 +00:00
Jonathan Ellis 58fce86d31 use ConcurrentHashMap to simplify ugly loop (normal HashMap you cannot delete from during iteration)
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761451 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 22:29:09 +00:00
Jonathan Ellis d800e20940 don't re-run antlr unless the grammar changed. patch by Per Mellqvist
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761427 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 21:07:40 +00:00
Jonathan Ellis 7a24b51296 replace getLocalHostName with getHostName. localHostName caused problems when it was not equal to hostName by making endpoints that should be equal, not.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761426 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 21:07:37 +00:00
Jonathan Ellis de2673759a rename stageOrderedCompaction -> getCompactionBuckets. clean up code to make the algorithm more clear, and to allow grouping with more than just the previous bucket. add getCompactionBucketsTest
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761423 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 20:48:02 +00:00
Jonathan Ellis 8ef8b192dd r/m unused constructors. Use concurrent containers because while get is iterating over columns (EBM is used as the column container by CF) the memtable can continue to modify SuperColumns.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761413 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 20:14:49 +00:00
Jonathan Ellis 6fc6e048a3 put returns previous value, so separate get is redundant
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761412 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 20:14:46 +00:00
Jonathan Ellis c386d36a69 pass engine options to the constructor
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761411 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 20:14:43 +00:00
Jonathan Ellis 8632f05518 r/m generated files from svn and modify build.xml to build them. added back required jars for generation (antlr 2.7.7 and stringtemplate). patch by Per Mellqvist for #40
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761384 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 19:17:04 +00:00
Jonathan Ellis a5b14b7219 jsvc actually wants the method to be named init, not load (contrary to what their docs state in at least one place)
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761346 13f79535-47bb-0310-9956-ffa450edef68
2009-04-02 17:07:54 +00:00