cassandra-mavericks 0.21.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/CHANGELOG +150 -0
- data/Gemfile +7 -0
- data/LICENSE +202 -0
- data/Manifest +94 -0
- data/README.md +373 -0
- data/Rakefile +191 -0
- data/bin/cassandra_helper +16 -0
- data/cassandra.gemspec +29 -0
- data/conf/0.6/cassandra.in.sh +47 -0
- data/conf/0.6/log4j.properties +38 -0
- data/conf/0.6/schema.json +57 -0
- data/conf/0.6/storage-conf.xml +352 -0
- data/conf/0.7/cassandra.in.sh +46 -0
- data/conf/0.7/cassandra.yaml +336 -0
- data/conf/0.7/log4j-server.properties +41 -0
- data/conf/0.7/schema.json +57 -0
- data/conf/0.7/schema.txt +45 -0
- data/conf/0.8/cassandra.in.sh +41 -0
- data/conf/0.8/cassandra.yaml +61 -0
- data/conf/0.8/log4j-server.properties +40 -0
- data/conf/0.8/schema.json +72 -0
- data/conf/0.8/schema.txt +57 -0
- data/conf/1.0/cassandra.in.sh +41 -0
- data/conf/1.0/cassandra.yaml +415 -0
- data/conf/1.0/log4j-server.properties +40 -0
- data/conf/1.0/schema.json +72 -0
- data/conf/1.0/schema.txt +57 -0
- data/conf/1.1/cassandra.in.sh +41 -0
- data/conf/1.1/cassandra.yaml +567 -0
- data/conf/1.1/log4j-server.properties +44 -0
- data/conf/1.1/schema.json +72 -0
- data/conf/1.1/schema.txt +57 -0
- data/conf/1.2/cassandra.in.sh +41 -0
- data/conf/1.2/cassandra.yaml +643 -0
- data/conf/1.2/log4j-server.properties +44 -0
- data/conf/1.2/schema.json +72 -0
- data/conf/1.2/schema.txt +57 -0
- data/ext/cassandra_native.c +69 -0
- data/ext/extconf.rb +9 -0
- data/lib/cassandra.rb +47 -0
- data/lib/cassandra/0.6.rb +7 -0
- data/lib/cassandra/0.6/cassandra.rb +113 -0
- data/lib/cassandra/0.6/columns.rb +78 -0
- data/lib/cassandra/0.6/protocol.rb +91 -0
- data/lib/cassandra/0.7.rb +7 -0
- data/lib/cassandra/0.7/cassandra.rb +2 -0
- data/lib/cassandra/0.7/columns.rb +4 -0
- data/lib/cassandra/0.7/protocol.rb +5 -0
- data/lib/cassandra/0.8.rb +7 -0
- data/lib/cassandra/0.8/cassandra.rb +25 -0
- data/lib/cassandra/0.8/columns.rb +28 -0
- data/lib/cassandra/0.8/protocol.rb +10 -0
- data/lib/cassandra/1.0.rb +7 -0
- data/lib/cassandra/1.0/cassandra.rb +1 -0
- data/lib/cassandra/1.0/columns.rb +1 -0
- data/lib/cassandra/1.0/protocol.rb +1 -0
- data/lib/cassandra/1.1.rb +7 -0
- data/lib/cassandra/1.1/cassandra.rb +1 -0
- data/lib/cassandra/1.1/columns.rb +1 -0
- data/lib/cassandra/1.1/protocol.rb +1 -0
- data/lib/cassandra/1.2.rb +7 -0
- data/lib/cassandra/1.2/cassandra.rb +1 -0
- data/lib/cassandra/1.2/columns.rb +1 -0
- data/lib/cassandra/1.2/protocol.rb +1 -0
- data/lib/cassandra/array.rb +8 -0
- data/lib/cassandra/batch.rb +41 -0
- data/lib/cassandra/cassandra.rb +1091 -0
- data/lib/cassandra/column_family.rb +3 -0
- data/lib/cassandra/columns.rb +172 -0
- data/lib/cassandra/comparable.rb +28 -0
- data/lib/cassandra/composite.rb +137 -0
- data/lib/cassandra/constants.rb +11 -0
- data/lib/cassandra/debug.rb +9 -0
- data/lib/cassandra/dynamic_composite.rb +118 -0
- data/lib/cassandra/helpers.rb +41 -0
- data/lib/cassandra/keyspace.rb +3 -0
- data/lib/cassandra/long.rb +58 -0
- data/lib/cassandra/mock.rb +536 -0
- data/lib/cassandra/ordered_hash.rb +195 -0
- data/lib/cassandra/protocol.rb +137 -0
- data/lib/cassandra/time.rb +11 -0
- data/test/cassandra_client_test.rb +20 -0
- data/test/cassandra_mock_test.rb +128 -0
- data/test/cassandra_test.rb +1367 -0
- data/test/comparable_types_test.rb +45 -0
- data/test/composite_type_test.rb +86 -0
- data/test/eventmachine_test.rb +42 -0
- data/test/ordered_hash_test.rb +386 -0
- data/test/test_helper.rb +19 -0
- data/vendor/0.6/gen-rb/cassandra.rb +1481 -0
- data/vendor/0.6/gen-rb/cassandra_constants.rb +12 -0
- data/vendor/0.6/gen-rb/cassandra_types.rb +482 -0
- data/vendor/0.7/gen-rb/cassandra.rb +1936 -0
- data/vendor/0.7/gen-rb/cassandra_constants.rb +12 -0
- data/vendor/0.7/gen-rb/cassandra_types.rb +681 -0
- data/vendor/0.8/gen-rb/cassandra.rb +2215 -0
- data/vendor/0.8/gen-rb/cassandra_constants.rb +12 -0
- data/vendor/0.8/gen-rb/cassandra_types.rb +824 -0
- data/vendor/1.0/gen-rb/cassandra.rb +2215 -0
- data/vendor/1.0/gen-rb/cassandra_constants.rb +12 -0
- data/vendor/1.0/gen-rb/cassandra_types.rb +857 -0
- data/vendor/1.1/gen-rb/cassandra.rb +2571 -0
- data/vendor/1.1/gen-rb/cassandra_constants.rb +12 -0
- data/vendor/1.1/gen-rb/cassandra_types.rb +928 -0
- data/vendor/1.2/gen-rb/cassandra.rb +3013 -0
- data/vendor/1.2/gen-rb/cassandra_constants.rb +13 -0
- data/vendor/1.2/gen-rb/cassandra_types.rb +965 -0
- metadata +288 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
CASSANDRA_VERSION = ENV['CASSANDRA_VERSION'] || '0.8' unless defined?(CASSANDRA_VERSION)
|
2
|
+
|
3
|
+
require 'test/unit'
|
4
|
+
require "#{File.expand_path(File.dirname(__FILE__))}/../lib/cassandra/#{CASSANDRA_VERSION}"
|
5
|
+
begin; require 'ruby-debug'; rescue LoadError; end
|
6
|
+
|
7
|
+
begin
|
8
|
+
@test_client = Cassandra.new('Twitter', 'localhost:9160', :thrift_client_options => {
|
9
|
+
:retries => 3,
|
10
|
+
:timeout => 5,
|
11
|
+
:connect_timeout => 1
|
12
|
+
})
|
13
|
+
rescue Thrift::TransportException => e
|
14
|
+
#FIXME Make server automatically start if not running
|
15
|
+
if e.message =~ /Could not connect/
|
16
|
+
puts "*** Please start the Cassandra server by running 'rake cassandra'. ***"
|
17
|
+
exit 1
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,1481 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'cassandra_types'
|
9
|
+
require 'cassandra_constants'
|
10
|
+
|
11
|
+
module CassandraThrift
|
12
|
+
module Cassandra
|
13
|
+
class Client
|
14
|
+
include ::Thrift::Client
|
15
|
+
|
16
|
+
def login(keyspace, auth_request)
|
17
|
+
send_login(keyspace, auth_request)
|
18
|
+
recv_login()
|
19
|
+
end
|
20
|
+
|
21
|
+
def send_login(keyspace, auth_request)
|
22
|
+
send_message('login', Login_args, :keyspace => keyspace, :auth_request => auth_request)
|
23
|
+
end
|
24
|
+
|
25
|
+
def recv_login()
|
26
|
+
result = receive_message(Login_result)
|
27
|
+
raise result.authnx unless result.authnx.nil?
|
28
|
+
raise result.authzx unless result.authzx.nil?
|
29
|
+
return
|
30
|
+
end
|
31
|
+
|
32
|
+
def get(keyspace, key, column_path, consistency_level)
|
33
|
+
send_get(keyspace, key, column_path, consistency_level)
|
34
|
+
return recv_get()
|
35
|
+
end
|
36
|
+
|
37
|
+
def send_get(keyspace, key, column_path, consistency_level)
|
38
|
+
send_message('get', Get_args, :keyspace => keyspace, :key => key, :column_path => column_path, :consistency_level => consistency_level)
|
39
|
+
end
|
40
|
+
|
41
|
+
def recv_get()
|
42
|
+
result = receive_message(Get_result)
|
43
|
+
return result.success unless result.success.nil?
|
44
|
+
raise result.ire unless result.ire.nil?
|
45
|
+
raise result.nfe unless result.nfe.nil?
|
46
|
+
raise result.ue unless result.ue.nil?
|
47
|
+
raise result.te unless result.te.nil?
|
48
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get failed: unknown result')
|
49
|
+
end
|
50
|
+
|
51
|
+
def get_slice(keyspace, key, column_parent, predicate, consistency_level)
|
52
|
+
send_get_slice(keyspace, key, column_parent, predicate, consistency_level)
|
53
|
+
return recv_get_slice()
|
54
|
+
end
|
55
|
+
|
56
|
+
def send_get_slice(keyspace, key, column_parent, predicate, consistency_level)
|
57
|
+
send_message('get_slice', Get_slice_args, :keyspace => keyspace, :key => key, :column_parent => column_parent, :predicate => predicate, :consistency_level => consistency_level)
|
58
|
+
end
|
59
|
+
|
60
|
+
def recv_get_slice()
|
61
|
+
result = receive_message(Get_slice_result)
|
62
|
+
return result.success unless result.success.nil?
|
63
|
+
raise result.ire unless result.ire.nil?
|
64
|
+
raise result.ue unless result.ue.nil?
|
65
|
+
raise result.te unless result.te.nil?
|
66
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice failed: unknown result')
|
67
|
+
end
|
68
|
+
|
69
|
+
def multiget(keyspace, keys, column_path, consistency_level)
|
70
|
+
send_multiget(keyspace, keys, column_path, consistency_level)
|
71
|
+
return recv_multiget()
|
72
|
+
end
|
73
|
+
|
74
|
+
def send_multiget(keyspace, keys, column_path, consistency_level)
|
75
|
+
send_message('multiget', Multiget_args, :keyspace => keyspace, :keys => keys, :column_path => column_path, :consistency_level => consistency_level)
|
76
|
+
end
|
77
|
+
|
78
|
+
def recv_multiget()
|
79
|
+
result = receive_message(Multiget_result)
|
80
|
+
return result.success unless result.success.nil?
|
81
|
+
raise result.ire unless result.ire.nil?
|
82
|
+
raise result.ue unless result.ue.nil?
|
83
|
+
raise result.te unless result.te.nil?
|
84
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'multiget failed: unknown result')
|
85
|
+
end
|
86
|
+
|
87
|
+
def multiget_slice(keyspace, keys, column_parent, predicate, consistency_level)
|
88
|
+
send_multiget_slice(keyspace, keys, column_parent, predicate, consistency_level)
|
89
|
+
return recv_multiget_slice()
|
90
|
+
end
|
91
|
+
|
92
|
+
def send_multiget_slice(keyspace, keys, column_parent, predicate, consistency_level)
|
93
|
+
send_message('multiget_slice', Multiget_slice_args, :keyspace => keyspace, :keys => keys, :column_parent => column_parent, :predicate => predicate, :consistency_level => consistency_level)
|
94
|
+
end
|
95
|
+
|
96
|
+
def recv_multiget_slice()
|
97
|
+
result = receive_message(Multiget_slice_result)
|
98
|
+
return result.success unless result.success.nil?
|
99
|
+
raise result.ire unless result.ire.nil?
|
100
|
+
raise result.ue unless result.ue.nil?
|
101
|
+
raise result.te unless result.te.nil?
|
102
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'multiget_slice failed: unknown result')
|
103
|
+
end
|
104
|
+
|
105
|
+
def get_count(keyspace, key, column_parent, consistency_level)
|
106
|
+
send_get_count(keyspace, key, column_parent, consistency_level)
|
107
|
+
return recv_get_count()
|
108
|
+
end
|
109
|
+
|
110
|
+
def send_get_count(keyspace, key, column_parent, consistency_level)
|
111
|
+
send_message('get_count', Get_count_args, :keyspace => keyspace, :key => key, :column_parent => column_parent, :consistency_level => consistency_level)
|
112
|
+
end
|
113
|
+
|
114
|
+
def recv_get_count()
|
115
|
+
result = receive_message(Get_count_result)
|
116
|
+
return result.success unless result.success.nil?
|
117
|
+
raise result.ire unless result.ire.nil?
|
118
|
+
raise result.ue unless result.ue.nil?
|
119
|
+
raise result.te unless result.te.nil?
|
120
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_count failed: unknown result')
|
121
|
+
end
|
122
|
+
|
123
|
+
def get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
|
124
|
+
send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
|
125
|
+
return recv_get_range_slice()
|
126
|
+
end
|
127
|
+
|
128
|
+
def send_get_range_slice(keyspace, column_parent, predicate, start_key, finish_key, row_count, consistency_level)
|
129
|
+
send_message('get_range_slice', Get_range_slice_args, :keyspace => keyspace, :column_parent => column_parent, :predicate => predicate, :start_key => start_key, :finish_key => finish_key, :row_count => row_count, :consistency_level => consistency_level)
|
130
|
+
end
|
131
|
+
|
132
|
+
def recv_get_range_slice()
|
133
|
+
result = receive_message(Get_range_slice_result)
|
134
|
+
return result.success unless result.success.nil?
|
135
|
+
raise result.ire unless result.ire.nil?
|
136
|
+
raise result.ue unless result.ue.nil?
|
137
|
+
raise result.te unless result.te.nil?
|
138
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_slice failed: unknown result')
|
139
|
+
end
|
140
|
+
|
141
|
+
def get_range_slices(keyspace, column_parent, predicate, range, consistency_level)
|
142
|
+
send_get_range_slices(keyspace, column_parent, predicate, range, consistency_level)
|
143
|
+
return recv_get_range_slices()
|
144
|
+
end
|
145
|
+
|
146
|
+
def send_get_range_slices(keyspace, column_parent, predicate, range, consistency_level)
|
147
|
+
send_message('get_range_slices', Get_range_slices_args, :keyspace => keyspace, :column_parent => column_parent, :predicate => predicate, :range => range, :consistency_level => consistency_level)
|
148
|
+
end
|
149
|
+
|
150
|
+
def recv_get_range_slices()
|
151
|
+
result = receive_message(Get_range_slices_result)
|
152
|
+
return result.success unless result.success.nil?
|
153
|
+
raise result.ire unless result.ire.nil?
|
154
|
+
raise result.ue unless result.ue.nil?
|
155
|
+
raise result.te unless result.te.nil?
|
156
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_range_slices failed: unknown result')
|
157
|
+
end
|
158
|
+
|
159
|
+
def insert(keyspace, key, column_path, value, timestamp, consistency_level)
|
160
|
+
send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
|
161
|
+
recv_insert()
|
162
|
+
end
|
163
|
+
|
164
|
+
def send_insert(keyspace, key, column_path, value, timestamp, consistency_level)
|
165
|
+
send_message('insert', Insert_args, :keyspace => keyspace, :key => key, :column_path => column_path, :value => value, :timestamp => timestamp, :consistency_level => consistency_level)
|
166
|
+
end
|
167
|
+
|
168
|
+
def recv_insert()
|
169
|
+
result = receive_message(Insert_result)
|
170
|
+
raise result.ire unless result.ire.nil?
|
171
|
+
raise result.ue unless result.ue.nil?
|
172
|
+
raise result.te unless result.te.nil?
|
173
|
+
return
|
174
|
+
end
|
175
|
+
|
176
|
+
def batch_insert(keyspace, key, cfmap, consistency_level)
|
177
|
+
send_batch_insert(keyspace, key, cfmap, consistency_level)
|
178
|
+
recv_batch_insert()
|
179
|
+
end
|
180
|
+
|
181
|
+
def send_batch_insert(keyspace, key, cfmap, consistency_level)
|
182
|
+
send_message('batch_insert', Batch_insert_args, :keyspace => keyspace, :key => key, :cfmap => cfmap, :consistency_level => consistency_level)
|
183
|
+
end
|
184
|
+
|
185
|
+
def recv_batch_insert()
|
186
|
+
result = receive_message(Batch_insert_result)
|
187
|
+
raise result.ire unless result.ire.nil?
|
188
|
+
raise result.ue unless result.ue.nil?
|
189
|
+
raise result.te unless result.te.nil?
|
190
|
+
return
|
191
|
+
end
|
192
|
+
|
193
|
+
def remove(keyspace, key, column_path, timestamp, consistency_level)
|
194
|
+
send_remove(keyspace, key, column_path, timestamp, consistency_level)
|
195
|
+
recv_remove()
|
196
|
+
end
|
197
|
+
|
198
|
+
def send_remove(keyspace, key, column_path, timestamp, consistency_level)
|
199
|
+
send_message('remove', Remove_args, :keyspace => keyspace, :key => key, :column_path => column_path, :timestamp => timestamp, :consistency_level => consistency_level)
|
200
|
+
end
|
201
|
+
|
202
|
+
def recv_remove()
|
203
|
+
result = receive_message(Remove_result)
|
204
|
+
raise result.ire unless result.ire.nil?
|
205
|
+
raise result.ue unless result.ue.nil?
|
206
|
+
raise result.te unless result.te.nil?
|
207
|
+
return
|
208
|
+
end
|
209
|
+
|
210
|
+
def batch_mutate(keyspace, mutation_map, consistency_level)
|
211
|
+
send_batch_mutate(keyspace, mutation_map, consistency_level)
|
212
|
+
recv_batch_mutate()
|
213
|
+
end
|
214
|
+
|
215
|
+
def send_batch_mutate(keyspace, mutation_map, consistency_level)
|
216
|
+
send_message('batch_mutate', Batch_mutate_args, :keyspace => keyspace, :mutation_map => mutation_map, :consistency_level => consistency_level)
|
217
|
+
end
|
218
|
+
|
219
|
+
def recv_batch_mutate()
|
220
|
+
result = receive_message(Batch_mutate_result)
|
221
|
+
raise result.ire unless result.ire.nil?
|
222
|
+
raise result.ue unless result.ue.nil?
|
223
|
+
raise result.te unless result.te.nil?
|
224
|
+
return
|
225
|
+
end
|
226
|
+
|
227
|
+
def get_string_property(property)
|
228
|
+
send_get_string_property(property)
|
229
|
+
return recv_get_string_property()
|
230
|
+
end
|
231
|
+
|
232
|
+
def send_get_string_property(property)
|
233
|
+
send_message('get_string_property', Get_string_property_args, :property => property)
|
234
|
+
end
|
235
|
+
|
236
|
+
def recv_get_string_property()
|
237
|
+
result = receive_message(Get_string_property_result)
|
238
|
+
return result.success unless result.success.nil?
|
239
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_string_property failed: unknown result')
|
240
|
+
end
|
241
|
+
|
242
|
+
def get_string_list_property(property)
|
243
|
+
send_get_string_list_property(property)
|
244
|
+
return recv_get_string_list_property()
|
245
|
+
end
|
246
|
+
|
247
|
+
def send_get_string_list_property(property)
|
248
|
+
send_message('get_string_list_property', Get_string_list_property_args, :property => property)
|
249
|
+
end
|
250
|
+
|
251
|
+
def recv_get_string_list_property()
|
252
|
+
result = receive_message(Get_string_list_property_result)
|
253
|
+
return result.success unless result.success.nil?
|
254
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_string_list_property failed: unknown result')
|
255
|
+
end
|
256
|
+
|
257
|
+
def describe_keyspaces()
|
258
|
+
send_describe_keyspaces()
|
259
|
+
return recv_describe_keyspaces()
|
260
|
+
end
|
261
|
+
|
262
|
+
def send_describe_keyspaces()
|
263
|
+
send_message('describe_keyspaces', Describe_keyspaces_args)
|
264
|
+
end
|
265
|
+
|
266
|
+
def recv_describe_keyspaces()
|
267
|
+
result = receive_message(Describe_keyspaces_result)
|
268
|
+
return result.success unless result.success.nil?
|
269
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspaces failed: unknown result')
|
270
|
+
end
|
271
|
+
|
272
|
+
def describe_cluster_name()
|
273
|
+
send_describe_cluster_name()
|
274
|
+
return recv_describe_cluster_name()
|
275
|
+
end
|
276
|
+
|
277
|
+
def send_describe_cluster_name()
|
278
|
+
send_message('describe_cluster_name', Describe_cluster_name_args)
|
279
|
+
end
|
280
|
+
|
281
|
+
def recv_describe_cluster_name()
|
282
|
+
result = receive_message(Describe_cluster_name_result)
|
283
|
+
return result.success unless result.success.nil?
|
284
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_cluster_name failed: unknown result')
|
285
|
+
end
|
286
|
+
|
287
|
+
def describe_version()
|
288
|
+
send_describe_version()
|
289
|
+
return recv_describe_version()
|
290
|
+
end
|
291
|
+
|
292
|
+
def send_describe_version()
|
293
|
+
send_message('describe_version', Describe_version_args)
|
294
|
+
end
|
295
|
+
|
296
|
+
def recv_describe_version()
|
297
|
+
result = receive_message(Describe_version_result)
|
298
|
+
return result.success unless result.success.nil?
|
299
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_version failed: unknown result')
|
300
|
+
end
|
301
|
+
|
302
|
+
def describe_ring(keyspace)
|
303
|
+
send_describe_ring(keyspace)
|
304
|
+
return recv_describe_ring()
|
305
|
+
end
|
306
|
+
|
307
|
+
def send_describe_ring(keyspace)
|
308
|
+
send_message('describe_ring', Describe_ring_args, :keyspace => keyspace)
|
309
|
+
end
|
310
|
+
|
311
|
+
def recv_describe_ring()
|
312
|
+
result = receive_message(Describe_ring_result)
|
313
|
+
return result.success unless result.success.nil?
|
314
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_ring failed: unknown result')
|
315
|
+
end
|
316
|
+
|
317
|
+
def describe_keyspace(keyspace)
|
318
|
+
send_describe_keyspace(keyspace)
|
319
|
+
return recv_describe_keyspace()
|
320
|
+
end
|
321
|
+
|
322
|
+
def send_describe_keyspace(keyspace)
|
323
|
+
send_message('describe_keyspace', Describe_keyspace_args, :keyspace => keyspace)
|
324
|
+
end
|
325
|
+
|
326
|
+
def recv_describe_keyspace()
|
327
|
+
result = receive_message(Describe_keyspace_result)
|
328
|
+
return result.success unless result.success.nil?
|
329
|
+
raise result.nfe unless result.nfe.nil?
|
330
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_keyspace failed: unknown result')
|
331
|
+
end
|
332
|
+
|
333
|
+
def describe_splits(start_token, end_token, keys_per_split)
|
334
|
+
send_describe_splits(start_token, end_token, keys_per_split)
|
335
|
+
return recv_describe_splits()
|
336
|
+
end
|
337
|
+
|
338
|
+
def send_describe_splits(start_token, end_token, keys_per_split)
|
339
|
+
send_message('describe_splits', Describe_splits_args, :start_token => start_token, :end_token => end_token, :keys_per_split => keys_per_split)
|
340
|
+
end
|
341
|
+
|
342
|
+
def recv_describe_splits()
|
343
|
+
result = receive_message(Describe_splits_result)
|
344
|
+
return result.success unless result.success.nil?
|
345
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'describe_splits failed: unknown result')
|
346
|
+
end
|
347
|
+
|
348
|
+
end
|
349
|
+
|
350
|
+
class Processor
|
351
|
+
include ::Thrift::Processor
|
352
|
+
|
353
|
+
def process_login(seqid, iprot, oprot)
|
354
|
+
args = read_args(iprot, Login_args)
|
355
|
+
result = Login_result.new()
|
356
|
+
begin
|
357
|
+
@handler.login(args.keyspace, args.auth_request)
|
358
|
+
rescue CassandraThrift::AuthenticationException => authnx
|
359
|
+
result.authnx = authnx
|
360
|
+
rescue CassandraThrift::AuthorizationException => authzx
|
361
|
+
result.authzx = authzx
|
362
|
+
end
|
363
|
+
write_result(result, oprot, 'login', seqid)
|
364
|
+
end
|
365
|
+
|
366
|
+
def process_get(seqid, iprot, oprot)
|
367
|
+
args = read_args(iprot, Get_args)
|
368
|
+
result = Get_result.new()
|
369
|
+
begin
|
370
|
+
result.success = @handler.get(args.keyspace, args.key, args.column_path, args.consistency_level)
|
371
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
372
|
+
result.ire = ire
|
373
|
+
rescue CassandraThrift::NotFoundException => nfe
|
374
|
+
result.nfe = nfe
|
375
|
+
rescue CassandraThrift::UnavailableException => ue
|
376
|
+
result.ue = ue
|
377
|
+
rescue CassandraThrift::TimedOutException => te
|
378
|
+
result.te = te
|
379
|
+
end
|
380
|
+
write_result(result, oprot, 'get', seqid)
|
381
|
+
end
|
382
|
+
|
383
|
+
def process_get_slice(seqid, iprot, oprot)
|
384
|
+
args = read_args(iprot, Get_slice_args)
|
385
|
+
result = Get_slice_result.new()
|
386
|
+
begin
|
387
|
+
result.success = @handler.get_slice(args.keyspace, args.key, args.column_parent, args.predicate, args.consistency_level)
|
388
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
389
|
+
result.ire = ire
|
390
|
+
rescue CassandraThrift::UnavailableException => ue
|
391
|
+
result.ue = ue
|
392
|
+
rescue CassandraThrift::TimedOutException => te
|
393
|
+
result.te = te
|
394
|
+
end
|
395
|
+
write_result(result, oprot, 'get_slice', seqid)
|
396
|
+
end
|
397
|
+
|
398
|
+
def process_multiget(seqid, iprot, oprot)
|
399
|
+
args = read_args(iprot, Multiget_args)
|
400
|
+
result = Multiget_result.new()
|
401
|
+
begin
|
402
|
+
result.success = @handler.multiget(args.keyspace, args.keys, args.column_path, args.consistency_level)
|
403
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
404
|
+
result.ire = ire
|
405
|
+
rescue CassandraThrift::UnavailableException => ue
|
406
|
+
result.ue = ue
|
407
|
+
rescue CassandraThrift::TimedOutException => te
|
408
|
+
result.te = te
|
409
|
+
end
|
410
|
+
write_result(result, oprot, 'multiget', seqid)
|
411
|
+
end
|
412
|
+
|
413
|
+
def process_multiget_slice(seqid, iprot, oprot)
|
414
|
+
args = read_args(iprot, Multiget_slice_args)
|
415
|
+
result = Multiget_slice_result.new()
|
416
|
+
begin
|
417
|
+
result.success = @handler.multiget_slice(args.keyspace, args.keys, args.column_parent, args.predicate, args.consistency_level)
|
418
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
419
|
+
result.ire = ire
|
420
|
+
rescue CassandraThrift::UnavailableException => ue
|
421
|
+
result.ue = ue
|
422
|
+
rescue CassandraThrift::TimedOutException => te
|
423
|
+
result.te = te
|
424
|
+
end
|
425
|
+
write_result(result, oprot, 'multiget_slice', seqid)
|
426
|
+
end
|
427
|
+
|
428
|
+
def process_get_count(seqid, iprot, oprot)
|
429
|
+
args = read_args(iprot, Get_count_args)
|
430
|
+
result = Get_count_result.new()
|
431
|
+
begin
|
432
|
+
result.success = @handler.get_count(args.keyspace, args.key, args.column_parent, args.consistency_level)
|
433
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
434
|
+
result.ire = ire
|
435
|
+
rescue CassandraThrift::UnavailableException => ue
|
436
|
+
result.ue = ue
|
437
|
+
rescue CassandraThrift::TimedOutException => te
|
438
|
+
result.te = te
|
439
|
+
end
|
440
|
+
write_result(result, oprot, 'get_count', seqid)
|
441
|
+
end
|
442
|
+
|
443
|
+
def process_get_range_slice(seqid, iprot, oprot)
|
444
|
+
args = read_args(iprot, Get_range_slice_args)
|
445
|
+
result = Get_range_slice_result.new()
|
446
|
+
begin
|
447
|
+
result.success = @handler.get_range_slice(args.keyspace, args.column_parent, args.predicate, args.start_key, args.finish_key, args.row_count, args.consistency_level)
|
448
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
449
|
+
result.ire = ire
|
450
|
+
rescue CassandraThrift::UnavailableException => ue
|
451
|
+
result.ue = ue
|
452
|
+
rescue CassandraThrift::TimedOutException => te
|
453
|
+
result.te = te
|
454
|
+
end
|
455
|
+
write_result(result, oprot, 'get_range_slice', seqid)
|
456
|
+
end
|
457
|
+
|
458
|
+
def process_get_range_slices(seqid, iprot, oprot)
|
459
|
+
args = read_args(iprot, Get_range_slices_args)
|
460
|
+
result = Get_range_slices_result.new()
|
461
|
+
begin
|
462
|
+
result.success = @handler.get_range_slices(args.keyspace, args.column_parent, args.predicate, args.range, args.consistency_level)
|
463
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
464
|
+
result.ire = ire
|
465
|
+
rescue CassandraThrift::UnavailableException => ue
|
466
|
+
result.ue = ue
|
467
|
+
rescue CassandraThrift::TimedOutException => te
|
468
|
+
result.te = te
|
469
|
+
end
|
470
|
+
write_result(result, oprot, 'get_range_slices', seqid)
|
471
|
+
end
|
472
|
+
|
473
|
+
def process_insert(seqid, iprot, oprot)
|
474
|
+
args = read_args(iprot, Insert_args)
|
475
|
+
result = Insert_result.new()
|
476
|
+
begin
|
477
|
+
@handler.insert(args.keyspace, args.key, args.column_path, args.value, args.timestamp, args.consistency_level)
|
478
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
479
|
+
result.ire = ire
|
480
|
+
rescue CassandraThrift::UnavailableException => ue
|
481
|
+
result.ue = ue
|
482
|
+
rescue CassandraThrift::TimedOutException => te
|
483
|
+
result.te = te
|
484
|
+
end
|
485
|
+
write_result(result, oprot, 'insert', seqid)
|
486
|
+
end
|
487
|
+
|
488
|
+
def process_batch_insert(seqid, iprot, oprot)
|
489
|
+
args = read_args(iprot, Batch_insert_args)
|
490
|
+
result = Batch_insert_result.new()
|
491
|
+
begin
|
492
|
+
@handler.batch_insert(args.keyspace, args.key, args.cfmap, args.consistency_level)
|
493
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
494
|
+
result.ire = ire
|
495
|
+
rescue CassandraThrift::UnavailableException => ue
|
496
|
+
result.ue = ue
|
497
|
+
rescue CassandraThrift::TimedOutException => te
|
498
|
+
result.te = te
|
499
|
+
end
|
500
|
+
write_result(result, oprot, 'batch_insert', seqid)
|
501
|
+
end
|
502
|
+
|
503
|
+
def process_remove(seqid, iprot, oprot)
|
504
|
+
args = read_args(iprot, Remove_args)
|
505
|
+
result = Remove_result.new()
|
506
|
+
begin
|
507
|
+
@handler.remove(args.keyspace, args.key, args.column_path, args.timestamp, args.consistency_level)
|
508
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
509
|
+
result.ire = ire
|
510
|
+
rescue CassandraThrift::UnavailableException => ue
|
511
|
+
result.ue = ue
|
512
|
+
rescue CassandraThrift::TimedOutException => te
|
513
|
+
result.te = te
|
514
|
+
end
|
515
|
+
write_result(result, oprot, 'remove', seqid)
|
516
|
+
end
|
517
|
+
|
518
|
+
def process_batch_mutate(seqid, iprot, oprot)
|
519
|
+
args = read_args(iprot, Batch_mutate_args)
|
520
|
+
result = Batch_mutate_result.new()
|
521
|
+
begin
|
522
|
+
@handler.batch_mutate(args.keyspace, args.mutation_map, args.consistency_level)
|
523
|
+
rescue CassandraThrift::InvalidRequestException => ire
|
524
|
+
result.ire = ire
|
525
|
+
rescue CassandraThrift::UnavailableException => ue
|
526
|
+
result.ue = ue
|
527
|
+
rescue CassandraThrift::TimedOutException => te
|
528
|
+
result.te = te
|
529
|
+
end
|
530
|
+
write_result(result, oprot, 'batch_mutate', seqid)
|
531
|
+
end
|
532
|
+
|
533
|
+
def process_get_string_property(seqid, iprot, oprot)
|
534
|
+
args = read_args(iprot, Get_string_property_args)
|
535
|
+
result = Get_string_property_result.new()
|
536
|
+
result.success = @handler.get_string_property(args.property)
|
537
|
+
write_result(result, oprot, 'get_string_property', seqid)
|
538
|
+
end
|
539
|
+
|
540
|
+
def process_get_string_list_property(seqid, iprot, oprot)
|
541
|
+
args = read_args(iprot, Get_string_list_property_args)
|
542
|
+
result = Get_string_list_property_result.new()
|
543
|
+
result.success = @handler.get_string_list_property(args.property)
|
544
|
+
write_result(result, oprot, 'get_string_list_property', seqid)
|
545
|
+
end
|
546
|
+
|
547
|
+
def process_describe_keyspaces(seqid, iprot, oprot)
|
548
|
+
args = read_args(iprot, Describe_keyspaces_args)
|
549
|
+
result = Describe_keyspaces_result.new()
|
550
|
+
result.success = @handler.describe_keyspaces()
|
551
|
+
write_result(result, oprot, 'describe_keyspaces', seqid)
|
552
|
+
end
|
553
|
+
|
554
|
+
def process_describe_cluster_name(seqid, iprot, oprot)
|
555
|
+
args = read_args(iprot, Describe_cluster_name_args)
|
556
|
+
result = Describe_cluster_name_result.new()
|
557
|
+
result.success = @handler.describe_cluster_name()
|
558
|
+
write_result(result, oprot, 'describe_cluster_name', seqid)
|
559
|
+
end
|
560
|
+
|
561
|
+
def process_describe_version(seqid, iprot, oprot)
|
562
|
+
args = read_args(iprot, Describe_version_args)
|
563
|
+
result = Describe_version_result.new()
|
564
|
+
result.success = @handler.describe_version()
|
565
|
+
write_result(result, oprot, 'describe_version', seqid)
|
566
|
+
end
|
567
|
+
|
568
|
+
def process_describe_ring(seqid, iprot, oprot)
|
569
|
+
args = read_args(iprot, Describe_ring_args)
|
570
|
+
result = Describe_ring_result.new()
|
571
|
+
result.success = @handler.describe_ring(args.keyspace)
|
572
|
+
write_result(result, oprot, 'describe_ring', seqid)
|
573
|
+
end
|
574
|
+
|
575
|
+
def process_describe_keyspace(seqid, iprot, oprot)
|
576
|
+
args = read_args(iprot, Describe_keyspace_args)
|
577
|
+
result = Describe_keyspace_result.new()
|
578
|
+
begin
|
579
|
+
result.success = @handler.describe_keyspace(args.keyspace)
|
580
|
+
rescue CassandraThrift::NotFoundException => nfe
|
581
|
+
result.nfe = nfe
|
582
|
+
end
|
583
|
+
write_result(result, oprot, 'describe_keyspace', seqid)
|
584
|
+
end
|
585
|
+
|
586
|
+
def process_describe_splits(seqid, iprot, oprot)
|
587
|
+
args = read_args(iprot, Describe_splits_args)
|
588
|
+
result = Describe_splits_result.new()
|
589
|
+
result.success = @handler.describe_splits(args.start_token, args.end_token, args.keys_per_split)
|
590
|
+
write_result(result, oprot, 'describe_splits', seqid)
|
591
|
+
end
|
592
|
+
|
593
|
+
end
|
594
|
+
|
595
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
596
|
+
|
597
|
+
class Login_args
|
598
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
599
|
+
KEYSPACE = 1
|
600
|
+
AUTH_REQUEST = 2
|
601
|
+
|
602
|
+
FIELDS = {
|
603
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
604
|
+
AUTH_REQUEST => {:type => ::Thrift::Types::STRUCT, :name => 'auth_request', :class => CassandraThrift::AuthenticationRequest}
|
605
|
+
}
|
606
|
+
|
607
|
+
def struct_fields; FIELDS; end
|
608
|
+
|
609
|
+
def validate
|
610
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
611
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field auth_request is unset!') unless @auth_request
|
612
|
+
end
|
613
|
+
|
614
|
+
::Thrift::Struct.generate_accessors self
|
615
|
+
end
|
616
|
+
|
617
|
+
class Login_result
|
618
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
619
|
+
AUTHNX = 1
|
620
|
+
AUTHZX = 2
|
621
|
+
|
622
|
+
FIELDS = {
|
623
|
+
AUTHNX => {:type => ::Thrift::Types::STRUCT, :name => 'authnx', :class => CassandraThrift::AuthenticationException},
|
624
|
+
AUTHZX => {:type => ::Thrift::Types::STRUCT, :name => 'authzx', :class => CassandraThrift::AuthorizationException}
|
625
|
+
}
|
626
|
+
|
627
|
+
def struct_fields; FIELDS; end
|
628
|
+
|
629
|
+
def validate
|
630
|
+
end
|
631
|
+
|
632
|
+
::Thrift::Struct.generate_accessors self
|
633
|
+
end
|
634
|
+
|
635
|
+
class Get_args
|
636
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
637
|
+
KEYSPACE = 1
|
638
|
+
KEY = 2
|
639
|
+
COLUMN_PATH = 3
|
640
|
+
CONSISTENCY_LEVEL = 4
|
641
|
+
|
642
|
+
FIELDS = {
|
643
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
644
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
645
|
+
COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => CassandraThrift::ColumnPath},
|
646
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
647
|
+
}
|
648
|
+
|
649
|
+
def struct_fields; FIELDS; end
|
650
|
+
|
651
|
+
def validate
|
652
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
653
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
654
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
|
655
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
656
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
657
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
658
|
+
end
|
659
|
+
end
|
660
|
+
|
661
|
+
::Thrift::Struct.generate_accessors self
|
662
|
+
end
|
663
|
+
|
664
|
+
class Get_result
|
665
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
666
|
+
SUCCESS = 0
|
667
|
+
IRE = 1
|
668
|
+
NFE = 2
|
669
|
+
UE = 3
|
670
|
+
TE = 4
|
671
|
+
|
672
|
+
FIELDS = {
|
673
|
+
SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => CassandraThrift::ColumnOrSuperColumn},
|
674
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
675
|
+
NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => CassandraThrift::NotFoundException},
|
676
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
677
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
678
|
+
}
|
679
|
+
|
680
|
+
def struct_fields; FIELDS; end
|
681
|
+
|
682
|
+
def validate
|
683
|
+
end
|
684
|
+
|
685
|
+
::Thrift::Struct.generate_accessors self
|
686
|
+
end
|
687
|
+
|
688
|
+
class Get_slice_args
|
689
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
690
|
+
KEYSPACE = 1
|
691
|
+
KEY = 2
|
692
|
+
COLUMN_PARENT = 3
|
693
|
+
PREDICATE = 4
|
694
|
+
CONSISTENCY_LEVEL = 5
|
695
|
+
|
696
|
+
FIELDS = {
|
697
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
698
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
699
|
+
COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
|
700
|
+
PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
|
701
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
702
|
+
}
|
703
|
+
|
704
|
+
def struct_fields; FIELDS; end
|
705
|
+
|
706
|
+
def validate
|
707
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
708
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
709
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
|
710
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
|
711
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
712
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
713
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
714
|
+
end
|
715
|
+
end
|
716
|
+
|
717
|
+
::Thrift::Struct.generate_accessors self
|
718
|
+
end
|
719
|
+
|
720
|
+
class Get_slice_result
|
721
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
722
|
+
SUCCESS = 0
|
723
|
+
IRE = 1
|
724
|
+
UE = 2
|
725
|
+
TE = 3
|
726
|
+
|
727
|
+
FIELDS = {
|
728
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}},
|
729
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
730
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
731
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
732
|
+
}
|
733
|
+
|
734
|
+
def struct_fields; FIELDS; end
|
735
|
+
|
736
|
+
def validate
|
737
|
+
end
|
738
|
+
|
739
|
+
::Thrift::Struct.generate_accessors self
|
740
|
+
end
|
741
|
+
|
742
|
+
class Multiget_args
|
743
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
744
|
+
KEYSPACE = 1
|
745
|
+
KEYS = 2
|
746
|
+
COLUMN_PATH = 3
|
747
|
+
CONSISTENCY_LEVEL = 4
|
748
|
+
|
749
|
+
FIELDS = {
|
750
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
751
|
+
KEYS => {:type => ::Thrift::Types::LIST, :name => 'keys', :element => {:type => ::Thrift::Types::STRING}},
|
752
|
+
COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => CassandraThrift::ColumnPath},
|
753
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
754
|
+
}
|
755
|
+
|
756
|
+
def struct_fields; FIELDS; end
|
757
|
+
|
758
|
+
def validate
|
759
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
760
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys is unset!') unless @keys
|
761
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
|
762
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
763
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
764
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
765
|
+
end
|
766
|
+
end
|
767
|
+
|
768
|
+
::Thrift::Struct.generate_accessors self
|
769
|
+
end
|
770
|
+
|
771
|
+
class Multiget_result
|
772
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
773
|
+
SUCCESS = 0
|
774
|
+
IRE = 1
|
775
|
+
UE = 2
|
776
|
+
TE = 3
|
777
|
+
|
778
|
+
FIELDS = {
|
779
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}},
|
780
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
781
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
782
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
783
|
+
}
|
784
|
+
|
785
|
+
def struct_fields; FIELDS; end
|
786
|
+
|
787
|
+
def validate
|
788
|
+
end
|
789
|
+
|
790
|
+
::Thrift::Struct.generate_accessors self
|
791
|
+
end
|
792
|
+
|
793
|
+
class Multiget_slice_args
|
794
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
795
|
+
KEYSPACE = 1
|
796
|
+
KEYS = 2
|
797
|
+
COLUMN_PARENT = 3
|
798
|
+
PREDICATE = 4
|
799
|
+
CONSISTENCY_LEVEL = 5
|
800
|
+
|
801
|
+
FIELDS = {
|
802
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
803
|
+
KEYS => {:type => ::Thrift::Types::LIST, :name => 'keys', :element => {:type => ::Thrift::Types::STRING}},
|
804
|
+
COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
|
805
|
+
PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
|
806
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
807
|
+
}
|
808
|
+
|
809
|
+
def struct_fields; FIELDS; end
|
810
|
+
|
811
|
+
def validate
|
812
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
813
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys is unset!') unless @keys
|
814
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
|
815
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
|
816
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
817
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
818
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
819
|
+
end
|
820
|
+
end
|
821
|
+
|
822
|
+
::Thrift::Struct.generate_accessors self
|
823
|
+
end
|
824
|
+
|
825
|
+
class Multiget_slice_result
|
826
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
827
|
+
SUCCESS = 0
|
828
|
+
IRE = 1
|
829
|
+
UE = 2
|
830
|
+
TE = 3
|
831
|
+
|
832
|
+
FIELDS = {
|
833
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}}},
|
834
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
835
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
836
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
837
|
+
}
|
838
|
+
|
839
|
+
def struct_fields; FIELDS; end
|
840
|
+
|
841
|
+
def validate
|
842
|
+
end
|
843
|
+
|
844
|
+
::Thrift::Struct.generate_accessors self
|
845
|
+
end
|
846
|
+
|
847
|
+
class Get_count_args
|
848
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
849
|
+
KEYSPACE = 1
|
850
|
+
KEY = 2
|
851
|
+
COLUMN_PARENT = 3
|
852
|
+
CONSISTENCY_LEVEL = 4
|
853
|
+
|
854
|
+
FIELDS = {
|
855
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
856
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
857
|
+
COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
|
858
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
859
|
+
}
|
860
|
+
|
861
|
+
def struct_fields; FIELDS; end
|
862
|
+
|
863
|
+
def validate
|
864
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
865
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
866
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
|
867
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
868
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
869
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
870
|
+
end
|
871
|
+
end
|
872
|
+
|
873
|
+
::Thrift::Struct.generate_accessors self
|
874
|
+
end
|
875
|
+
|
876
|
+
class Get_count_result
|
877
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
878
|
+
SUCCESS = 0
|
879
|
+
IRE = 1
|
880
|
+
UE = 2
|
881
|
+
TE = 3
|
882
|
+
|
883
|
+
FIELDS = {
|
884
|
+
SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success'},
|
885
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
886
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
887
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
888
|
+
}
|
889
|
+
|
890
|
+
def struct_fields; FIELDS; end
|
891
|
+
|
892
|
+
def validate
|
893
|
+
end
|
894
|
+
|
895
|
+
::Thrift::Struct.generate_accessors self
|
896
|
+
end
|
897
|
+
|
898
|
+
class Get_range_slice_args
|
899
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
900
|
+
KEYSPACE = 1
|
901
|
+
COLUMN_PARENT = 2
|
902
|
+
PREDICATE = 3
|
903
|
+
START_KEY = 4
|
904
|
+
FINISH_KEY = 5
|
905
|
+
ROW_COUNT = 6
|
906
|
+
CONSISTENCY_LEVEL = 7
|
907
|
+
|
908
|
+
FIELDS = {
|
909
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
910
|
+
COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
|
911
|
+
PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
|
912
|
+
START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :default => %q""},
|
913
|
+
FINISH_KEY => {:type => ::Thrift::Types::STRING, :name => 'finish_key', :default => %q""},
|
914
|
+
ROW_COUNT => {:type => ::Thrift::Types::I32, :name => 'row_count', :default => 100},
|
915
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
916
|
+
}
|
917
|
+
|
918
|
+
def struct_fields; FIELDS; end
|
919
|
+
|
920
|
+
def validate
|
921
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
922
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
|
923
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
|
924
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_key is unset!') unless @start_key
|
925
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field finish_key is unset!') unless @finish_key
|
926
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row_count is unset!') unless @row_count
|
927
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
928
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
929
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
930
|
+
end
|
931
|
+
end
|
932
|
+
|
933
|
+
::Thrift::Struct.generate_accessors self
|
934
|
+
end
|
935
|
+
|
936
|
+
class Get_range_slice_result
|
937
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
938
|
+
SUCCESS = 0
|
939
|
+
IRE = 1
|
940
|
+
UE = 2
|
941
|
+
TE = 3
|
942
|
+
|
943
|
+
FIELDS = {
|
944
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::KeySlice}},
|
945
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
946
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
947
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
948
|
+
}
|
949
|
+
|
950
|
+
def struct_fields; FIELDS; end
|
951
|
+
|
952
|
+
def validate
|
953
|
+
end
|
954
|
+
|
955
|
+
::Thrift::Struct.generate_accessors self
|
956
|
+
end
|
957
|
+
|
958
|
+
class Get_range_slices_args
|
959
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
960
|
+
KEYSPACE = 1
|
961
|
+
COLUMN_PARENT = 2
|
962
|
+
PREDICATE = 3
|
963
|
+
RANGE = 4
|
964
|
+
CONSISTENCY_LEVEL = 5
|
965
|
+
|
966
|
+
FIELDS = {
|
967
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
968
|
+
COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => CassandraThrift::ColumnParent},
|
969
|
+
PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => CassandraThrift::SlicePredicate},
|
970
|
+
RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'range', :class => CassandraThrift::KeyRange},
|
971
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
972
|
+
}
|
973
|
+
|
974
|
+
def struct_fields; FIELDS; end
|
975
|
+
|
976
|
+
def validate
|
977
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
978
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_parent is unset!') unless @column_parent
|
979
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field predicate is unset!') unless @predicate
|
980
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field range is unset!') unless @range
|
981
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
982
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
983
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
984
|
+
end
|
985
|
+
end
|
986
|
+
|
987
|
+
::Thrift::Struct.generate_accessors self
|
988
|
+
end
|
989
|
+
|
990
|
+
class Get_range_slices_result
|
991
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
992
|
+
SUCCESS = 0
|
993
|
+
IRE = 1
|
994
|
+
UE = 2
|
995
|
+
TE = 3
|
996
|
+
|
997
|
+
FIELDS = {
|
998
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::KeySlice}},
|
999
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
1000
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
1001
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
1002
|
+
}
|
1003
|
+
|
1004
|
+
def struct_fields; FIELDS; end
|
1005
|
+
|
1006
|
+
def validate
|
1007
|
+
end
|
1008
|
+
|
1009
|
+
::Thrift::Struct.generate_accessors self
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
class Insert_args
|
1013
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1014
|
+
KEYSPACE = 1
|
1015
|
+
KEY = 2
|
1016
|
+
COLUMN_PATH = 3
|
1017
|
+
VALUE = 4
|
1018
|
+
TIMESTAMP = 5
|
1019
|
+
CONSISTENCY_LEVEL = 6
|
1020
|
+
|
1021
|
+
FIELDS = {
|
1022
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
1023
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
1024
|
+
COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => CassandraThrift::ColumnPath},
|
1025
|
+
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
|
1026
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
|
1027
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
def struct_fields; FIELDS; end
|
1031
|
+
|
1032
|
+
def validate
|
1033
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
1034
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
1035
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
|
1036
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
1037
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
|
1038
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
1039
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
1040
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
1041
|
+
end
|
1042
|
+
end
|
1043
|
+
|
1044
|
+
::Thrift::Struct.generate_accessors self
|
1045
|
+
end
|
1046
|
+
|
1047
|
+
class Insert_result
|
1048
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1049
|
+
IRE = 1
|
1050
|
+
UE = 2
|
1051
|
+
TE = 3
|
1052
|
+
|
1053
|
+
FIELDS = {
|
1054
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
1055
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
1056
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
1057
|
+
}
|
1058
|
+
|
1059
|
+
def struct_fields; FIELDS; end
|
1060
|
+
|
1061
|
+
def validate
|
1062
|
+
end
|
1063
|
+
|
1064
|
+
::Thrift::Struct.generate_accessors self
|
1065
|
+
end
|
1066
|
+
|
1067
|
+
class Batch_insert_args
|
1068
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1069
|
+
KEYSPACE = 1
|
1070
|
+
KEY = 2
|
1071
|
+
CFMAP = 3
|
1072
|
+
CONSISTENCY_LEVEL = 4
|
1073
|
+
|
1074
|
+
FIELDS = {
|
1075
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
1076
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
1077
|
+
CFMAP => {:type => ::Thrift::Types::MAP, :name => 'cfmap', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnOrSuperColumn}}},
|
1078
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
def struct_fields; FIELDS; end
|
1082
|
+
|
1083
|
+
def validate
|
1084
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
1085
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
1086
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cfmap is unset!') unless @cfmap
|
1087
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
1088
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
1089
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
1090
|
+
end
|
1091
|
+
end
|
1092
|
+
|
1093
|
+
::Thrift::Struct.generate_accessors self
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
class Batch_insert_result
|
1097
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1098
|
+
IRE = 1
|
1099
|
+
UE = 2
|
1100
|
+
TE = 3
|
1101
|
+
|
1102
|
+
FIELDS = {
|
1103
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
1104
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
1105
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
1106
|
+
}
|
1107
|
+
|
1108
|
+
def struct_fields; FIELDS; end
|
1109
|
+
|
1110
|
+
def validate
|
1111
|
+
end
|
1112
|
+
|
1113
|
+
::Thrift::Struct.generate_accessors self
|
1114
|
+
end
|
1115
|
+
|
1116
|
+
class Remove_args
|
1117
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1118
|
+
KEYSPACE = 1
|
1119
|
+
KEY = 2
|
1120
|
+
COLUMN_PATH = 3
|
1121
|
+
TIMESTAMP = 4
|
1122
|
+
CONSISTENCY_LEVEL = 5
|
1123
|
+
|
1124
|
+
FIELDS = {
|
1125
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
1126
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
1127
|
+
COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => CassandraThrift::ColumnPath},
|
1128
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
|
1129
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
1130
|
+
}
|
1131
|
+
|
1132
|
+
def struct_fields; FIELDS; end
|
1133
|
+
|
1134
|
+
def validate
|
1135
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
1136
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
1137
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_path is unset!') unless @column_path
|
1138
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
|
1139
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
1140
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
1141
|
+
end
|
1142
|
+
end
|
1143
|
+
|
1144
|
+
::Thrift::Struct.generate_accessors self
|
1145
|
+
end
|
1146
|
+
|
1147
|
+
class Remove_result
|
1148
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1149
|
+
IRE = 1
|
1150
|
+
UE = 2
|
1151
|
+
TE = 3
|
1152
|
+
|
1153
|
+
FIELDS = {
|
1154
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
1155
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
1156
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
1157
|
+
}
|
1158
|
+
|
1159
|
+
def struct_fields; FIELDS; end
|
1160
|
+
|
1161
|
+
def validate
|
1162
|
+
end
|
1163
|
+
|
1164
|
+
::Thrift::Struct.generate_accessors self
|
1165
|
+
end
|
1166
|
+
|
1167
|
+
class Batch_mutate_args
|
1168
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1169
|
+
KEYSPACE = 1
|
1170
|
+
MUTATION_MAP = 2
|
1171
|
+
CONSISTENCY_LEVEL = 3
|
1172
|
+
|
1173
|
+
FIELDS = {
|
1174
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
|
1175
|
+
MUTATION_MAP => {:type => ::Thrift::Types::MAP, :name => 'mutation_map', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::LIST, :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Mutation}}}},
|
1176
|
+
CONSISTENCY_LEVEL => {:type => ::Thrift::Types::I32, :name => 'consistency_level', :default => 1, :enum_class => CassandraThrift::ConsistencyLevel}
|
1177
|
+
}
|
1178
|
+
|
1179
|
+
def struct_fields; FIELDS; end
|
1180
|
+
|
1181
|
+
def validate
|
1182
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
1183
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field mutation_map is unset!') unless @mutation_map
|
1184
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field consistency_level is unset!') unless @consistency_level
|
1185
|
+
unless @consistency_level.nil? || CassandraThrift::ConsistencyLevel::VALID_VALUES.include?(@consistency_level)
|
1186
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field consistency_level!')
|
1187
|
+
end
|
1188
|
+
end
|
1189
|
+
|
1190
|
+
::Thrift::Struct.generate_accessors self
|
1191
|
+
end
|
1192
|
+
|
1193
|
+
class Batch_mutate_result
|
1194
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1195
|
+
IRE = 1
|
1196
|
+
UE = 2
|
1197
|
+
TE = 3
|
1198
|
+
|
1199
|
+
FIELDS = {
|
1200
|
+
IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => CassandraThrift::InvalidRequestException},
|
1201
|
+
UE => {:type => ::Thrift::Types::STRUCT, :name => 'ue', :class => CassandraThrift::UnavailableException},
|
1202
|
+
TE => {:type => ::Thrift::Types::STRUCT, :name => 'te', :class => CassandraThrift::TimedOutException}
|
1203
|
+
}
|
1204
|
+
|
1205
|
+
def struct_fields; FIELDS; end
|
1206
|
+
|
1207
|
+
def validate
|
1208
|
+
end
|
1209
|
+
|
1210
|
+
::Thrift::Struct.generate_accessors self
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
class Get_string_property_args
|
1214
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1215
|
+
PROPERTY = 1
|
1216
|
+
|
1217
|
+
FIELDS = {
|
1218
|
+
PROPERTY => {:type => ::Thrift::Types::STRING, :name => 'property'}
|
1219
|
+
}
|
1220
|
+
|
1221
|
+
def struct_fields; FIELDS; end
|
1222
|
+
|
1223
|
+
def validate
|
1224
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field property is unset!') unless @property
|
1225
|
+
end
|
1226
|
+
|
1227
|
+
::Thrift::Struct.generate_accessors self
|
1228
|
+
end
|
1229
|
+
|
1230
|
+
class Get_string_property_result
|
1231
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1232
|
+
SUCCESS = 0
|
1233
|
+
|
1234
|
+
FIELDS = {
|
1235
|
+
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
|
1236
|
+
}
|
1237
|
+
|
1238
|
+
def struct_fields; FIELDS; end
|
1239
|
+
|
1240
|
+
def validate
|
1241
|
+
end
|
1242
|
+
|
1243
|
+
::Thrift::Struct.generate_accessors self
|
1244
|
+
end
|
1245
|
+
|
1246
|
+
class Get_string_list_property_args
|
1247
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1248
|
+
PROPERTY = 1
|
1249
|
+
|
1250
|
+
FIELDS = {
|
1251
|
+
PROPERTY => {:type => ::Thrift::Types::STRING, :name => 'property'}
|
1252
|
+
}
|
1253
|
+
|
1254
|
+
def struct_fields; FIELDS; end
|
1255
|
+
|
1256
|
+
def validate
|
1257
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field property is unset!') unless @property
|
1258
|
+
end
|
1259
|
+
|
1260
|
+
::Thrift::Struct.generate_accessors self
|
1261
|
+
end
|
1262
|
+
|
1263
|
+
class Get_string_list_property_result
|
1264
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1265
|
+
SUCCESS = 0
|
1266
|
+
|
1267
|
+
FIELDS = {
|
1268
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
|
1269
|
+
}
|
1270
|
+
|
1271
|
+
def struct_fields; FIELDS; end
|
1272
|
+
|
1273
|
+
def validate
|
1274
|
+
end
|
1275
|
+
|
1276
|
+
::Thrift::Struct.generate_accessors self
|
1277
|
+
end
|
1278
|
+
|
1279
|
+
class Describe_keyspaces_args
|
1280
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1281
|
+
|
1282
|
+
FIELDS = {
|
1283
|
+
|
1284
|
+
}
|
1285
|
+
|
1286
|
+
def struct_fields; FIELDS; end
|
1287
|
+
|
1288
|
+
def validate
|
1289
|
+
end
|
1290
|
+
|
1291
|
+
::Thrift::Struct.generate_accessors self
|
1292
|
+
end
|
1293
|
+
|
1294
|
+
class Describe_keyspaces_result
|
1295
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1296
|
+
SUCCESS = 0
|
1297
|
+
|
1298
|
+
FIELDS = {
|
1299
|
+
SUCCESS => {:type => ::Thrift::Types::SET, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
|
1300
|
+
}
|
1301
|
+
|
1302
|
+
def struct_fields; FIELDS; end
|
1303
|
+
|
1304
|
+
def validate
|
1305
|
+
end
|
1306
|
+
|
1307
|
+
::Thrift::Struct.generate_accessors self
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
class Describe_cluster_name_args
|
1311
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1312
|
+
|
1313
|
+
FIELDS = {
|
1314
|
+
|
1315
|
+
}
|
1316
|
+
|
1317
|
+
def struct_fields; FIELDS; end
|
1318
|
+
|
1319
|
+
def validate
|
1320
|
+
end
|
1321
|
+
|
1322
|
+
::Thrift::Struct.generate_accessors self
|
1323
|
+
end
|
1324
|
+
|
1325
|
+
class Describe_cluster_name_result
|
1326
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1327
|
+
SUCCESS = 0
|
1328
|
+
|
1329
|
+
FIELDS = {
|
1330
|
+
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
def struct_fields; FIELDS; end
|
1334
|
+
|
1335
|
+
def validate
|
1336
|
+
end
|
1337
|
+
|
1338
|
+
::Thrift::Struct.generate_accessors self
|
1339
|
+
end
|
1340
|
+
|
1341
|
+
class Describe_version_args
|
1342
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1343
|
+
|
1344
|
+
FIELDS = {
|
1345
|
+
|
1346
|
+
}
|
1347
|
+
|
1348
|
+
def struct_fields; FIELDS; end
|
1349
|
+
|
1350
|
+
def validate
|
1351
|
+
end
|
1352
|
+
|
1353
|
+
::Thrift::Struct.generate_accessors self
|
1354
|
+
end
|
1355
|
+
|
1356
|
+
class Describe_version_result
|
1357
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1358
|
+
SUCCESS = 0
|
1359
|
+
|
1360
|
+
FIELDS = {
|
1361
|
+
SUCCESS => {:type => ::Thrift::Types::STRING, :name => 'success'}
|
1362
|
+
}
|
1363
|
+
|
1364
|
+
def struct_fields; FIELDS; end
|
1365
|
+
|
1366
|
+
def validate
|
1367
|
+
end
|
1368
|
+
|
1369
|
+
::Thrift::Struct.generate_accessors self
|
1370
|
+
end
|
1371
|
+
|
1372
|
+
class Describe_ring_args
|
1373
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1374
|
+
KEYSPACE = 1
|
1375
|
+
|
1376
|
+
FIELDS = {
|
1377
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
|
1378
|
+
}
|
1379
|
+
|
1380
|
+
def struct_fields; FIELDS; end
|
1381
|
+
|
1382
|
+
def validate
|
1383
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
::Thrift::Struct.generate_accessors self
|
1387
|
+
end
|
1388
|
+
|
1389
|
+
class Describe_ring_result
|
1390
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1391
|
+
SUCCESS = 0
|
1392
|
+
|
1393
|
+
FIELDS = {
|
1394
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::TokenRange}}
|
1395
|
+
}
|
1396
|
+
|
1397
|
+
def struct_fields; FIELDS; end
|
1398
|
+
|
1399
|
+
def validate
|
1400
|
+
end
|
1401
|
+
|
1402
|
+
::Thrift::Struct.generate_accessors self
|
1403
|
+
end
|
1404
|
+
|
1405
|
+
class Describe_keyspace_args
|
1406
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1407
|
+
KEYSPACE = 1
|
1408
|
+
|
1409
|
+
FIELDS = {
|
1410
|
+
KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'}
|
1411
|
+
}
|
1412
|
+
|
1413
|
+
def struct_fields; FIELDS; end
|
1414
|
+
|
1415
|
+
def validate
|
1416
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
|
1417
|
+
end
|
1418
|
+
|
1419
|
+
::Thrift::Struct.generate_accessors self
|
1420
|
+
end
|
1421
|
+
|
1422
|
+
class Describe_keyspace_result
|
1423
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1424
|
+
SUCCESS = 0
|
1425
|
+
NFE = 1
|
1426
|
+
|
1427
|
+
FIELDS = {
|
1428
|
+
SUCCESS => {:type => ::Thrift::Types::MAP, :name => 'success', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::MAP, :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}},
|
1429
|
+
NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => CassandraThrift::NotFoundException}
|
1430
|
+
}
|
1431
|
+
|
1432
|
+
def struct_fields; FIELDS; end
|
1433
|
+
|
1434
|
+
def validate
|
1435
|
+
end
|
1436
|
+
|
1437
|
+
::Thrift::Struct.generate_accessors self
|
1438
|
+
end
|
1439
|
+
|
1440
|
+
class Describe_splits_args
|
1441
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1442
|
+
START_TOKEN = 1
|
1443
|
+
END_TOKEN = 2
|
1444
|
+
KEYS_PER_SPLIT = 3
|
1445
|
+
|
1446
|
+
FIELDS = {
|
1447
|
+
START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
|
1448
|
+
END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
|
1449
|
+
KEYS_PER_SPLIT => {:type => ::Thrift::Types::I32, :name => 'keys_per_split'}
|
1450
|
+
}
|
1451
|
+
|
1452
|
+
def struct_fields; FIELDS; end
|
1453
|
+
|
1454
|
+
def validate
|
1455
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
|
1456
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
|
1457
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keys_per_split is unset!') unless @keys_per_split
|
1458
|
+
end
|
1459
|
+
|
1460
|
+
::Thrift::Struct.generate_accessors self
|
1461
|
+
end
|
1462
|
+
|
1463
|
+
class Describe_splits_result
|
1464
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
1465
|
+
SUCCESS = 0
|
1466
|
+
|
1467
|
+
FIELDS = {
|
1468
|
+
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRING}}
|
1469
|
+
}
|
1470
|
+
|
1471
|
+
def struct_fields; FIELDS; end
|
1472
|
+
|
1473
|
+
def validate
|
1474
|
+
end
|
1475
|
+
|
1476
|
+
::Thrift::Struct.generate_accessors self
|
1477
|
+
end
|
1478
|
+
|
1479
|
+
end
|
1480
|
+
|
1481
|
+
end
|