cassandra 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -188,7 +188,7 @@ module CassandraThrift
188
188
  FIELDS = {
189
189
  COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
190
190
  SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
191
- COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column'}
191
+ COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :optional => true}
192
192
  }
193
193
 
194
194
  def struct_fields; FIELDS; end
@@ -198,15 +198,19 @@ module CassandraThrift
198
198
 
199
199
  end
200
200
 
201
- class SuperColumnPath
201
+ class SliceRange
202
202
  include ::Thrift::Struct
203
- COLUMN_FAMILY = 3
204
- SUPER_COLUMN = 4
203
+ START = 1
204
+ FINISH = 2
205
+ IS_ASCENDING = 3
206
+ COUNT = 4
205
207
 
206
- ::Thrift::Struct.field_accessor self, :column_family, :super_column
208
+ ::Thrift::Struct.field_accessor self, :start, :finish, :is_ascending, :count
207
209
  FIELDS = {
208
- COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
209
- SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column'}
210
+ START => {:type => ::Thrift::Types::STRING, :name => 'start'},
211
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
212
+ IS_ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'is_ascending', :default => true},
213
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
210
214
  }
211
215
 
212
216
  def struct_fields; FIELDS; end
@@ -216,17 +220,33 @@ module CassandraThrift
216
220
 
217
221
  end
218
222
 
219
- class ColumnPathOrParent
223
+ class SlicePredicate
220
224
  include ::Thrift::Struct
221
- COLUMN_FAMILY = 3
222
- SUPER_COLUMN = 4
223
- COLUMN = 5
225
+ COLUMN_NAMES = 1
226
+ SLICE_RANGE = 2
224
227
 
225
- ::Thrift::Struct.field_accessor self, :column_family, :super_column, :column
228
+ ::Thrift::Struct.field_accessor self, :column_names, :slice_range
226
229
  FIELDS = {
227
- COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
228
- SUPER_COLUMN => {:type => ::Thrift::Types::STRING, :name => 'super_column', :optional => true},
229
- COLUMN => {:type => ::Thrift::Types::STRING, :name => 'column', :optional => true}
230
+ COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING}, :optional => true},
231
+ SLICE_RANGE => {:type => ::Thrift::Types::STRUCT, :name => 'slice_range', :class => CassandraThrift::SliceRange, :optional => true}
232
+ }
233
+
234
+ def struct_fields; FIELDS; end
235
+
236
+ def validate
237
+ end
238
+
239
+ end
240
+
241
+ class ColumnOrSuperColumn
242
+ include ::Thrift::Struct
243
+ COLUMN = 1
244
+ SUPER_COLUMN = 2
245
+
246
+ ::Thrift::Struct.field_accessor self, :column, :super_column
247
+ FIELDS = {
248
+ COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'column', :class => CassandraThrift::Column, :optional => true},
249
+ SUPER_COLUMN => {:type => ::Thrift::Types::STRUCT, :name => 'super_column', :class => CassandraThrift::SuperColumn, :optional => true}
230
250
  }
231
251
 
232
252
  def struct_fields; FIELDS; 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.4"
4
+ version: "0.5"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
@@ -30,7 +30,7 @@ cert_chain:
30
30
  yZ0=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-07-30 00:00:00 -07:00
33
+ date: 2009-08-18 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
@@ -43,7 +43,17 @@ dependencies:
43
43
  - !ruby/object:Gem::Version
44
44
  version: "0"
45
45
  version:
46
- description: A Ruby client for CassandraDB.
46
+ - !ruby/object:Gem::Dependency
47
+ name: thrift
48
+ type: :runtime
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
56
+ description: A Ruby client for the Cassandra distributed database.
47
57
  email: ""
48
58
  executables: []
49
59
 
@@ -53,20 +63,18 @@ extra_rdoc_files:
53
63
  - CHANGELOG
54
64
  - lib/cassandra/array.rb
55
65
  - lib/cassandra/cassandra.rb
66
+ - lib/cassandra/columns.rb
56
67
  - lib/cassandra/comparable.rb
57
68
  - lib/cassandra/constants.rb
58
- - lib/cassandra/helper.rb
59
69
  - lib/cassandra/long.rb
60
70
  - lib/cassandra/ordered_hash.rb
71
+ - lib/cassandra/protocol.rb
61
72
  - lib/cassandra/safe_client.rb
62
- - lib/cassandra/serialization.rb
63
73
  - lib/cassandra/time.rb
64
74
  - lib/cassandra/uuid.rb
65
75
  - lib/cassandra.rb
66
76
  - LICENSE
67
77
  - README
68
- - vendor/gen-rb/cassandra_constants.rb
69
- - vendor/gen-rb/cassandra_types.rb
70
78
  files:
71
79
  - CHANGELOG
72
80
  - conf/cassandra.in.sh
@@ -74,23 +82,23 @@ files:
74
82
  - conf/storage-conf.xml
75
83
  - lib/cassandra/array.rb
76
84
  - lib/cassandra/cassandra.rb
85
+ - lib/cassandra/columns.rb
77
86
  - lib/cassandra/comparable.rb
78
87
  - lib/cassandra/constants.rb
79
- - lib/cassandra/helper.rb
80
88
  - lib/cassandra/long.rb
81
89
  - lib/cassandra/ordered_hash.rb
90
+ - lib/cassandra/protocol.rb
82
91
  - lib/cassandra/safe_client.rb
83
- - lib/cassandra/serialization.rb
84
92
  - lib/cassandra/time.rb
85
93
  - lib/cassandra/uuid.rb
86
94
  - lib/cassandra.rb
87
95
  - LICENSE
88
96
  - Manifest
89
- - quickstart.sh
90
97
  - Rakefile
91
98
  - README
92
- - test/cassandra_client_test.rb
99
+ - test/cassandra_test.rb
93
100
  - test/comparable_types_test.rb
101
+ - test/test_helper.rb
94
102
  - vendor/gen-rb/cassandra.rb
95
103
  - vendor/gen-rb/cassandra_constants.rb
96
104
  - vendor/gen-rb/cassandra_types.rb
@@ -127,7 +135,8 @@ rubyforge_project: fauna
127
135
  rubygems_version: 1.3.4
128
136
  signing_key:
129
137
  specification_version: 3
130
- summary: A Ruby client for CassandraDB.
138
+ summary: A Ruby client for the Cassandra distributed database.
131
139
  test_files:
132
- - test/cassandra_client_test.rb
140
+ - test/cassandra_test.rb
133
141
  - test/comparable_types_test.rb
142
+ - test/test_helper.rb
metadata.gz.sig CHANGED
Binary file
@@ -1,57 +0,0 @@
1
-
2
- class Cassandra
3
- module Serialization
4
- module String
5
- def self.dump(object);
6
- object.to_s
7
- end
8
-
9
- def self.load(object)
10
- object
11
- end
12
- end
13
-
14
- module Marshal
15
- def self.dump(object)
16
- ::Marshal.dump(object)
17
- end
18
-
19
- def self.load(object)
20
- ::Marshal.load(object)
21
- end
22
- end
23
-
24
- module JSON
25
- def self.dump(object)
26
- ::JSON.dump(object)
27
- end
28
-
29
- begin
30
- require 'yajl/json_gem'
31
- def self.load(object)
32
- ::JSON.load(object)
33
- end
34
- rescue LoadError
35
- require 'json/ext'
36
- def self.load(object)
37
- ::JSON.load("[#{object}]").first # :-(
38
- end
39
- end
40
- end
41
-
42
- module CompressedJSON
43
- def self.dump(object)
44
- Zlib::Deflate.deflate(JSON.dump(object))
45
- end
46
-
47
- def self.load(object)
48
- JSON.load(Zlib::Inflate.inflate(object))
49
- end
50
- end
51
-
52
- # module Avro
53
- # # Someday!
54
- # end
55
- end
56
- end
57
-
@@ -1,12 +0,0 @@
1
-
2
- if [ ! -e cassandra ]; then
3
- rm -rf data
4
- cd vendor
5
- tar xjf cassandra.tar.bz2
6
- mv cassandra ..
7
- cd ../cassandra
8
- ant
9
- cd ..
10
- fi
11
-
12
- env CASSANDRA_INCLUDE=`pwd`/conf/cassandra.in.sh cassandra/bin/cassandra -f