cassandra 0.5.6 → 0.5.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +3 -2
- data/CHANGELOG +28 -0
- data/LICENSE +202 -0
- data/Manifest +28 -0
- data/README +65 -0
- data/bin/cassandra_helper +16 -0
- data/cassandra.gemspec +5 -2
- data/conf/cassandra.in.sh +51 -0
- data/conf/log4j.properties +38 -0
- data/conf/storage-conf.xml +226 -0
- data/lib/cassandra.rb +23 -0
- data/lib/cassandra/array.rb +8 -0
- data/lib/cassandra/cassandra.rb +306 -0
- data/lib/cassandra/columns.rb +101 -0
- data/lib/cassandra/comparable.rb +28 -0
- data/lib/cassandra/constants.rb +12 -0
- data/lib/cassandra/debug.rb +7 -0
- data/lib/cassandra/long.rb +58 -0
- data/lib/cassandra/ordered_hash.rb +135 -0
- data/lib/cassandra/protocol.rb +72 -0
- data/lib/cassandra/safe_client.rb +26 -0
- data/lib/cassandra/time.rb +11 -0
- data/lib/cassandra/uuid.rb +111 -0
- data/vendor/gen-rb/cassandra.rb +853 -0
- data/vendor/gen-rb/cassandra_constants.rb +10 -0
- data/vendor/gen-rb/cassandra_types.rb +238 -0
- metadata +49 -6
- metadata.gz.sig +0 -0
@@ -0,0 +1,238 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
|
8
|
+
module CassandraThrift
|
9
|
+
module ConsistencyLevel
|
10
|
+
ZERO = 0
|
11
|
+
ONE = 1
|
12
|
+
QUORUM = 2
|
13
|
+
ALL = 3
|
14
|
+
VALUE_MAP = {0 => "ZERO", 1 => "ONE", 2 => "QUORUM", 3 => "ALL"}
|
15
|
+
VALID_VALUES = Set.new([ZERO, ONE, QUORUM, ALL]).freeze
|
16
|
+
end
|
17
|
+
|
18
|
+
class Column
|
19
|
+
include ::Thrift::Struct
|
20
|
+
NAME = 1
|
21
|
+
VALUE = 2
|
22
|
+
TIMESTAMP = 3
|
23
|
+
|
24
|
+
::Thrift::Struct.field_accessor self, :name, :value, :timestamp
|
25
|
+
FIELDS = {
|
26
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
27
|
+
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'},
|
28
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'}
|
29
|
+
}
|
30
|
+
|
31
|
+
def struct_fields; FIELDS; end
|
32
|
+
|
33
|
+
def validate
|
34
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
|
35
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field value is unset!') unless @value
|
36
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field timestamp is unset!') unless @timestamp
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
class SuperColumn
|
42
|
+
include ::Thrift::Struct
|
43
|
+
NAME = 1
|
44
|
+
COLUMNS = 2
|
45
|
+
|
46
|
+
::Thrift::Struct.field_accessor self, :name, :columns
|
47
|
+
FIELDS = {
|
48
|
+
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
49
|
+
COLUMNS => {:type => ::Thrift::Types::LIST, :name => 'columns', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::Column}}
|
50
|
+
}
|
51
|
+
|
52
|
+
def struct_fields; FIELDS; end
|
53
|
+
|
54
|
+
def validate
|
55
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field name is unset!') unless @name
|
56
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field columns is unset!') unless @columns
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
class ColumnOrSuperColumn
|
62
|
+
include ::Thrift::Struct
|
63
|
+
COLUMN = 1
|
64
|
+
SUPER_COLUMN = 2
|
65
|
+
|
66
|
+
::Thrift::Struct.field_accessor self, :column, :super_column
|
67
|
+
FIELDS = {
|
68
|
+
COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => CassandraThrift::Column, :optional => true},
|
69
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'super_column', :class => CassandraThrift::SuperColumn, :optional => true}
|
70
|
+
}
|
71
|
+
|
72
|
+
def struct_fields; FIELDS; end
|
73
|
+
|
74
|
+
def validate
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
78
|
+
|
79
|
+
class NotFoundException < ::Thrift::Exception
|
80
|
+
include ::Thrift::Struct
|
81
|
+
|
82
|
+
FIELDS = {
|
83
|
+
|
84
|
+
}
|
85
|
+
|
86
|
+
def struct_fields; FIELDS; end
|
87
|
+
|
88
|
+
def validate
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
|
93
|
+
class InvalidRequestException < ::Thrift::Exception
|
94
|
+
include ::Thrift::Struct
|
95
|
+
def initialize(message=nil)
|
96
|
+
super()
|
97
|
+
self.why = message
|
98
|
+
end
|
99
|
+
|
100
|
+
def message; why end
|
101
|
+
|
102
|
+
WHY = 1
|
103
|
+
|
104
|
+
::Thrift::Struct.field_accessor self, :why
|
105
|
+
FIELDS = {
|
106
|
+
WHY => {:type => ::Thrift::Types::STRING, :name => 'why'}
|
107
|
+
}
|
108
|
+
|
109
|
+
def struct_fields; FIELDS; end
|
110
|
+
|
111
|
+
def validate
|
112
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field why is unset!') unless @why
|
113
|
+
end
|
114
|
+
|
115
|
+
end
|
116
|
+
|
117
|
+
class UnavailableException < ::Thrift::Exception
|
118
|
+
include ::Thrift::Struct
|
119
|
+
|
120
|
+
FIELDS = {
|
121
|
+
|
122
|
+
}
|
123
|
+
|
124
|
+
def struct_fields; FIELDS; end
|
125
|
+
|
126
|
+
def validate
|
127
|
+
end
|
128
|
+
|
129
|
+
end
|
130
|
+
|
131
|
+
class ColumnParent
|
132
|
+
include ::Thrift::Struct
|
133
|
+
COLUMN_FAMILY = 3
|
134
|
+
SUPER_COLUMN = 4
|
135
|
+
|
136
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column
|
137
|
+
FIELDS = {
|
138
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
139
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true}
|
140
|
+
}
|
141
|
+
|
142
|
+
def struct_fields; FIELDS; end
|
143
|
+
|
144
|
+
def validate
|
145
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
|
146
|
+
end
|
147
|
+
|
148
|
+
end
|
149
|
+
|
150
|
+
class ColumnPath
|
151
|
+
include ::Thrift::Struct
|
152
|
+
COLUMN_FAMILY = 3
|
153
|
+
SUPER_COLUMN = 4
|
154
|
+
COLUMN = 5
|
155
|
+
TIMESTAMP = 6
|
156
|
+
|
157
|
+
::Thrift::Struct.field_accessor self, :column_family, :super_column, :column, :timestamp
|
158
|
+
FIELDS = {
|
159
|
+
COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
|
160
|
+
SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
|
161
|
+
COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :optional => true},
|
162
|
+
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp', :optional => true}
|
163
|
+
}
|
164
|
+
|
165
|
+
def struct_fields; FIELDS; end
|
166
|
+
|
167
|
+
def validate
|
168
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field column_family is unset!') unless @column_family
|
169
|
+
end
|
170
|
+
|
171
|
+
end
|
172
|
+
|
173
|
+
class SliceRange
|
174
|
+
include ::Thrift::Struct
|
175
|
+
START = 1
|
176
|
+
FINISH = 2
|
177
|
+
REVERSED = 3
|
178
|
+
COUNT = 4
|
179
|
+
|
180
|
+
::Thrift::Struct.field_accessor self, :start, :finish, :reversed, :count
|
181
|
+
FIELDS = {
|
182
|
+
START => {:type => ::Thrift::Types::STRING, :name => 'start'},
|
183
|
+
FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
|
184
|
+
REVERSED => {:type => ::Thrift::Types::BOOL, :name => 'reversed', :default => false},
|
185
|
+
COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
|
186
|
+
}
|
187
|
+
|
188
|
+
def struct_fields; FIELDS; end
|
189
|
+
|
190
|
+
def validate
|
191
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field start is unset!') unless @start
|
192
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field finish is unset!') unless @finish
|
193
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field reversed is unset!') if @reversed.nil?
|
194
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field count is unset!') unless @count
|
195
|
+
end
|
196
|
+
|
197
|
+
end
|
198
|
+
|
199
|
+
class SlicePredicate
|
200
|
+
include ::Thrift::Struct
|
201
|
+
COLUMN_NAMES = 1
|
202
|
+
SLICE_RANGE = 2
|
203
|
+
|
204
|
+
::Thrift::Struct.field_accessor self, :column_names, :slice_range
|
205
|
+
FIELDS = {
|
206
|
+
COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
|
207
|
+
SLICE_RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'slice_range', :class => CassandraThrift::SliceRange, :optional => true}
|
208
|
+
}
|
209
|
+
|
210
|
+
def struct_fields; FIELDS; end
|
211
|
+
|
212
|
+
def validate
|
213
|
+
end
|
214
|
+
|
215
|
+
end
|
216
|
+
|
217
|
+
class BatchMutation
|
218
|
+
include ::Thrift::Struct
|
219
|
+
KEY = 1
|
220
|
+
CFMAP = 2
|
221
|
+
COLUMN_PATHS = 3
|
222
|
+
|
223
|
+
::Thrift::Struct.field_accessor self, :key, :cfmap, :column_paths
|
224
|
+
FIELDS = {
|
225
|
+
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
226
|
+
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}}, :optional => true},
|
227
|
+
COLUMN_PATHS => {:type => ::Thrift::Types::LIST, :name => 'column_paths', :element => {:type => ::Thrift::Types::STRUCT, :class => CassandraThrift::ColumnPath}, :optional => true}
|
228
|
+
}
|
229
|
+
|
230
|
+
def struct_fields; FIELDS; end
|
231
|
+
|
232
|
+
def validate
|
233
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field key is unset!') unless @key
|
234
|
+
end
|
235
|
+
|
236
|
+
end
|
237
|
+
|
238
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cassandra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.6
|
4
|
+
version: 0.5.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Weaver
|
@@ -55,15 +55,58 @@ dependencies:
|
|
55
55
|
version:
|
56
56
|
description: A Ruby client for the Cassandra distributed database.
|
57
57
|
email: ""
|
58
|
-
executables:
|
59
|
-
|
58
|
+
executables:
|
59
|
+
- cassandra_helper
|
60
60
|
extensions: []
|
61
61
|
|
62
|
-
extra_rdoc_files:
|
63
|
-
|
62
|
+
extra_rdoc_files:
|
63
|
+
- CHANGELOG
|
64
|
+
- LICENSE
|
65
|
+
- README
|
66
|
+
- bin/cassandra_helper
|
67
|
+
- lib/cassandra.rb
|
68
|
+
- lib/cassandra/array.rb
|
69
|
+
- lib/cassandra/cassandra.rb
|
70
|
+
- lib/cassandra/columns.rb
|
71
|
+
- lib/cassandra/comparable.rb
|
72
|
+
- lib/cassandra/constants.rb
|
73
|
+
- lib/cassandra/debug.rb
|
74
|
+
- lib/cassandra/long.rb
|
75
|
+
- lib/cassandra/ordered_hash.rb
|
76
|
+
- lib/cassandra/protocol.rb
|
77
|
+
- lib/cassandra/safe_client.rb
|
78
|
+
- lib/cassandra/time.rb
|
79
|
+
- lib/cassandra/uuid.rb
|
64
80
|
files:
|
65
|
-
-
|
81
|
+
- CHANGELOG
|
82
|
+
- LICENSE
|
83
|
+
- Manifest
|
84
|
+
- README
|
66
85
|
- Rakefile
|
86
|
+
- bin/cassandra_helper
|
87
|
+
- conf/cassandra.in.sh
|
88
|
+
- conf/log4j.properties
|
89
|
+
- conf/storage-conf.xml
|
90
|
+
- lib/cassandra.rb
|
91
|
+
- lib/cassandra/array.rb
|
92
|
+
- lib/cassandra/cassandra.rb
|
93
|
+
- lib/cassandra/columns.rb
|
94
|
+
- lib/cassandra/comparable.rb
|
95
|
+
- lib/cassandra/constants.rb
|
96
|
+
- lib/cassandra/debug.rb
|
97
|
+
- lib/cassandra/long.rb
|
98
|
+
- lib/cassandra/ordered_hash.rb
|
99
|
+
- lib/cassandra/protocol.rb
|
100
|
+
- lib/cassandra/safe_client.rb
|
101
|
+
- lib/cassandra/time.rb
|
102
|
+
- lib/cassandra/uuid.rb
|
103
|
+
- test/cassandra_test.rb
|
104
|
+
- test/comparable_types_test.rb
|
105
|
+
- test/test_helper.rb
|
106
|
+
- vendor/gen-rb/cassandra.rb
|
107
|
+
- vendor/gen-rb/cassandra_constants.rb
|
108
|
+
- vendor/gen-rb/cassandra_types.rb
|
109
|
+
- cassandra.gemspec
|
67
110
|
has_rdoc: true
|
68
111
|
homepage: http://blog.evanweaver.com/files/doc/fauna/cassandra/
|
69
112
|
licenses: []
|
metadata.gz.sig
CHANGED
Binary file
|