cassandra 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +2 -0
- data/README +1 -3
- data/Rakefile +2 -6
- data/cassandra.gemspec +1 -1
- data/conf/storage-conf.xml +22 -12
- data/lib/cassandra/protocol.rb +1 -1
- data/vendor/gen-rb/cassandra.rb +1 -55
- data/vendor/gen-rb/cassandra_types.rb +3 -23
- metadata +1 -1
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG
CHANGED
data/README
CHANGED
@@ -15,8 +15,6 @@ The public certificate for this gem is here[http://rubyforge.org/frs/download.ph
|
|
15
15
|
* compatible UUID and Long classes, for GUID generation
|
16
16
|
* Ruby 1.9 compatibility
|
17
17
|
|
18
|
-
This is an alpha release and may not yet support the full set of Cassandra features.
|
19
|
-
|
20
18
|
The Github source repository is {here}[http://github.com/fauna/cassandra/]. Patches and contributions are very welcome.
|
21
19
|
|
22
20
|
== Installation
|
@@ -25,7 +23,7 @@ You need Ruby 1.8 or 1.9. If you have those, just run:
|
|
25
23
|
|
26
24
|
sudo gem install cassandra
|
27
25
|
|
28
|
-
Cassandra is a rapidly moving target. In order to get a working server, use the <tt>bin/cassandra_helper</tt> script
|
26
|
+
Cassandra itself is a rapidly moving target. In order to get a working server, use the <tt>bin/cassandra_helper</tt> script:
|
29
27
|
|
30
28
|
cassandra_helper cassandra
|
31
29
|
|
data/Rakefile
CHANGED
@@ -16,13 +16,9 @@ unless ENV['FROM_BIN_CASSANDRA_HELPER']
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
REVISION = "
|
19
|
+
REVISION = "007df950fc9e9fad255167db74517095a8326f25"
|
20
20
|
|
21
|
-
PATCHES = [
|
22
|
-
"http://issues.apache.org/jira/secure/attachment/12416014/0001-CASSANDRA-356-rename-clean-up-collectColumns-methods.txt",
|
23
|
-
"http://issues.apache.org/jira/secure/attachment/12416073/0002-v3.patch",
|
24
|
-
"http://issues.apache.org/jira/secure/attachment/12416074/357-v2.patch",
|
25
|
-
"http://issues.apache.org/jira/secure/attachment/12416086/357-3.patch"]
|
21
|
+
PATCHES = []
|
26
22
|
|
27
23
|
CASSANDRA_HOME = "#{ENV['HOME']}/cassandra/r#{REVISION[0, 8]}"
|
28
24
|
|
data/cassandra.gemspec
CHANGED
data/conf/storage-conf.xml
CHANGED
@@ -179,26 +179,36 @@
|
|
179
179
|
<ConcurrentReads>8</ConcurrentReads>
|
180
180
|
<ConcurrentWrites>32</ConcurrentWrites>
|
181
181
|
|
182
|
-
<!--
|
183
|
-
When
|
184
|
-
has been
|
182
|
+
<!-- CommitLogSync may be either "periodic" or "batch."
|
183
|
+
When in batch mode, Cassandra won't ack writes until the commit log
|
184
|
+
has been fsynced to disk. It will wait up to CommitLogSyncBatchWindowInMS
|
185
|
+
milliseconds for other writes, before performing the sync.
|
186
|
+
|
187
|
+
This is less necessary in Cassandra
|
185
188
|
than in traditional databases since replication reduces the
|
186
189
|
odds of losing data from a failure after writing the log
|
187
|
-
entry but before it actually reaches the disk.
|
190
|
+
entry but before it actually reaches the disk. So the other
|
191
|
+
option is "timed," where wirtes may be acked immediately
|
192
|
+
and the CommitLog is simply synced every CommitLogSyncPeriodInMS
|
193
|
+
milliseconds.
|
194
|
+
-->
|
195
|
+
<CommitLogSync>periodic</CommitLogSync>
|
196
|
+
<!-- Interval at which to perform syncs of the CommitLog in periodic
|
197
|
+
mode. Usually the default of 1000ms is fine; increase it
|
198
|
+
only if the CommitLog PendingTasks backlog in jmx shows that
|
199
|
+
you are frequently scheduling a second sync while the first
|
200
|
+
has not yet been processed.
|
188
201
|
-->
|
189
|
-
<
|
202
|
+
<CommitLogSyncPeriodInMS>1000</CommitLogSyncPeriodInMS>
|
190
203
|
<!-- Delay (in microseconds) during which additional commit log
|
191
|
-
entries may be written before fsync. This will increase
|
204
|
+
entries may be written before fsync in batch mode. This will increase
|
192
205
|
latency slightly, but can vastly improve throughput where
|
193
206
|
there are many writers. Set to zero to disable
|
194
207
|
(each entry will be synced individually).
|
195
|
-
Reasonable values range from a minimal
|
196
|
-
if throughput matters more than latency.
|
197
|
-
write latency isn't even that bad by traditional db
|
198
|
-
standards.)
|
208
|
+
Reasonable values range from a minimal 0.1 to 10 or even more
|
209
|
+
if throughput matters more than latency.
|
199
210
|
-->
|
200
|
-
<
|
201
|
-
|
211
|
+
<!-- <CommitLogSyncBatchWindowInMS>1</CommitLogSyncBatchWindowInMS> -->
|
202
212
|
|
203
213
|
<!-- Time to wait before garbage-collection deletion markers.
|
204
214
|
Set this to a large enough value that you are confident
|
data/lib/cassandra/protocol.rb
CHANGED
@@ -63,7 +63,7 @@ class Cassandra
|
|
63
63
|
# FIXME Comparable types in range are not enforced
|
64
64
|
predicate = CassandraThrift::SlicePredicate.new(:slice_range =>
|
65
65
|
CassandraThrift::SliceRange.new(
|
66
|
-
:
|
66
|
+
:reversed => reversed,
|
67
67
|
:count => count,
|
68
68
|
:start => start.to_s,
|
69
69
|
:finish => finish.to_s))
|
data/vendor/gen-rb/cassandra.rb
CHANGED
@@ -12,7 +12,7 @@ require 'cassandra_types'
|
|
12
12
|
class Client
|
13
13
|
include ::Thrift::Client
|
14
14
|
|
15
|
-
def get_slice(keyspace, key, column_parent, predicate, consistency_level)
|
15
|
+
def get_slice(keyspace, key, column_parent, predicate, consistency_level)
|
16
16
|
send_get_slice(keyspace, key, column_parent, predicate, consistency_level)
|
17
17
|
return recv_get_slice()
|
18
18
|
end
|
@@ -188,21 +188,6 @@ require 'cassandra_types'
|
|
188
188
|
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspace failed: unknown result')
|
189
189
|
end
|
190
190
|
|
191
|
-
def execute_query(query)
|
192
|
-
send_execute_query(query)
|
193
|
-
return recv_execute_query()
|
194
|
-
end
|
195
|
-
|
196
|
-
def send_execute_query(query)
|
197
|
-
send_message('execute_query', Execute_query_args, :query => query)
|
198
|
-
end
|
199
|
-
|
200
|
-
def recv_execute_query()
|
201
|
-
result = receive_message(Execute_query_result)
|
202
|
-
return result.success unless result.success.nil?
|
203
|
-
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'execute_query failed: unknown result')
|
204
|
-
end
|
205
|
-
|
206
191
|
end
|
207
192
|
|
208
193
|
class Processor
|
@@ -333,13 +318,6 @@ require 'cassandra_types'
|
|
333
318
|
write_result(result, oprot, 'describe_keyspace', seqid)
|
334
319
|
end
|
335
320
|
|
336
|
-
def process_execute_query(seqid, iprot, oprot)
|
337
|
-
args = read_args(iprot, Execute_query_args)
|
338
|
-
result = Execute_query_result.new()
|
339
|
-
result.success = @handler.execute_query(args.query)
|
340
|
-
write_result(result, oprot, 'execute_query', seqid)
|
341
|
-
end
|
342
|
-
|
343
321
|
end
|
344
322
|
|
345
323
|
# HELPER FUNCTIONS AND STRUCTURES
|
@@ -793,38 +771,6 @@ require 'cassandra_types'
|
|
793
771
|
|
794
772
|
end
|
795
773
|
|
796
|
-
class Execute_query_args
|
797
|
-
include ::Thrift::Struct
|
798
|
-
QUERY = 1
|
799
|
-
|
800
|
-
::Thrift::Struct.field_accessor self, :query
|
801
|
-
FIELDS = {
|
802
|
-
QUERY => {:type => ::Thrift::Types::STRING, :name => 'query'}
|
803
|
-
}
|
804
|
-
|
805
|
-
def struct_fields; FIELDS; end
|
806
|
-
|
807
|
-
def validate
|
808
|
-
end
|
809
|
-
|
810
|
-
end
|
811
|
-
|
812
|
-
class Execute_query_result
|
813
|
-
include ::Thrift::Struct
|
814
|
-
SUCCESS = 0
|
815
|
-
|
816
|
-
::Thrift::Struct.field_accessor self, :success
|
817
|
-
FIELDS = {
|
818
|
-
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => CassandraThrift::CqlResult}
|
819
|
-
}
|
820
|
-
|
821
|
-
def struct_fields; FIELDS; end
|
822
|
-
|
823
|
-
def validate
|
824
|
-
end
|
825
|
-
|
826
|
-
end
|
827
|
-
|
828
774
|
end
|
829
775
|
|
830
776
|
end
|
@@ -89,26 +89,6 @@ module CassandraThrift
|
|
89
89
|
|
90
90
|
end
|
91
91
|
|
92
|
-
class CqlResult
|
93
|
-
include ::Thrift::Struct
|
94
|
-
ERROR_CODE = 1
|
95
|
-
ERROR_TXT = 2
|
96
|
-
RESULT_SET = 3
|
97
|
-
|
98
|
-
::Thrift::Struct.field_accessor self, :error_code, :error_txt, :result_set
|
99
|
-
FIELDS = {
|
100
|
-
ERROR_CODE => {:type => ::Thrift::Types::I32, :name => 'error_code'},
|
101
|
-
ERROR_TXT => {:type => ::Thrift::Types::STRING, :name => 'error_txt'},
|
102
|
-
RESULT_SET => {:type => ::Thrift::Types::LIST, :name => 'result_set', :element => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}}
|
103
|
-
}
|
104
|
-
|
105
|
-
def struct_fields; FIELDS; end
|
106
|
-
|
107
|
-
def validate
|
108
|
-
end
|
109
|
-
|
110
|
-
end
|
111
|
-
|
112
92
|
class NotFoundException < ::Thrift::Exception
|
113
93
|
include ::Thrift::Struct
|
114
94
|
|
@@ -202,14 +182,14 @@ module CassandraThrift
|
|
202
182
|
include ::Thrift::Struct
|
203
183
|
START = 1
|
204
184
|
FINISH = 2
|
205
|
-
|
185
|
+
REVERSED = 3
|
206
186
|
COUNT = 4
|
207
187
|
|
208
|
-
::Thrift::Struct.field_accessor self, :start, :finish, :
|
188
|
+
::Thrift::Struct.field_accessor self, :start, :finish, :reversed, :count
|
209
189
|
FIELDS = {
|
210
190
|
START => {:type => ::Thrift::Types::STRING, :name => 'start'},
|
211
191
|
FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
|
212
|
-
|
192
|
+
REVERSED => {:type => ::Thrift::Types::BOOL, :name => 'reversed', :default => false},
|
213
193
|
COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
|
214
194
|
}
|
215
195
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|