cassandra-mavericks 0.21.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +15 -0
  2. data/CHANGELOG +150 -0
  3. data/Gemfile +7 -0
  4. data/LICENSE +202 -0
  5. data/Manifest +94 -0
  6. data/README.md +373 -0
  7. data/Rakefile +191 -0
  8. data/bin/cassandra_helper +16 -0
  9. data/cassandra.gemspec +29 -0
  10. data/conf/0.6/cassandra.in.sh +47 -0
  11. data/conf/0.6/log4j.properties +38 -0
  12. data/conf/0.6/schema.json +57 -0
  13. data/conf/0.6/storage-conf.xml +352 -0
  14. data/conf/0.7/cassandra.in.sh +46 -0
  15. data/conf/0.7/cassandra.yaml +336 -0
  16. data/conf/0.7/log4j-server.properties +41 -0
  17. data/conf/0.7/schema.json +57 -0
  18. data/conf/0.7/schema.txt +45 -0
  19. data/conf/0.8/cassandra.in.sh +41 -0
  20. data/conf/0.8/cassandra.yaml +61 -0
  21. data/conf/0.8/log4j-server.properties +40 -0
  22. data/conf/0.8/schema.json +72 -0
  23. data/conf/0.8/schema.txt +57 -0
  24. data/conf/1.0/cassandra.in.sh +41 -0
  25. data/conf/1.0/cassandra.yaml +415 -0
  26. data/conf/1.0/log4j-server.properties +40 -0
  27. data/conf/1.0/schema.json +72 -0
  28. data/conf/1.0/schema.txt +57 -0
  29. data/conf/1.1/cassandra.in.sh +41 -0
  30. data/conf/1.1/cassandra.yaml +567 -0
  31. data/conf/1.1/log4j-server.properties +44 -0
  32. data/conf/1.1/schema.json +72 -0
  33. data/conf/1.1/schema.txt +57 -0
  34. data/conf/1.2/cassandra.in.sh +41 -0
  35. data/conf/1.2/cassandra.yaml +643 -0
  36. data/conf/1.2/log4j-server.properties +44 -0
  37. data/conf/1.2/schema.json +72 -0
  38. data/conf/1.2/schema.txt +57 -0
  39. data/ext/cassandra_native.c +69 -0
  40. data/ext/extconf.rb +9 -0
  41. data/lib/cassandra.rb +47 -0
  42. data/lib/cassandra/0.6.rb +7 -0
  43. data/lib/cassandra/0.6/cassandra.rb +113 -0
  44. data/lib/cassandra/0.6/columns.rb +78 -0
  45. data/lib/cassandra/0.6/protocol.rb +91 -0
  46. data/lib/cassandra/0.7.rb +7 -0
  47. data/lib/cassandra/0.7/cassandra.rb +2 -0
  48. data/lib/cassandra/0.7/columns.rb +4 -0
  49. data/lib/cassandra/0.7/protocol.rb +5 -0
  50. data/lib/cassandra/0.8.rb +7 -0
  51. data/lib/cassandra/0.8/cassandra.rb +25 -0
  52. data/lib/cassandra/0.8/columns.rb +28 -0
  53. data/lib/cassandra/0.8/protocol.rb +10 -0
  54. data/lib/cassandra/1.0.rb +7 -0
  55. data/lib/cassandra/1.0/cassandra.rb +1 -0
  56. data/lib/cassandra/1.0/columns.rb +1 -0
  57. data/lib/cassandra/1.0/protocol.rb +1 -0
  58. data/lib/cassandra/1.1.rb +7 -0
  59. data/lib/cassandra/1.1/cassandra.rb +1 -0
  60. data/lib/cassandra/1.1/columns.rb +1 -0
  61. data/lib/cassandra/1.1/protocol.rb +1 -0
  62. data/lib/cassandra/1.2.rb +7 -0
  63. data/lib/cassandra/1.2/cassandra.rb +1 -0
  64. data/lib/cassandra/1.2/columns.rb +1 -0
  65. data/lib/cassandra/1.2/protocol.rb +1 -0
  66. data/lib/cassandra/array.rb +8 -0
  67. data/lib/cassandra/batch.rb +41 -0
  68. data/lib/cassandra/cassandra.rb +1091 -0
  69. data/lib/cassandra/column_family.rb +3 -0
  70. data/lib/cassandra/columns.rb +172 -0
  71. data/lib/cassandra/comparable.rb +28 -0
  72. data/lib/cassandra/composite.rb +137 -0
  73. data/lib/cassandra/constants.rb +11 -0
  74. data/lib/cassandra/debug.rb +9 -0
  75. data/lib/cassandra/dynamic_composite.rb +118 -0
  76. data/lib/cassandra/helpers.rb +41 -0
  77. data/lib/cassandra/keyspace.rb +3 -0
  78. data/lib/cassandra/long.rb +58 -0
  79. data/lib/cassandra/mock.rb +536 -0
  80. data/lib/cassandra/ordered_hash.rb +195 -0
  81. data/lib/cassandra/protocol.rb +137 -0
  82. data/lib/cassandra/time.rb +11 -0
  83. data/test/cassandra_client_test.rb +20 -0
  84. data/test/cassandra_mock_test.rb +128 -0
  85. data/test/cassandra_test.rb +1367 -0
  86. data/test/comparable_types_test.rb +45 -0
  87. data/test/composite_type_test.rb +86 -0
  88. data/test/eventmachine_test.rb +42 -0
  89. data/test/ordered_hash_test.rb +386 -0
  90. data/test/test_helper.rb +19 -0
  91. data/vendor/0.6/gen-rb/cassandra.rb +1481 -0
  92. data/vendor/0.6/gen-rb/cassandra_constants.rb +12 -0
  93. data/vendor/0.6/gen-rb/cassandra_types.rb +482 -0
  94. data/vendor/0.7/gen-rb/cassandra.rb +1936 -0
  95. data/vendor/0.7/gen-rb/cassandra_constants.rb +12 -0
  96. data/vendor/0.7/gen-rb/cassandra_types.rb +681 -0
  97. data/vendor/0.8/gen-rb/cassandra.rb +2215 -0
  98. data/vendor/0.8/gen-rb/cassandra_constants.rb +12 -0
  99. data/vendor/0.8/gen-rb/cassandra_types.rb +824 -0
  100. data/vendor/1.0/gen-rb/cassandra.rb +2215 -0
  101. data/vendor/1.0/gen-rb/cassandra_constants.rb +12 -0
  102. data/vendor/1.0/gen-rb/cassandra_types.rb +857 -0
  103. data/vendor/1.1/gen-rb/cassandra.rb +2571 -0
  104. data/vendor/1.1/gen-rb/cassandra_constants.rb +12 -0
  105. data/vendor/1.1/gen-rb/cassandra_types.rb +928 -0
  106. data/vendor/1.2/gen-rb/cassandra.rb +3013 -0
  107. data/vendor/1.2/gen-rb/cassandra_constants.rb +13 -0
  108. data/vendor/1.2/gen-rb/cassandra_types.rb +965 -0
  109. metadata +288 -0
@@ -0,0 +1,13 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.0)
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
+
10
+ module CassandraThrift
11
+ VERSION = %q"19.35.0"
12
+
13
+ end
@@ -0,0 +1,965 @@
1
+ #
2
+ # Autogenerated by Thrift Compiler (0.9.0)
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ require 'thrift'
8
+
9
+ module CassandraThrift
10
+ module ConsistencyLevel
11
+ ONE = 1
12
+ QUORUM = 2
13
+ LOCAL_QUORUM = 3
14
+ EACH_QUORUM = 4
15
+ ALL = 5
16
+ ANY = 6
17
+ TWO = 7
18
+ THREE = 8
19
+ VALUE_MAP = {1 => "ONE", 2 => "QUORUM", 3 => "LOCAL_QUORUM", 4 => "EACH_QUORUM", 5 => "ALL", 6 => "ANY", 7 => "TWO", 8 => "THREE"}
20
+ VALID_VALUES = Set.new([ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL, ANY, TWO, THREE]).freeze
21
+ end
22
+
23
+ module IndexOperator
24
+ EQ = 0
25
+ GTE = 1
26
+ GT = 2
27
+ LTE = 3
28
+ LT = 4
29
+ VALUE_MAP = {0 => "EQ", 1 => "GTE", 2 => "GT", 3 => "LTE", 4 => "LT"}
30
+ VALID_VALUES = Set.new([EQ, GTE, GT, LTE, LT]).freeze
31
+ end
32
+
33
+ module IndexType
34
+ KEYS = 0
35
+ CUSTOM = 1
36
+ COMPOSITES = 2
37
+ VALUE_MAP = {0 => "KEYS", 1 => "CUSTOM", 2 => "COMPOSITES"}
38
+ VALID_VALUES = Set.new([KEYS, CUSTOM, COMPOSITES]).freeze
39
+ end
40
+
41
+ module Compression
42
+ GZIP = 1
43
+ NONE = 2
44
+ VALUE_MAP = {1 => "GZIP", 2 => "NONE"}
45
+ VALID_VALUES = Set.new([GZIP, NONE]).freeze
46
+ end
47
+
48
+ module CqlResultType
49
+ ROWS = 1
50
+ VOID = 2
51
+ INT = 3
52
+ VALUE_MAP = {1 => "ROWS", 2 => "VOID", 3 => "INT"}
53
+ VALID_VALUES = Set.new([ROWS, VOID, INT]).freeze
54
+ end
55
+
56
+ # Basic unit of data within a ColumnFamily.
57
+ # @param name, the name by which this column is set and retrieved. Maximum 64KB long.
58
+ # @param value. The data associated with the name. Maximum 2GB long, but in practice you should limit it to small numbers of MB (since Thrift must read the full value into memory to operate on it).
59
+ # @param timestamp. The timestamp is used for conflict detection/resolution when two columns with same name need to be compared.
60
+ # @param ttl. An optional, positive delay (in seconds) after which the column will be automatically deleted.
61
+ class Column
62
+ include ::Thrift::Struct, ::Thrift::Struct_Union
63
+ NAME = 1
64
+ VALUE = 2
65
+ TIMESTAMP = 3
66
+ TTL = 4
67
+
68
+ FIELDS = {
69
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
70
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true, :optional => true},
71
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
72
+ TTL => {:type => ::Thrift::Types::I32, :name => 'ttl', :optional => true}
73
+ }
74
+
75
+ def struct_fields; FIELDS; end
76
+
77
+ def validate
78
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
79
+ end
80
+
81
+ ::Thrift::Struct.generate_accessors self
82
+ end
83
+
84
+ # A named list of columns.
85
+ # @param name. see Column.name.
86
+ # @param columns. A collection of standard Columns. The columns within a super column are defined in an adhoc manner.
87
+ # Columns within a super column do not have to have matching structures (similarly named child columns).
88
+ class SuperColumn
89
+ include ::Thrift::Struct, ::Thrift::Struct_Union
90
+ NAME = 1
91
+ COLUMNS = 2
92
+
93
+ FIELDS = {
94
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
95
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::Column}}
96
+ }
97
+
98
+ def struct_fields; FIELDS; end
99
+
100
+ def validate
101
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
102
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
103
+ end
104
+
105
+ ::Thrift::Struct.generate_accessors self
106
+ end
107
+
108
+ class CounterColumn
109
+ include ::Thrift::Struct, ::Thrift::Struct_Union
110
+ NAME = 1
111
+ VALUE = 2
112
+
113
+ FIELDS = {
114
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
115
+ VALUE => {:type => ::Thrift::Types::I64, :name => 'value'}
116
+ }
117
+
118
+ def struct_fields; FIELDS; end
119
+
120
+ def validate
121
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
122
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
123
+ end
124
+
125
+ ::Thrift::Struct.generate_accessors self
126
+ end
127
+
128
+ class CounterSuperColumn
129
+ include ::Thrift::Struct, ::Thrift::Struct_Union
130
+ NAME = 1
131
+ COLUMNS = 2
132
+
133
+ FIELDS = {
134
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
135
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::CounterColumn}}
136
+ }
137
+
138
+ def struct_fields; FIELDS; end
139
+
140
+ def validate
141
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
142
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
143
+ end
144
+
145
+ ::Thrift::Struct.generate_accessors self
146
+ end
147
+
148
+ # Methods for fetching rows/records from Cassandra will return either a single instance of ColumnOrSuperColumn or a list
149
+ # of ColumnOrSuperColumns (get_slice()). If you're looking up a SuperColumn (or list of SuperColumns) then the resulting
150
+ # instances of ColumnOrSuperColumn will have the requested SuperColumn in the attribute super_column. For queries resulting
151
+ # in Columns, those values will be in the attribute column. This change was made between 0.3 and 0.4 to standardize on
152
+ # single query methods that may return either a SuperColumn or Column.
153
+ #
154
+ # If the query was on a counter column family, you will either get a counter_column (instead of a column) or a
155
+ # counter_super_column (instead of a super_column)
156
+ #
157
+ # @param column. The Column returned by get() or get_slice().
158
+ # @param super_column. The SuperColumn returned by get() or get_slice().
159
+ # @param counter_column. The Counterolumn returned by get() or get_slice().
160
+ # @param counter_super_column. The CounterSuperColumn returned by get() or get_slice().
161
+ class ColumnOrSuperColumn
162
+ include ::Thrift::Struct, ::Thrift::Struct_Union
163
+ COLUMN = 1
164
+ SUPER_COLUMN = 2
165
+ COUNTER_COLUMN = 3
166
+ COUNTER_SUPER_COLUMN = 4
167
+
168
+ FIELDS = {
169
+ COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => ::CassandraThrift::Column, :optional => true},
170
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'super_column', :class => ::CassandraThrift::SuperColumn, :optional => true},
171
+ COUNTER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'counter_column', :class => ::CassandraThrift::CounterColumn, :optional => true},
172
+ COUNTER_SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'counter_super_column', :class => ::CassandraThrift::CounterSuperColumn, :optional => true}
173
+ }
174
+
175
+ def struct_fields; FIELDS; end
176
+
177
+ def validate
178
+ end
179
+
180
+ ::Thrift::Struct.generate_accessors self
181
+ end
182
+
183
+ # A specific column was requested that does not exist.
184
+ class NotFoundException < ::Thrift::Exception
185
+ include ::Thrift::Struct, ::Thrift::Struct_Union
186
+
187
+ FIELDS = {
188
+
189
+ }
190
+
191
+ def struct_fields; FIELDS; end
192
+
193
+ def validate
194
+ end
195
+
196
+ ::Thrift::Struct.generate_accessors self
197
+ end
198
+
199
+ # Invalid request could mean keyspace or column family does not exist, required parameters are missing, or a parameter is malformed.
200
+ # why contains an associated error message.
201
+ class InvalidRequestException < ::Thrift::Exception
202
+ include ::Thrift::Struct, ::Thrift::Struct_Union
203
+ def initialize(message=nil)
204
+ super()
205
+ self.why = message
206
+ end
207
+
208
+ def message; why end
209
+
210
+ WHY = 1
211
+
212
+ FIELDS = {
213
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
214
+ }
215
+
216
+ def struct_fields; FIELDS; end
217
+
218
+ def validate
219
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
220
+ end
221
+
222
+ ::Thrift::Struct.generate_accessors self
223
+ end
224
+
225
+ # Not all the replicas required could be created and/or read.
226
+ class UnavailableException < ::Thrift::Exception
227
+ include ::Thrift::Struct, ::Thrift::Struct_Union
228
+
229
+ FIELDS = {
230
+
231
+ }
232
+
233
+ def struct_fields; FIELDS; end
234
+
235
+ def validate
236
+ end
237
+
238
+ ::Thrift::Struct.generate_accessors self
239
+ end
240
+
241
+ # RPC timeout was exceeded. either a node failed mid-operation, or load was too high, or the requested op was too large.
242
+ class TimedOutException < ::Thrift::Exception
243
+ include ::Thrift::Struct, ::Thrift::Struct_Union
244
+ ACKNOWLEDGED_BY = 1
245
+ ACKNOWLEDGED_BY_BATCHLOG = 2
246
+
247
+ FIELDS = {
248
+ # if a write operation was acknowledged by some replicas but not by enough to
249
+ # satisfy the required ConsistencyLevel, the number of successful
250
+ # replies will be given here. In case of atomic_batch_mutate method this field
251
+ # will be set to -1 if the batch was written to the batchlog and to 0 if it wasn't.
252
+ ACKNOWLEDGED_BY => {:type => ::Thrift::Types::I32, :name => 'acknowledged_by', :optional => true},
253
+ # in case of atomic_batch_mutate method this field tells if the batch was written to the batchlog.
254
+ ACKNOWLEDGED_BY_BATCHLOG => {:type => ::Thrift::Types::BOOL, :name => 'acknowledged_by_batchlog', :optional => true}
255
+ }
256
+
257
+ def struct_fields; FIELDS; end
258
+
259
+ def validate
260
+ end
261
+
262
+ ::Thrift::Struct.generate_accessors self
263
+ end
264
+
265
+ # invalid authentication request (invalid keyspace, user does not exist, or credentials invalid)
266
+ class AuthenticationException < ::Thrift::Exception
267
+ include ::Thrift::Struct, ::Thrift::Struct_Union
268
+ def initialize(message=nil)
269
+ super()
270
+ self.why = message
271
+ end
272
+
273
+ def message; why end
274
+
275
+ WHY = 1
276
+
277
+ FIELDS = {
278
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
279
+ }
280
+
281
+ def struct_fields; FIELDS; end
282
+
283
+ def validate
284
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
285
+ end
286
+
287
+ ::Thrift::Struct.generate_accessors self
288
+ end
289
+
290
+ # invalid authorization request (user does not have access to keyspace)
291
+ class AuthorizationException < ::Thrift::Exception
292
+ include ::Thrift::Struct, ::Thrift::Struct_Union
293
+ def initialize(message=nil)
294
+ super()
295
+ self.why = message
296
+ end
297
+
298
+ def message; why end
299
+
300
+ WHY = 1
301
+
302
+ FIELDS = {
303
+ WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
304
+ }
305
+
306
+ def struct_fields; FIELDS; end
307
+
308
+ def validate
309
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
310
+ end
311
+
312
+ ::Thrift::Struct.generate_accessors self
313
+ end
314
+
315
+ # NOTE: This up outdated exception left for backward compatibility reasons,
316
+ # no actual schema agreement validation is done starting from Cassandra 1.2
317
+ #
318
+ # schemas are not in agreement across all nodes
319
+ class SchemaDisagreementException < ::Thrift::Exception
320
+ include ::Thrift::Struct, ::Thrift::Struct_Union
321
+
322
+ FIELDS = {
323
+
324
+ }
325
+
326
+ def struct_fields; FIELDS; end
327
+
328
+ def validate
329
+ end
330
+
331
+ ::Thrift::Struct.generate_accessors self
332
+ end
333
+
334
+ # ColumnParent is used when selecting groups of columns from the same ColumnFamily. In directory structure terms, imagine
335
+ # ColumnParent as ColumnPath + '/../'.
336
+ #
337
+ # See also <a href="cassandra.html#Struct_ColumnPath">ColumnPath</a>
338
+ class ColumnParent
339
+ include ::Thrift::Struct, ::Thrift::Struct_Union
340
+ COLUMN_FAMILY = 3
341
+ SUPER_COLUMN = 4
342
+
343
+ FIELDS = {
344
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
345
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true}
346
+ }
347
+
348
+ def struct_fields; FIELDS; end
349
+
350
+ def validate
351
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
352
+ end
353
+
354
+ ::Thrift::Struct.generate_accessors self
355
+ end
356
+
357
+ # The ColumnPath is the path to a single column in Cassandra. It might make sense to think of ColumnPath and
358
+ # ColumnParent in terms of a directory structure.
359
+ #
360
+ # ColumnPath is used to looking up a single column.
361
+ #
362
+ # @param column_family. The name of the CF of the column being looked up.
363
+ # @param super_column. The super column name.
364
+ # @param column. The column name.
365
+ class ColumnPath
366
+ include ::Thrift::Struct, ::Thrift::Struct_Union
367
+ COLUMN_FAMILY = 3
368
+ SUPER_COLUMN = 4
369
+ COLUMN = 5
370
+
371
+ FIELDS = {
372
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
373
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
374
+ COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :binary => true, :optional => true}
375
+ }
376
+
377
+ def struct_fields; FIELDS; end
378
+
379
+ def validate
380
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
381
+ end
382
+
383
+ ::Thrift::Struct.generate_accessors self
384
+ end
385
+
386
+ # A slice range is a structure that stores basic range, ordering and limit information for a query that will return
387
+ # multiple columns. It could be thought of as Cassandra's version of LIMIT and ORDER BY
388
+ #
389
+ # @param start. The column name to start the slice with. This attribute is not required, though there is no default value,
390
+ # and can be safely set to '', i.e., an empty byte array, to start with the first column name. Otherwise, it
391
+ # must a valid value under the rules of the Comparator defined for the given ColumnFamily.
392
+ # @param finish. The column name to stop the slice at. This attribute is not required, though there is no default value,
393
+ # and can be safely set to an empty byte array to not stop until 'count' results are seen. Otherwise, it
394
+ # must also be a valid value to the ColumnFamily Comparator.
395
+ # @param reversed. Whether the results should be ordered in reversed order. Similar to ORDER BY blah DESC in SQL.
396
+ # @param count. How many columns to return. Similar to LIMIT in SQL. May be arbitrarily large, but Thrift will
397
+ # materialize the whole result into memory before returning it to the client, so be aware that you may
398
+ # be better served by iterating through slices by passing the last value of one call in as the 'start'
399
+ # of the next instead of increasing 'count' arbitrarily large.
400
+ class SliceRange
401
+ include ::Thrift::Struct, ::Thrift::Struct_Union
402
+ START = 1
403
+ FINISH = 2
404
+ REVERSED = 3
405
+ COUNT = 4
406
+
407
+ FIELDS = {
408
+ START => {:type => ::Thrift::Types::STRING, :name => 'start', :binary => true},
409
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish', :binary => true},
410
+ REVERSED => {:type => ::Thrift::Types::BOOL, :name => 'reversed', :default => false},
411
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
412
+ }
413
+
414
+ def struct_fields; FIELDS; end
415
+
416
+ def validate
417
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start is unset!') unless @start
418
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field finish is unset!') unless @finish
419
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field reversed is unset!') if @reversed.nil?
420
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
421
+ end
422
+
423
+ ::Thrift::Struct.generate_accessors self
424
+ end
425
+
426
+ # A SlicePredicate is similar to a mathematic predicate (see http://en.wikipedia.org/wiki/Predicate_(mathematical_logic)),
427
+ # which is described as "a property that the elements of a set have in common."
428
+ #
429
+ # SlicePredicate's in Cassandra are described with either a list of column_names or a SliceRange. If column_names is
430
+ # specified, slice_range is ignored.
431
+ #
432
+ # @param column_name. A list of column names to retrieve. This can be used similar to Memcached's "multi-get" feature
433
+ # to fetch N known column names. For instance, if you know you wish to fetch columns 'Joe', 'Jack',
434
+ # and 'Jim' you can pass those column names as a list to fetch all three at once.
435
+ # @param slice_range. A SliceRange describing how to range, order, and/or limit the slice.
436
+ class SlicePredicate
437
+ include ::Thrift::Struct, ::Thrift::Struct_Union
438
+ COLUMN_NAMES = 1
439
+ SLICE_RANGE = 2
440
+
441
+ FIELDS = {
442
+ COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING, :binary => true}, :optional => true},
443
+ SLICE_RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'slice_range', :class => ::CassandraThrift::SliceRange, :optional => true}
444
+ }
445
+
446
+ def struct_fields; FIELDS; end
447
+
448
+ def validate
449
+ end
450
+
451
+ ::Thrift::Struct.generate_accessors self
452
+ end
453
+
454
+ class IndexExpression
455
+ include ::Thrift::Struct, ::Thrift::Struct_Union
456
+ COLUMN_NAME = 1
457
+ OP = 2
458
+ VALUE = 3
459
+
460
+ FIELDS = {
461
+ COLUMN_NAME => {:type => ::Thrift::Types::STRING, :name => 'column_name', :binary => true},
462
+ OP => {:type => ::Thrift::Types::I32, :name => 'op', :enum_class => ::CassandraThrift::IndexOperator},
463
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true}
464
+ }
465
+
466
+ def struct_fields; FIELDS; end
467
+
468
+ def validate
469
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_name is unset!') unless @column_name
470
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field op is unset!') unless @op
471
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
472
+ unless @op.nil? || ::CassandraThrift::IndexOperator::VALID_VALUES.include?(@op)
473
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field op!')
474
+ end
475
+ end
476
+
477
+ ::Thrift::Struct.generate_accessors self
478
+ end
479
+
480
+ # @deprecated use a KeyRange with row_filter in get_range_slices instead
481
+ class IndexClause
482
+ include ::Thrift::Struct, ::Thrift::Struct_Union
483
+ EXPRESSIONS = 1
484
+ START_KEY = 2
485
+ COUNT = 3
486
+
487
+ FIELDS = {
488
+ EXPRESSIONS => {:type => ::Thrift::Types::LIST, :name => 'expressions', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::IndexExpression}},
489
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :binary => true},
490
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
491
+ }
492
+
493
+ def struct_fields; FIELDS; end
494
+
495
+ def validate
496
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field expressions is unset!') unless @expressions
497
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_key is unset!') unless @start_key
498
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
499
+ end
500
+
501
+ ::Thrift::Struct.generate_accessors self
502
+ end
503
+
504
+ # The semantics of start keys and tokens are slightly different.
505
+ # Keys are start-inclusive; tokens are start-exclusive. Token
506
+ # ranges may also wrap -- that is, the end token may be less
507
+ # than the start one. Thus, a range from keyX to keyX is a
508
+ # one-element range, but a range from tokenY to tokenY is the
509
+ # full ring.
510
+ class KeyRange
511
+ include ::Thrift::Struct, ::Thrift::Struct_Union
512
+ START_KEY = 1
513
+ END_KEY = 2
514
+ START_TOKEN = 3
515
+ END_TOKEN = 4
516
+ ROW_FILTER = 6
517
+ COUNT = 5
518
+
519
+ FIELDS = {
520
+ START_KEY => {:type => ::Thrift::Types::STRING, :name => 'start_key', :binary => true, :optional => true},
521
+ END_KEY => {:type => ::Thrift::Types::STRING, :name => 'end_key', :binary => true, :optional => true},
522
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token', :optional => true},
523
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token', :optional => true},
524
+ ROW_FILTER => {:type => ::Thrift::Types::LIST, :name => 'row_filter', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::IndexExpression}, :optional => true},
525
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
526
+ }
527
+
528
+ def struct_fields; FIELDS; end
529
+
530
+ def validate
531
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
532
+ end
533
+
534
+ ::Thrift::Struct.generate_accessors self
535
+ end
536
+
537
+ # A KeySlice is key followed by the data it maps to. A collection of KeySlice is returned by the get_range_slice operation.
538
+ #
539
+ # @param key. a row key
540
+ # @param columns. List of data represented by the key. Typically, the list is pared down to only the columns specified by
541
+ # a SlicePredicate.
542
+ class KeySlice
543
+ include ::Thrift::Struct, ::Thrift::Struct_Union
544
+ KEY = 1
545
+ COLUMNS = 2
546
+
547
+ FIELDS = {
548
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
549
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::ColumnOrSuperColumn}}
550
+ }
551
+
552
+ def struct_fields; FIELDS; end
553
+
554
+ def validate
555
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
556
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
557
+ end
558
+
559
+ ::Thrift::Struct.generate_accessors self
560
+ end
561
+
562
+ class KeyCount
563
+ include ::Thrift::Struct, ::Thrift::Struct_Union
564
+ KEY = 1
565
+ COUNT = 2
566
+
567
+ FIELDS = {
568
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
569
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'}
570
+ }
571
+
572
+ def struct_fields; FIELDS; end
573
+
574
+ def validate
575
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
576
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
577
+ end
578
+
579
+ ::Thrift::Struct.generate_accessors self
580
+ end
581
+
582
+ # Note that the timestamp is only optional in case of counter deletion.
583
+ class Deletion
584
+ include ::Thrift::Struct, ::Thrift::Struct_Union
585
+ TIMESTAMP = 1
586
+ SUPER_COLUMN = 2
587
+ PREDICATE = 3
588
+
589
+ FIELDS = {
590
+ TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true},
591
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :binary => true, :optional => true},
592
+ PREDICATE => {:type => ::Thrift::Types::STRUCT, :name => 'predicate', :class => ::CassandraThrift::SlicePredicate, :optional => true}
593
+ }
594
+
595
+ def struct_fields; FIELDS; end
596
+
597
+ def validate
598
+ end
599
+
600
+ ::Thrift::Struct.generate_accessors self
601
+ end
602
+
603
+ # A Mutation is either an insert (represented by filling column_or_supercolumn) or a deletion (represented by filling the deletion attribute).
604
+ # @param column_or_supercolumn. An insert to a column or supercolumn (possibly counter column or supercolumn)
605
+ # @param deletion. A deletion of a column or supercolumn
606
+ class Mutation
607
+ include ::Thrift::Struct, ::Thrift::Struct_Union
608
+ COLUMN_OR_SUPERCOLUMN = 1
609
+ DELETION = 2
610
+
611
+ FIELDS = {
612
+ COLUMN_OR_SUPERCOLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column_or_supercolumn', :class => ::CassandraThrift::ColumnOrSuperColumn, :optional => true},
613
+ DELETION => {:type => ::Thrift::Types::STRUCT, :name => 'deletion', :class => ::CassandraThrift::Deletion, :optional => true}
614
+ }
615
+
616
+ def struct_fields; FIELDS; end
617
+
618
+ def validate
619
+ end
620
+
621
+ ::Thrift::Struct.generate_accessors self
622
+ end
623
+
624
+ class EndpointDetails
625
+ include ::Thrift::Struct, ::Thrift::Struct_Union
626
+ HOST = 1
627
+ DATACENTER = 2
628
+ RACK = 3
629
+
630
+ FIELDS = {
631
+ HOST => {:type => ::Thrift::Types::STRING, :name => 'host'},
632
+ DATACENTER => {:type => ::Thrift::Types::STRING, :name => 'datacenter'},
633
+ RACK => {:type => ::Thrift::Types::STRING, :name => 'rack', :optional => true}
634
+ }
635
+
636
+ def struct_fields; FIELDS; end
637
+
638
+ def validate
639
+ end
640
+
641
+ ::Thrift::Struct.generate_accessors self
642
+ end
643
+
644
+ # A TokenRange describes part of the Cassandra ring, it is a mapping from a range to
645
+ # endpoints responsible for that range.
646
+ # @param start_token The first token in the range
647
+ # @param end_token The last token in the range
648
+ # @param endpoints The endpoints responsible for the range (listed by their configured listen_address)
649
+ # @param rpc_endpoints The endpoints responsible for the range (listed by their configured rpc_address)
650
+ class TokenRange
651
+ include ::Thrift::Struct, ::Thrift::Struct_Union
652
+ START_TOKEN = 1
653
+ END_TOKEN = 2
654
+ ENDPOINTS = 3
655
+ RPC_ENDPOINTS = 4
656
+ ENDPOINT_DETAILS = 5
657
+
658
+ FIELDS = {
659
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
660
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
661
+ ENDPOINTS => {:type => ::Thrift::Types::LIST, :name => 'endpoints', :element => {:type => ::Thrift::Types::STRING}},
662
+ RPC_ENDPOINTS => {:type => ::Thrift::Types::LIST, :name => 'rpc_endpoints', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
663
+ ENDPOINT_DETAILS => {:type => ::Thrift::Types::LIST, :name => 'endpoint_details', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::EndpointDetails}, :optional => true}
664
+ }
665
+
666
+ def struct_fields; FIELDS; end
667
+
668
+ def validate
669
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
670
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
671
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field endpoints is unset!') unless @endpoints
672
+ end
673
+
674
+ ::Thrift::Struct.generate_accessors self
675
+ end
676
+
677
+ # Authentication requests can contain any data, dependent on the IAuthenticator used
678
+ class AuthenticationRequest
679
+ include ::Thrift::Struct, ::Thrift::Struct_Union
680
+ CREDENTIALS = 1
681
+
682
+ FIELDS = {
683
+ CREDENTIALS => {:type => ::Thrift::Types::MAP, :name => 'credentials', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}}
684
+ }
685
+
686
+ def struct_fields; FIELDS; end
687
+
688
+ def validate
689
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field credentials is unset!') unless @credentials
690
+ end
691
+
692
+ ::Thrift::Struct.generate_accessors self
693
+ end
694
+
695
+ class ColumnDef
696
+ include ::Thrift::Struct, ::Thrift::Struct_Union
697
+ NAME = 1
698
+ VALIDATION_CLASS = 2
699
+ INDEX_TYPE = 3
700
+ INDEX_NAME = 4
701
+ INDEX_OPTIONS = 5
702
+
703
+ FIELDS = {
704
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name', :binary => true},
705
+ VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'validation_class'},
706
+ INDEX_TYPE => {:type => ::Thrift::Types::I32, :name => 'index_type', :optional => true, :enum_class => ::CassandraThrift::IndexType},
707
+ INDEX_NAME => {:type => ::Thrift::Types::STRING, :name => 'index_name', :optional => true},
708
+ INDEX_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'index_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true}
709
+ }
710
+
711
+ def struct_fields; FIELDS; end
712
+
713
+ def validate
714
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
715
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field validation_class is unset!') unless @validation_class
716
+ unless @index_type.nil? || ::CassandraThrift::IndexType::VALID_VALUES.include?(@index_type)
717
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field index_type!')
718
+ end
719
+ end
720
+
721
+ ::Thrift::Struct.generate_accessors self
722
+ end
723
+
724
+ class CfDef
725
+ include ::Thrift::Struct, ::Thrift::Struct_Union
726
+ KEYSPACE = 1
727
+ NAME = 2
728
+ COLUMN_TYPE = 3
729
+ COMPARATOR_TYPE = 5
730
+ SUBCOMPARATOR_TYPE = 6
731
+ COMMENT = 8
732
+ READ_REPAIR_CHANCE = 12
733
+ COLUMN_METADATA = 13
734
+ GC_GRACE_SECONDS = 14
735
+ DEFAULT_VALIDATION_CLASS = 15
736
+ ID = 16
737
+ MIN_COMPACTION_THRESHOLD = 17
738
+ MAX_COMPACTION_THRESHOLD = 18
739
+ REPLICATE_ON_WRITE = 24
740
+ KEY_VALIDATION_CLASS = 26
741
+ KEY_ALIAS = 28
742
+ COMPACTION_STRATEGY = 29
743
+ COMPACTION_STRATEGY_OPTIONS = 30
744
+ COMPRESSION_OPTIONS = 32
745
+ BLOOM_FILTER_FP_CHANCE = 33
746
+ CACHING = 34
747
+ DCLOCAL_READ_REPAIR_CHANCE = 37
748
+ ROW_CACHE_SIZE = 9
749
+ KEY_CACHE_SIZE = 11
750
+ ROW_CACHE_SAVE_PERIOD_IN_SECONDS = 19
751
+ KEY_CACHE_SAVE_PERIOD_IN_SECONDS = 20
752
+ MEMTABLE_FLUSH_AFTER_MINS = 21
753
+ MEMTABLE_THROUGHPUT_IN_MB = 22
754
+ MEMTABLE_OPERATIONS_IN_MILLIONS = 23
755
+ MERGE_SHARDS_CHANCE = 25
756
+ ROW_CACHE_PROVIDER = 27
757
+ ROW_CACHE_KEYS_TO_SAVE = 31
758
+
759
+ FIELDS = {
760
+ KEYSPACE => {:type => ::Thrift::Types::STRING, :name => 'keyspace'},
761
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
762
+ COLUMN_TYPE => {:type => ::Thrift::Types::STRING, :name => 'column_type', :default => %q"Standard", :optional => true},
763
+ COMPARATOR_TYPE => {:type => ::Thrift::Types::STRING, :name => 'comparator_type', :default => %q"BytesType", :optional => true},
764
+ SUBCOMPARATOR_TYPE => {:type => ::Thrift::Types::STRING, :name => 'subcomparator_type', :optional => true},
765
+ COMMENT => {:type => ::Thrift::Types::STRING, :name => 'comment', :optional => true},
766
+ READ_REPAIR_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'read_repair_chance', :optional => true},
767
+ COLUMN_METADATA => {:type => ::Thrift::Types::LIST, :name => 'column_metadata', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::ColumnDef}, :optional => true},
768
+ GC_GRACE_SECONDS => {:type => ::Thrift::Types::I32, :name => 'gc_grace_seconds', :optional => true},
769
+ DEFAULT_VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'default_validation_class', :optional => true},
770
+ ID => {:type => ::Thrift::Types::I32, :name => 'id', :optional => true},
771
+ MIN_COMPACTION_THRESHOLD => {:type => ::Thrift::Types::I32, :name => 'min_compaction_threshold', :optional => true},
772
+ MAX_COMPACTION_THRESHOLD => {:type => ::Thrift::Types::I32, :name => 'max_compaction_threshold', :optional => true},
773
+ REPLICATE_ON_WRITE => {:type => ::Thrift::Types::BOOL, :name => 'replicate_on_write', :optional => true},
774
+ KEY_VALIDATION_CLASS => {:type => ::Thrift::Types::STRING, :name => 'key_validation_class', :optional => true},
775
+ KEY_ALIAS => {:type => ::Thrift::Types::STRING, :name => 'key_alias', :binary => true, :optional => true},
776
+ COMPACTION_STRATEGY => {:type => ::Thrift::Types::STRING, :name => 'compaction_strategy', :optional => true},
777
+ COMPACTION_STRATEGY_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'compaction_strategy_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
778
+ COMPRESSION_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'compression_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
779
+ BLOOM_FILTER_FP_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'bloom_filter_fp_chance', :optional => true},
780
+ CACHING => {:type => ::Thrift::Types::STRING, :name => 'caching', :default => %q"keys_only", :optional => true},
781
+ DCLOCAL_READ_REPAIR_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'dclocal_read_repair_chance', :default => 0, :optional => true},
782
+ # @deprecated
783
+ ROW_CACHE_SIZE => {:type => ::Thrift::Types::DOUBLE, :name => 'row_cache_size', :optional => true},
784
+ # @deprecated
785
+ KEY_CACHE_SIZE => {:type => ::Thrift::Types::DOUBLE, :name => 'key_cache_size', :optional => true},
786
+ # @deprecated
787
+ ROW_CACHE_SAVE_PERIOD_IN_SECONDS => {:type => ::Thrift::Types::I32, :name => 'row_cache_save_period_in_seconds', :optional => true},
788
+ # @deprecated
789
+ KEY_CACHE_SAVE_PERIOD_IN_SECONDS => {:type => ::Thrift::Types::I32, :name => 'key_cache_save_period_in_seconds', :optional => true},
790
+ # @deprecated
791
+ MEMTABLE_FLUSH_AFTER_MINS => {:type => ::Thrift::Types::I32, :name => 'memtable_flush_after_mins', :optional => true},
792
+ # @deprecated
793
+ MEMTABLE_THROUGHPUT_IN_MB => {:type => ::Thrift::Types::I32, :name => 'memtable_throughput_in_mb', :optional => true},
794
+ # @deprecated
795
+ MEMTABLE_OPERATIONS_IN_MILLIONS => {:type => ::Thrift::Types::DOUBLE, :name => 'memtable_operations_in_millions', :optional => true},
796
+ # @deprecated
797
+ MERGE_SHARDS_CHANCE => {:type => ::Thrift::Types::DOUBLE, :name => 'merge_shards_chance', :optional => true},
798
+ # @deprecated
799
+ ROW_CACHE_PROVIDER => {:type => ::Thrift::Types::STRING, :name => 'row_cache_provider', :optional => true},
800
+ # @deprecated
801
+ ROW_CACHE_KEYS_TO_SAVE => {:type => ::Thrift::Types::I32, :name => 'row_cache_keys_to_save', :optional => true}
802
+ }
803
+
804
+ def struct_fields; FIELDS; end
805
+
806
+ def validate
807
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field keyspace is unset!') unless @keyspace
808
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
809
+ end
810
+
811
+ ::Thrift::Struct.generate_accessors self
812
+ end
813
+
814
+ class KsDef
815
+ include ::Thrift::Struct, ::Thrift::Struct_Union
816
+ NAME = 1
817
+ STRATEGY_CLASS = 2
818
+ STRATEGY_OPTIONS = 3
819
+ REPLICATION_FACTOR = 4
820
+ CF_DEFS = 5
821
+ DURABLE_WRITES = 6
822
+
823
+ FIELDS = {
824
+ NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
825
+ STRATEGY_CLASS => {:type => ::Thrift::Types::STRING, :name => 'strategy_class'},
826
+ STRATEGY_OPTIONS => {:type => ::Thrift::Types::MAP, :name => 'strategy_options', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRING}, :optional => true},
827
+ # @deprecated ignored
828
+ REPLICATION_FACTOR => {:type => ::Thrift::Types::I32, :name => 'replication_factor', :optional => true},
829
+ CF_DEFS => {:type => ::Thrift::Types::LIST, :name => 'cf_defs', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::CfDef}},
830
+ DURABLE_WRITES => {:type => ::Thrift::Types::BOOL, :name => 'durable_writes', :default => true, :optional => true}
831
+ }
832
+
833
+ def struct_fields; FIELDS; end
834
+
835
+ def validate
836
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
837
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field strategy_class is unset!') unless @strategy_class
838
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field cf_defs is unset!') unless @cf_defs
839
+ end
840
+
841
+ ::Thrift::Struct.generate_accessors self
842
+ end
843
+
844
+ # Row returned from a CQL query
845
+ class CqlRow
846
+ include ::Thrift::Struct, ::Thrift::Struct_Union
847
+ KEY = 1
848
+ COLUMNS = 2
849
+
850
+ FIELDS = {
851
+ KEY => {:type => ::Thrift::Types::STRING, :name => 'key', :binary => true},
852
+ COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::Column}}
853
+ }
854
+
855
+ def struct_fields; FIELDS; end
856
+
857
+ def validate
858
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
859
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
860
+ end
861
+
862
+ ::Thrift::Struct.generate_accessors self
863
+ end
864
+
865
+ class CqlMetadata
866
+ include ::Thrift::Struct, ::Thrift::Struct_Union
867
+ NAME_TYPES = 1
868
+ VALUE_TYPES = 2
869
+ DEFAULT_NAME_TYPE = 3
870
+ DEFAULT_VALUE_TYPE = 4
871
+
872
+ FIELDS = {
873
+ NAME_TYPES => {:type => ::Thrift::Types::MAP, :name => 'name_types', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING}},
874
+ VALUE_TYPES => {:type => ::Thrift::Types::MAP, :name => 'value_types', :key => {:type => ::Thrift::Types::STRING, :binary => true}, :value => {:type => ::Thrift::Types::STRING}},
875
+ DEFAULT_NAME_TYPE => {:type => ::Thrift::Types::STRING, :name => 'default_name_type'},
876
+ DEFAULT_VALUE_TYPE => {:type => ::Thrift::Types::STRING, :name => 'default_value_type'}
877
+ }
878
+
879
+ def struct_fields; FIELDS; end
880
+
881
+ def validate
882
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name_types is unset!') unless @name_types
883
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value_types is unset!') unless @value_types
884
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field default_name_type is unset!') unless @default_name_type
885
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field default_value_type is unset!') unless @default_value_type
886
+ end
887
+
888
+ ::Thrift::Struct.generate_accessors self
889
+ end
890
+
891
+ class CqlResult
892
+ include ::Thrift::Struct, ::Thrift::Struct_Union
893
+ TYPE = 1
894
+ ROWS = 2
895
+ NUM = 3
896
+ SCHEMA = 4
897
+
898
+ FIELDS = {
899
+ TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::CassandraThrift::CqlResultType},
900
+ ROWS => {:type => ::Thrift::Types::LIST, :name => 'rows', :element => {:type => ::Thrift::Types::STRUCT, :class => ::CassandraThrift::CqlRow}, :optional => true},
901
+ NUM => {:type => ::Thrift::Types::I32, :name => 'num', :optional => true},
902
+ SCHEMA => {:type => ::Thrift::Types::STRUCT, :name => 'schema', :class => ::CassandraThrift::CqlMetadata, :optional => true}
903
+ }
904
+
905
+ def struct_fields; FIELDS; end
906
+
907
+ def validate
908
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
909
+ unless @type.nil? || ::CassandraThrift::CqlResultType::VALID_VALUES.include?(@type)
910
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
911
+ end
912
+ end
913
+
914
+ ::Thrift::Struct.generate_accessors self
915
+ end
916
+
917
+ class CqlPreparedResult
918
+ include ::Thrift::Struct, ::Thrift::Struct_Union
919
+ ITEMID = 1
920
+ COUNT = 2
921
+ VARIABLE_TYPES = 3
922
+ VARIABLE_NAMES = 4
923
+
924
+ FIELDS = {
925
+ ITEMID => {:type => ::Thrift::Types::I32, :name => 'itemId'},
926
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count'},
927
+ VARIABLE_TYPES => {:type => ::Thrift::Types::LIST, :name => 'variable_types', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
928
+ VARIABLE_NAMES => {:type => ::Thrift::Types::LIST, :name => 'variable_names', :element => {:type => ::Thrift::Types::STRING}, :optional => true}
929
+ }
930
+
931
+ def struct_fields; FIELDS; end
932
+
933
+ def validate
934
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field itemId is unset!') unless @itemId
935
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
936
+ end
937
+
938
+ ::Thrift::Struct.generate_accessors self
939
+ end
940
+
941
+ # Represents input splits used by hadoop ColumnFamilyRecordReaders
942
+ class CfSplit
943
+ include ::Thrift::Struct, ::Thrift::Struct_Union
944
+ START_TOKEN = 1
945
+ END_TOKEN = 2
946
+ ROW_COUNT = 3
947
+
948
+ FIELDS = {
949
+ START_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'start_token'},
950
+ END_TOKEN => {:type => ::Thrift::Types::STRING, :name => 'end_token'},
951
+ ROW_COUNT => {:type => ::Thrift::Types::I64, :name => 'row_count'}
952
+ }
953
+
954
+ def struct_fields; FIELDS; end
955
+
956
+ def validate
957
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start_token is unset!') unless @start_token
958
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field end_token is unset!') unless @end_token
959
+ raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field row_count is unset!') unless @row_count
960
+ end
961
+
962
+ ::Thrift::Struct.generate_accessors self
963
+ end
964
+
965
+ end