cassandra_client 0.2.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1,2 +1 @@
1
- "-a�����cR��W�9�uKKJ���%�l��6ى0�H��^�#jݸRu�Y%�XFro߰>|�5��~4�`��䖘�����O�e�)�D$�*�Uz1GG��dzg����-J�}-�$Y�u1�b���U��1�ؤ,"�#�3AGT ��Y��?=���Ii�e?��ȅs�hiqy���BjDG���7���LȘ�uMw L5)��T�T3ڹ-
2
- �:q�o
1
+ |��{Py3���5��dB�w������c���fe`�.k��)��5V���ˀ$�avzD�����|1��^`+�9Nj��!�P�!Z68bw9Ps��ls�vEjr�ΓV7��Qn�v8E1U��md�Yܕ|9��
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v0.3. Use new Thrift API.
3
+
2
4
  v0.2.2. Use nil for empty byte array, not empty string. Improves API.
3
5
 
4
6
  v0.2.1. Don't write serialization overhead on nulls.
data/README CHANGED
@@ -19,7 +19,7 @@ The public certificate for this gem is here[http://rubyforge.org/frs/download.ph
19
19
 
20
20
  This is an alpha release and does not yet support the full Thrift API.
21
21
 
22
- Cassandra is a rapidly moving target; this library is currently tested against {Cassandra trunk revision 789419}[http://blog.evanweaver.com/files/cassandra/cassandra-r789419.tar.bz2].
22
+ Cassandra is a rapidly moving target, but this library should always run against the bundle available {here}[http://github.com/fauna/cassandra_client/raw/6546d1155b77ca7bc5ebf58bdcce79ddda36f611/vendor/cassandra.tar.bz2]. Don't expect it to work against any other version right now.
23
23
 
24
24
  The Github source repository is {here}[http://github.com/fauna/cassandra_client/]; patches and contributions are very welcome.
25
25
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{cassandra_client}
5
- s.version = "0.2.2"
5
+ s.version = "0.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0.8") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Evan Weaver"]
9
9
  s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
- s.date = %q{2009-07-06}
10
+ s.date = %q{2009-07-16}
11
11
  s.description = %q{A Ruby client for CassandraDB.}
12
12
  s.email = %q{}
13
13
  s.extra_rdoc_files = ["CHANGELOG", "lib/cassandra_client/cassandra_client.rb", "lib/cassandra_client/helper.rb", "lib/cassandra_client/ordered_hash.rb", "lib/cassandra_client/safe_client.rb", "lib/cassandra_client/serialization.rb", "lib/cassandra_client.rb", "LICENSE", "README", "vendor/gen-rb/cassandra_constants.rb", "vendor/gen-rb/cassandra_types.rb"]
@@ -15,10 +15,10 @@
15
15
  # limitations under the License.
16
16
 
17
17
 
18
- cassandra_home=`dirname $0`/..
18
+ cassandra_home=`pwd`/cassandra
19
19
 
20
20
  # The directory where Cassandra's configs live (required)
21
- CASSANDRA_CONF=$cassandra_home/../conf
21
+ CASSANDRA_CONF=`pwd`/conf
22
22
 
23
23
  # This can be the path to a jar file, or a directory containing the
24
24
  # compiled classes. NOTE: This isn't needed by the startup script,
@@ -33,6 +33,8 @@ for jar in $cassandra_home/lib/*.jar; do
33
33
  CLASSPATH=$CLASSPATH:$jar
34
34
  done
35
35
 
36
+ echo $cassandra_home
37
+
36
38
  # Arguments to pass to the JVM
37
39
  JVM_OPTS=" \
38
40
  -ea \
@@ -30,16 +30,18 @@
30
30
  -->
31
31
  <Tables>
32
32
  <Table Name="Twitter">
33
+ <KeysCachedFraction>0.01</KeysCachedFraction>
33
34
  <ColumnFamily ColumnSort="Name" Name="Users" />
34
35
  <ColumnFamily ColumnSort="Name" Name="UserAudits" />
35
- <ColumnFamily ColumnType="Super" ColumnSort="Name" Name="UserRelationships" />
36
+ <ColumnFamily ColumnType="Super" Name="UserRelationships" />
36
37
  <ColumnFamily ColumnSort="Time" Name="Usernames" />
37
38
  <ColumnFamily ColumnSort="Time" Name="Statuses" />
38
39
  <ColumnFamily ColumnSort="Name" Name="StatusAudits" />
39
- <ColumnFamily ColumnType="Super" ColumnSort="Name" Name="StatusRelationships" />
40
+ <ColumnFamily ColumnType="Super" Name="StatusRelationships" />
40
41
  </Table>
41
42
 
42
43
  <Table Name="Multiblog">
44
+ <KeysCachedFraction>0.01</KeysCachedFraction>
43
45
  <ColumnFamily ColumnSort="Time" Name="Blogs"/>
44
46
  <ColumnFamily ColumnSort="Time" Name="Comments"/>
45
47
  </Table>
@@ -39,27 +39,17 @@ class CassandraClient
39
39
  # Insert a row for a key. Pass a flat hash for a regular column family, and
40
40
  # a nested hash for a super column family.
41
41
  def insert(column_family, key, hash, timestamp = now)
42
- column_family = column_family.to_s
43
- insert = is_super(column_family) ? :insert_super : :insert_standard
44
- send(insert, column_family, key, hash, timestamp)
45
- end
46
-
47
- private
48
-
49
- def insert_standard(column_family, key, hash, timestamp = now)
50
- mutation = Batch_mutation_t.new(
51
- :table => @keyspace,
52
- :key => key,
53
- :cfmap => {column_family => hash_to_columns(hash, timestamp)})
54
- @client.batch_insert(mutation, @quorum)
55
- end
56
-
57
- def insert_super(column_family, key, hash, timestamp = now)
58
- mutation = Batch_mutation_super_t.new(
59
- :table => @keyspace,
60
- :key => key,
61
- :cfmap => {column_family => hash_to_super_columns(hash, timestamp)})
62
- @client.batch_insert_superColumn(mutation, @quorum)
42
+ if is_super(column_family)
43
+ mutation = BatchMutationSuper.new(
44
+ :key => key,
45
+ :cfmap => {column_family.to_s => hash_to_super_columns(hash, timestamp)})
46
+ @client.batch_insert_super_column(@keyspace, mutation, @quorum)
47
+ else
48
+ mutation = BatchMutation.new(
49
+ :key => key,
50
+ :cfmap => {column_family.to_s => hash_to_columns(hash, timestamp)})
51
+ @client.batch_insert(@keyspace, mutation, @quorum)
52
+ end
63
53
  end
64
54
 
65
55
  public
@@ -69,10 +59,10 @@ class CassandraClient
69
59
  # Remove the element at the column_family:key:super_column:column
70
60
  # path you request.
71
61
  def remove(column_family, key, super_column = nil, column = nil, timestamp = now)
72
- column_family = column_family.to_s
73
- column_family += ":#{super_column}" if super_column
74
- column_family += ":#{column}" if column
75
- @client.remove(@keyspace, key, column_family, timestamp, @quorum)
62
+ super_column, column = column, super_column unless is_super(column_family)
63
+ @client.remove(@keyspace, key,
64
+ ColumnPathOrParent.new(:column_family => column_family.to_s, :super_column => super_column, :column => column),
65
+ timestamp, @quorum)
76
66
  end
77
67
 
78
68
  # Remove all rows in the column family you request.
@@ -94,59 +84,53 @@ class CassandraClient
94
84
  # Count the elements at the column_family:key:super_column path you
95
85
  # request.
96
86
  def count_columns(column_family, key, super_column = nil)
97
- column_family = column_family.to_s
98
- column_family += ":#{super_column}" if super_column
99
- @client.get_column_count(@keyspace, key, column_family)
87
+ @client.get_column_count(@keyspace, key,
88
+ ColumnParent.new(:column_family => column_family.to_s, :super_column => super_column)
89
+ )
100
90
  end
101
91
 
102
92
  # Return a list of single values for the elements at the
103
93
  # column_family:key:super_column:column path you request.
104
94
  def get_columns(column_family, key, super_columns, columns = nil)
105
- column_family = column_family.to_s
106
- get_slice_by_names = (is_super(column_family) && !columns) ? :get_slice_super_by_names : :get_slice_by_names
107
- if super_columns and columns
108
- column_family += ":#{super_columns}"
109
- columns = Array(columns)
95
+ super_columns, columns = columns, super_columns unless columns
96
+ result = if is_super(column_family) && !super_columns
97
+ columns_to_hash(@client.get_slice_super_by_names(@keyspace, key, column_family.to_s, columns))
110
98
  else
111
- columns = Array(super_columns)
112
- end
113
-
114
- hash = columns_to_hash(@client.send(get_slice_by_names, @keyspace, key, column_family, columns))
115
- columns.map { |column| hash[column] }
99
+ columns_to_hash(@client.get_slice_by_names(@keyspace, key,
100
+ ColumnParent.new(:column_family => column_family.to_s, :super_column => super_columns), columns))
101
+ end
102
+ columns.map { |name| result[name] }
116
103
  end
117
104
 
118
105
  # Return a hash (actually, a CassandraClient::OrderedHash) or a single value
119
106
  # representing the element at the column_family:key:super_column:column
120
107
  # path you request.
121
- def get(column_family, key, super_column = nil, column = nil, offset = -1, limit = 100)
122
- column_family = column_family.to_s
123
- column_family += ":#{super_column}" if super_column
124
- column_family += ":#{column}" if column
125
-
108
+ def get(column_family, key, super_column = nil, column = nil, limit = 100)
126
109
  # You have got to be kidding
127
110
  if is_super(column_family)
128
111
  if column
129
- load(@client.get_column(@keyspace, key, column_family).value)
112
+ load(@client.get_column(@keyspace, key, ColumnPath.new(:column_family => column_family.to_s, :super_column => super_column, :column => column)).value)
130
113
  elsif super_column
131
- columns_to_hash(@client.get_superColumn(@keyspace, key, column_family).columns)
114
+ columns_to_hash(@client.get_super_column(@keyspace, key, SuperColumnPath.new(:column_family => column_family.to_s, :super_column => super_column)).columns)
132
115
  else
133
- columns_to_hash(@client.get_slice_super(@keyspace, key, "#{column_family}:", offset, limit))
116
+ # FIXME bug
117
+ columns_to_hash(@client.get_slice_super(@keyspace, key, column_family.to_s, '', '', -1, limit))
134
118
  end
135
119
  else
136
120
  if super_column
137
- load(@client.get_column(@keyspace, key, column_family).value)
121
+ load(@client.get_column(@keyspace, key, ColumnPath.new(:column_family => column_family.to_s, :column => super_column)).value)
138
122
  elsif is_sorted_by_time(column_family)
139
- result = columns_to_hash(@client.get_columns_since(@keyspace, key, column_family, 0))
123
+ result = columns_to_hash(@client.get_columns_since(@keyspace, key, ColumnParent.new(:column_family => column_family.to_s), 0))
140
124
 
141
125
  # FIXME Hack until get_slice on a time-sorted column family works again
142
- result = OrderedHash[*flatten_once(result.to_a[offset, limit])] if offset > -1
126
+ result = OrderedHash[*flatten_once(result.to_a[0, limit])]
143
127
  result
144
128
  else
145
- columns_to_hash(@client.get_slice(@keyspace, key, "#{column_family}:", offset, limit))
129
+ columns_to_hash(@client.get_slice(@keyspace, key, ColumnParent.new(:column_family => column_family.to_s), '', '', -1, limit))
146
130
  end
147
131
  end
148
132
  rescue NotFoundException
149
- is_super(column_family) && !column ? {} : nil
133
+ is_super(column_family) && !column ? OrderedHash.new : nil
150
134
  end
151
135
 
152
136
  # FIXME
@@ -160,8 +144,7 @@ class CassandraClient
160
144
  # Return a list of keys in the column_family you request. Requires the
161
145
  # table to be partitioned with OrderPreservingHash.
162
146
  def get_key_range(column_family, key_range = ''..'', limit = 100)
163
- column_families = Array(column_family).map {|c| c.to_s}
164
- @client.get_key_range(@keyspace, column_families, key_range.begin, key_range.end, limit)
147
+ @client.get_key_range(@keyspace, column_family.to_s, key_range.begin, key_range.end, limit)
165
148
  end
166
149
 
167
150
  # Count all rows in the column_family you request. Requires the table
@@ -4,11 +4,11 @@ class CassandraClient
4
4
  private
5
5
 
6
6
  def is_super(column_family)
7
- column_family_property(column_family, 'type') == 'Super'
7
+ column_family_property(column_family.to_s, 'type') == 'Super'
8
8
  end
9
9
 
10
10
  def is_sorted_by_time(column_family)
11
- column_family_property(column_family, 'sort') == 'Time'
11
+ column_family_property(column_family.to_s, 'sort') == 'Time'
12
12
  end
13
13
 
14
14
  def column_family_property(column_family_or_path, key)
@@ -21,10 +21,10 @@ class CassandraClient
21
21
  def columns_to_hash(columns)
22
22
  hash = ::CassandraClient::OrderedHash.new
23
23
  Array(columns).each do |c|
24
- if c.is_a?(SuperColumn_t)
25
- hash[c.name] = columns_to_hash(c.columns)
24
+ hash[c.name] = if c.is_a?(SuperColumn)
25
+ columns_to_hash(c.columns)
26
26
  else
27
- hash[c.columnName] = load(c.value)
27
+ load(c.value)
28
28
  end
29
29
  end
30
30
  hash
@@ -32,13 +32,13 @@ class CassandraClient
32
32
 
33
33
  def hash_to_columns(hash, timestamp)
34
34
  hash.map do |column, value|
35
- Column_t.new(:columnName => column, :value => dump(value), :timestamp => timestamp)
35
+ Column.new(:name => column, :value => dump(value), :timestamp => timestamp)
36
36
  end
37
37
  end
38
38
 
39
39
  def hash_to_super_columns(hash, timestamp)
40
40
  hash.map do |super_column, columns|
41
- SuperColumn_t.new(:name => super_column, :columns => hash_to_columns(columns, timestamp))
41
+ SuperColumn.new(:name => super_column, :columns => hash_to_columns(columns, timestamp))
42
42
  end
43
43
  end
44
44
 
@@ -1,10 +1,12 @@
1
1
 
2
- if [ ! -e cassandra-r789419 ]; then
2
+ if [ ! -e cassandra ]; then
3
+ rm -rf data
3
4
  cd vendor
4
- tar xjvf cassandra-r789419.tar.bz2
5
- mv cassandra-r789419 ..
5
+ tar xjf cassandra.tar.bz2
6
+ mv cassandra ..
7
+ cd ../cassandra
8
+ ant
6
9
  cd ..
7
10
  fi
8
11
 
9
- export CASSANDRA_INCLUDE=`pwd`/conf/cassandra.in.sh
10
- cassandra-r789419/bin/cassandra -f
12
+ env CASSANDRA_INCLUDE=`pwd`/conf/cassandra.in.sh cassandra/bin/cassandra -f
@@ -58,7 +58,7 @@ class CassandraClientTest < Test::Unit::TestCase
58
58
  def test_get_key_time_sorted_with_limit
59
59
  @twitter.insert(:Statuses, key, {'first' => 'v'})
60
60
  @twitter.insert(:Statuses, key, {'second' => 'v'})
61
- assert_equal({'second' => 'v'}, @twitter.get(:Statuses, key, nil, nil, 0, 1))
61
+ assert_equal({'second' => 'v'}, @twitter.get(:Statuses, key, nil, nil, 1))
62
62
  end
63
63
 
64
64
  def test_get_value
@@ -116,8 +116,11 @@ class CassandraClientTest < Test::Unit::TestCase
116
116
 
117
117
  def test_remove_key
118
118
  @twitter.insert(:Statuses, key, {'body' => 'v'})
119
+ assert_equal({'body' => 'v'}, @twitter.get(:Statuses, key))
120
+
119
121
  @twitter.remove(:Statuses, key)
120
122
  assert_equal({}, @twitter.get(:Statuses, key))
123
+ assert_equal 0, @twitter.count(:Statuses)
121
124
  end
122
125
 
123
126
  def test_remove_value
@@ -143,6 +146,14 @@ class CassandraClientTest < Test::Unit::TestCase
143
146
  @twitter.remove(:StatusRelationships, key, 'user_timelines', '1')
144
147
  assert_nil @twitter.get(:StatusRelationships, key, 'user_timelines', '1')
145
148
  end
149
+
150
+ def test_clear_column_family
151
+ @twitter.insert(:Statuses, key + "1", {'body' => '1'})
152
+ @twitter.insert(:Statuses, key + "2", {'body' => '2'})
153
+ @twitter.insert(:Statuses, key + "3", {'body' => '3'})
154
+ @twitter.clear_column_family!(:Statuses)
155
+ assert_equal 0, @twitter.count(:Statuses)
156
+ end
146
157
 
147
158
  def test_insert_key
148
159
  @twitter.insert(:Statuses, key, {'body' => 'v', 'user' => 'v'})
@@ -156,7 +167,7 @@ class CassandraClientTest < Test::Unit::TestCase
156
167
 
157
168
  def test_get_column_values
158
169
  @twitter.insert(:Statuses, key, {'body' => 'v1', 'user' => 'v2'})
159
- assert_equal(['v1' , 'v2'], @twitter.get_columns(:Statuses, key,['body', 'user']))
170
+ assert_equal(['v1' , 'v2'], @twitter.get_columns(:Statuses, key, ['body', 'user']))
160
171
  end
161
172
 
162
173
  def test_get_column_values_super
@@ -11,30 +11,13 @@ module Cassandra
11
11
  class Client
12
12
  include ::Thrift::Client
13
13
 
14
- def get_slice_by_name_range(tablename, key, columnParent, start, finish, count)
15
- send_get_slice_by_name_range(tablename, key, columnParent, start, finish, count)
16
- return recv_get_slice_by_name_range()
17
- end
18
-
19
- def send_get_slice_by_name_range(tablename, key, columnParent, start, finish, count)
20
- send_message('get_slice_by_name_range', Get_slice_by_name_range_args, :tablename => tablename, :key => key, :columnParent => columnParent, :start => start, :finish => finish, :count => count)
21
- end
22
-
23
- def recv_get_slice_by_name_range()
24
- result = receive_message(Get_slice_by_name_range_result)
25
- return result.success unless result.success.nil?
26
- raise result.ire unless result.ire.nil?
27
- raise result.nfe unless result.nfe.nil?
28
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice_by_name_range failed: unknown result')
29
- end
30
-
31
- def get_slice_by_names(tablename, key, columnParent, columnNames)
32
- send_get_slice_by_names(tablename, key, columnParent, columnNames)
14
+ def get_slice_by_names(table, key, column_parent, column_names)
15
+ send_get_slice_by_names(table, key, column_parent, column_names)
33
16
  return recv_get_slice_by_names()
34
17
  end
35
18
 
36
- def send_get_slice_by_names(tablename, key, columnParent, columnNames)
37
- send_message('get_slice_by_names', Get_slice_by_names_args, :tablename => tablename, :key => key, :columnParent => columnParent, :columnNames => columnNames)
19
+ def send_get_slice_by_names(table, key, column_parent, column_names)
20
+ send_message('get_slice_by_names', Get_slice_by_names_args, :table => table, :key => key, :column_parent => column_parent, :column_names => column_names)
38
21
  end
39
22
 
40
23
  def recv_get_slice_by_names()
@@ -45,13 +28,13 @@ module Cassandra
45
28
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice_by_names failed: unknown result')
46
29
  end
47
30
 
48
- def get_slice(tablename, key, columnParent, isAscending, count)
49
- send_get_slice(tablename, key, columnParent, isAscending, count)
31
+ def get_slice(table, key, column_parent, start, finish, is_ascending, count)
32
+ send_get_slice(table, key, column_parent, start, finish, is_ascending, count)
50
33
  return recv_get_slice()
51
34
  end
52
35
 
53
- def send_get_slice(tablename, key, columnParent, isAscending, count)
54
- send_message('get_slice', Get_slice_args, :tablename => tablename, :key => key, :columnParent => columnParent, :isAscending => isAscending, :count => count)
36
+ def send_get_slice(table, key, column_parent, start, finish, is_ascending, count)
37
+ send_message('get_slice', Get_slice_args, :table => table, :key => key, :column_parent => column_parent, :start => start, :finish => finish, :is_ascending => is_ascending, :count => count)
55
38
  end
56
39
 
57
40
  def recv_get_slice()
@@ -62,13 +45,13 @@ module Cassandra
62
45
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice failed: unknown result')
63
46
  end
64
47
 
65
- def get_column(tablename, key, columnPath)
66
- send_get_column(tablename, key, columnPath)
48
+ def get_column(table, key, column_path)
49
+ send_get_column(table, key, column_path)
67
50
  return recv_get_column()
68
51
  end
69
52
 
70
- def send_get_column(tablename, key, columnPath)
71
- send_message('get_column', Get_column_args, :tablename => tablename, :key => key, :columnPath => columnPath)
53
+ def send_get_column(table, key, column_path)
54
+ send_message('get_column', Get_column_args, :table => table, :key => key, :column_path => column_path)
72
55
  end
73
56
 
74
57
  def recv_get_column()
@@ -79,13 +62,13 @@ module Cassandra
79
62
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_column failed: unknown result')
80
63
  end
81
64
 
82
- def get_column_count(tablename, key, columnParent)
83
- send_get_column_count(tablename, key, columnParent)
65
+ def get_column_count(table, key, column_parent)
66
+ send_get_column_count(table, key, column_parent)
84
67
  return recv_get_column_count()
85
68
  end
86
69
 
87
- def send_get_column_count(tablename, key, columnParent)
88
- send_message('get_column_count', Get_column_count_args, :tablename => tablename, :key => key, :columnParent => columnParent)
70
+ def send_get_column_count(table, key, column_parent)
71
+ send_message('get_column_count', Get_column_count_args, :table => table, :key => key, :column_parent => column_parent)
89
72
  end
90
73
 
91
74
  def recv_get_column_count()
@@ -95,13 +78,13 @@ module Cassandra
95
78
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_column_count failed: unknown result')
96
79
  end
97
80
 
98
- def insert(tablename, key, columnPath, cellData, timestamp, block_for)
99
- send_insert(tablename, key, columnPath, cellData, timestamp, block_for)
81
+ def insert(table, key, column_path, value, timestamp, block_for)
82
+ send_insert(table, key, column_path, value, timestamp, block_for)
100
83
  recv_insert()
101
84
  end
102
85
 
103
- def send_insert(tablename, key, columnPath, cellData, timestamp, block_for)
104
- send_message('insert', Insert_args, :tablename => tablename, :key => key, :columnPath => columnPath, :cellData => cellData, :timestamp => timestamp, :block_for => block_for)
86
+ def send_insert(table, key, column_path, value, timestamp, block_for)
87
+ send_message('insert', Insert_args, :table => table, :key => key, :column_path => column_path, :value => value, :timestamp => timestamp, :block_for => block_for)
105
88
  end
106
89
 
107
90
  def recv_insert()
@@ -111,13 +94,13 @@ module Cassandra
111
94
  return
112
95
  end
113
96
 
114
- def batch_insert(batchMutation, block_for)
115
- send_batch_insert(batchMutation, block_for)
97
+ def batch_insert(table, batch_mutation, block_for)
98
+ send_batch_insert(table, batch_mutation, block_for)
116
99
  recv_batch_insert()
117
100
  end
118
101
 
119
- def send_batch_insert(batchMutation, block_for)
120
- send_message('batch_insert', Batch_insert_args, :batchMutation => batchMutation, :block_for => block_for)
102
+ def send_batch_insert(table, batch_mutation, block_for)
103
+ send_message('batch_insert', Batch_insert_args, :table => table, :batch_mutation => batch_mutation, :block_for => block_for)
121
104
  end
122
105
 
123
106
  def recv_batch_insert()
@@ -127,13 +110,13 @@ module Cassandra
127
110
  return
128
111
  end
129
112
 
130
- def remove(tablename, key, columnPathOrParent, timestamp, block_for)
131
- send_remove(tablename, key, columnPathOrParent, timestamp, block_for)
113
+ def remove(table, key, column_path_or_parent, timestamp, block_for)
114
+ send_remove(table, key, column_path_or_parent, timestamp, block_for)
132
115
  recv_remove()
133
116
  end
134
117
 
135
- def send_remove(tablename, key, columnPathOrParent, timestamp, block_for)
136
- send_message('remove', Remove_args, :tablename => tablename, :key => key, :columnPathOrParent => columnPathOrParent, :timestamp => timestamp, :block_for => block_for)
118
+ def send_remove(table, key, column_path_or_parent, timestamp, block_for)
119
+ send_message('remove', Remove_args, :table => table, :key => key, :column_path_or_parent => column_path_or_parent, :timestamp => timestamp, :block_for => block_for)
137
120
  end
138
121
 
139
122
  def recv_remove()
@@ -143,13 +126,13 @@ module Cassandra
143
126
  return
144
127
  end
145
128
 
146
- def get_columns_since(tablename, key, columnParent, timeStamp)
147
- send_get_columns_since(tablename, key, columnParent, timeStamp)
129
+ def get_columns_since(table, key, column_parent, timeStamp)
130
+ send_get_columns_since(table, key, column_parent, timeStamp)
148
131
  return recv_get_columns_since()
149
132
  end
150
133
 
151
- def send_get_columns_since(tablename, key, columnParent, timeStamp)
152
- send_message('get_columns_since', Get_columns_since_args, :tablename => tablename, :key => key, :columnParent => columnParent, :timeStamp => timeStamp)
134
+ def send_get_columns_since(table, key, column_parent, timeStamp)
135
+ send_message('get_columns_since', Get_columns_since_args, :table => table, :key => key, :column_parent => column_parent, :timeStamp => timeStamp)
153
136
  end
154
137
 
155
138
  def recv_get_columns_since()
@@ -160,13 +143,13 @@ module Cassandra
160
143
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_columns_since failed: unknown result')
161
144
  end
162
145
 
163
- def get_slice_super(tablename, key, columnFamily, isAscending, count)
164
- send_get_slice_super(tablename, key, columnFamily, isAscending, count)
146
+ def get_slice_super(table, key, column_family, start, finish, is_ascending, count)
147
+ send_get_slice_super(table, key, column_family, start, finish, is_ascending, count)
165
148
  return recv_get_slice_super()
166
149
  end
167
150
 
168
- def send_get_slice_super(tablename, key, columnFamily, isAscending, count)
169
- send_message('get_slice_super', Get_slice_super_args, :tablename => tablename, :key => key, :columnFamily => columnFamily, :isAscending => isAscending, :count => count)
151
+ def send_get_slice_super(table, key, column_family, start, finish, is_ascending, count)
152
+ send_message('get_slice_super', Get_slice_super_args, :table => table, :key => key, :column_family => column_family, :start => start, :finish => finish, :is_ascending => is_ascending, :count => count)
170
153
  end
171
154
 
172
155
  def recv_get_slice_super()
@@ -176,13 +159,13 @@ module Cassandra
176
159
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice_super failed: unknown result')
177
160
  end
178
161
 
179
- def get_slice_super_by_names(tablename, key, columnFamily, superColumnNames)
180
- send_get_slice_super_by_names(tablename, key, columnFamily, superColumnNames)
162
+ def get_slice_super_by_names(table, key, column_family, super_column_names)
163
+ send_get_slice_super_by_names(table, key, column_family, super_column_names)
181
164
  return recv_get_slice_super_by_names()
182
165
  end
183
166
 
184
- def send_get_slice_super_by_names(tablename, key, columnFamily, superColumnNames)
185
- send_message('get_slice_super_by_names', Get_slice_super_by_names_args, :tablename => tablename, :key => key, :columnFamily => columnFamily, :superColumnNames => superColumnNames)
167
+ def send_get_slice_super_by_names(table, key, column_family, super_column_names)
168
+ send_message('get_slice_super_by_names', Get_slice_super_by_names_args, :table => table, :key => key, :column_family => column_family, :super_column_names => super_column_names)
186
169
  end
187
170
 
188
171
  def recv_get_slice_super_by_names()
@@ -192,46 +175,46 @@ module Cassandra
192
175
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_slice_super_by_names failed: unknown result')
193
176
  end
194
177
 
195
- def get_superColumn(tablename, key, superColumnPath)
196
- send_get_superColumn(tablename, key, superColumnPath)
197
- return recv_get_superColumn()
178
+ def get_super_column(table, key, super_column_path)
179
+ send_get_super_column(table, key, super_column_path)
180
+ return recv_get_super_column()
198
181
  end
199
182
 
200
- def send_get_superColumn(tablename, key, superColumnPath)
201
- send_message('get_superColumn', Get_superColumn_args, :tablename => tablename, :key => key, :superColumnPath => superColumnPath)
183
+ def send_get_super_column(table, key, super_column_path)
184
+ send_message('get_super_column', Get_super_column_args, :table => table, :key => key, :super_column_path => super_column_path)
202
185
  end
203
186
 
204
- def recv_get_superColumn()
205
- result = receive_message(Get_superColumn_result)
187
+ def recv_get_super_column()
188
+ result = receive_message(Get_super_column_result)
206
189
  return result.success unless result.success.nil?
207
190
  raise result.ire unless result.ire.nil?
208
191
  raise result.nfe unless result.nfe.nil?
209
- raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_superColumn failed: unknown result')
192
+ raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'get_super_column failed: unknown result')
210
193
  end
211
194
 
212
- def batch_insert_superColumn(batchMutationSuper, block_for)
213
- send_batch_insert_superColumn(batchMutationSuper, block_for)
214
- recv_batch_insert_superColumn()
195
+ def batch_insert_super_column(table, batch_mutation_super, block_for)
196
+ send_batch_insert_super_column(table, batch_mutation_super, block_for)
197
+ recv_batch_insert_super_column()
215
198
  end
216
199
 
217
- def send_batch_insert_superColumn(batchMutationSuper, block_for)
218
- send_message('batch_insert_superColumn', Batch_insert_superColumn_args, :batchMutationSuper => batchMutationSuper, :block_for => block_for)
200
+ def send_batch_insert_super_column(table, batch_mutation_super, block_for)
201
+ send_message('batch_insert_super_column', Batch_insert_super_column_args, :table => table, :batch_mutation_super => batch_mutation_super, :block_for => block_for)
219
202
  end
220
203
 
221
- def recv_batch_insert_superColumn()
222
- result = receive_message(Batch_insert_superColumn_result)
204
+ def recv_batch_insert_super_column()
205
+ result = receive_message(Batch_insert_super_column_result)
223
206
  raise result.ire unless result.ire.nil?
224
207
  raise result.ue unless result.ue.nil?
225
208
  return
226
209
  end
227
210
 
228
- def get_key_range(tablename, columnFamilies, startWith, stopAt, maxResults)
229
- send_get_key_range(tablename, columnFamilies, startWith, stopAt, maxResults)
211
+ def get_key_range(table, column_family, startWith, stopAt, maxResults)
212
+ send_get_key_range(table, column_family, startWith, stopAt, maxResults)
230
213
  return recv_get_key_range()
231
214
  end
232
215
 
233
- def send_get_key_range(tablename, columnFamilies, startWith, stopAt, maxResults)
234
- send_message('get_key_range', Get_key_range_args, :tablename => tablename, :columnFamilies => columnFamilies, :startWith => startWith, :stopAt => stopAt, :maxResults => maxResults)
216
+ def send_get_key_range(table, column_family, startWith, stopAt, maxResults)
217
+ send_message('get_key_range', Get_key_range_args, :table => table, :column_family => column_family, :startWith => startWith, :stopAt => stopAt, :maxResults => maxResults)
235
218
  end
236
219
 
237
220
  def recv_get_key_range()
@@ -307,24 +290,11 @@ module Cassandra
307
290
  class Processor
308
291
  include ::Thrift::Processor
309
292
 
310
- def process_get_slice_by_name_range(seqid, iprot, oprot)
311
- args = read_args(iprot, Get_slice_by_name_range_args)
312
- result = Get_slice_by_name_range_result.new()
313
- begin
314
- result.success = @handler.get_slice_by_name_range(args.tablename, args.key, args.columnParent, args.start, args.finish, args.count)
315
- rescue InvalidRequestException => ire
316
- result.ire = ire
317
- rescue NotFoundException => nfe
318
- result.nfe = nfe
319
- end
320
- write_result(result, oprot, 'get_slice_by_name_range', seqid)
321
- end
322
-
323
293
  def process_get_slice_by_names(seqid, iprot, oprot)
324
294
  args = read_args(iprot, Get_slice_by_names_args)
325
295
  result = Get_slice_by_names_result.new()
326
296
  begin
327
- result.success = @handler.get_slice_by_names(args.tablename, args.key, args.columnParent, args.columnNames)
297
+ result.success = @handler.get_slice_by_names(args.table, args.key, args.column_parent, args.column_names)
328
298
  rescue InvalidRequestException => ire
329
299
  result.ire = ire
330
300
  rescue NotFoundException => nfe
@@ -337,7 +307,7 @@ module Cassandra
337
307
  args = read_args(iprot, Get_slice_args)
338
308
  result = Get_slice_result.new()
339
309
  begin
340
- result.success = @handler.get_slice(args.tablename, args.key, args.columnParent, args.isAscending, args.count)
310
+ result.success = @handler.get_slice(args.table, args.key, args.column_parent, args.start, args.finish, args.is_ascending, args.count)
341
311
  rescue InvalidRequestException => ire
342
312
  result.ire = ire
343
313
  rescue NotFoundException => nfe
@@ -350,7 +320,7 @@ module Cassandra
350
320
  args = read_args(iprot, Get_column_args)
351
321
  result = Get_column_result.new()
352
322
  begin
353
- result.success = @handler.get_column(args.tablename, args.key, args.columnPath)
323
+ result.success = @handler.get_column(args.table, args.key, args.column_path)
354
324
  rescue InvalidRequestException => ire
355
325
  result.ire = ire
356
326
  rescue NotFoundException => nfe
@@ -363,7 +333,7 @@ module Cassandra
363
333
  args = read_args(iprot, Get_column_count_args)
364
334
  result = Get_column_count_result.new()
365
335
  begin
366
- result.success = @handler.get_column_count(args.tablename, args.key, args.columnParent)
336
+ result.success = @handler.get_column_count(args.table, args.key, args.column_parent)
367
337
  rescue InvalidRequestException => ire
368
338
  result.ire = ire
369
339
  end
@@ -374,7 +344,7 @@ module Cassandra
374
344
  args = read_args(iprot, Insert_args)
375
345
  result = Insert_result.new()
376
346
  begin
377
- @handler.insert(args.tablename, args.key, args.columnPath, args.cellData, args.timestamp, args.block_for)
347
+ @handler.insert(args.table, args.key, args.column_path, args.value, args.timestamp, args.block_for)
378
348
  rescue InvalidRequestException => ire
379
349
  result.ire = ire
380
350
  rescue UnavailableException => ue
@@ -387,7 +357,7 @@ module Cassandra
387
357
  args = read_args(iprot, Batch_insert_args)
388
358
  result = Batch_insert_result.new()
389
359
  begin
390
- @handler.batch_insert(args.batchMutation, args.block_for)
360
+ @handler.batch_insert(args.table, args.batch_mutation, args.block_for)
391
361
  rescue InvalidRequestException => ire
392
362
  result.ire = ire
393
363
  rescue UnavailableException => ue
@@ -400,7 +370,7 @@ module Cassandra
400
370
  args = read_args(iprot, Remove_args)
401
371
  result = Remove_result.new()
402
372
  begin
403
- @handler.remove(args.tablename, args.key, args.columnPathOrParent, args.timestamp, args.block_for)
373
+ @handler.remove(args.table, args.key, args.column_path_or_parent, args.timestamp, args.block_for)
404
374
  rescue InvalidRequestException => ire
405
375
  result.ire = ire
406
376
  rescue UnavailableException => ue
@@ -413,7 +383,7 @@ module Cassandra
413
383
  args = read_args(iprot, Get_columns_since_args)
414
384
  result = Get_columns_since_result.new()
415
385
  begin
416
- result.success = @handler.get_columns_since(args.tablename, args.key, args.columnParent, args.timeStamp)
386
+ result.success = @handler.get_columns_since(args.table, args.key, args.column_parent, args.timeStamp)
417
387
  rescue InvalidRequestException => ire
418
388
  result.ire = ire
419
389
  rescue NotFoundException => nfe
@@ -426,7 +396,7 @@ module Cassandra
426
396
  args = read_args(iprot, Get_slice_super_args)
427
397
  result = Get_slice_super_result.new()
428
398
  begin
429
- result.success = @handler.get_slice_super(args.tablename, args.key, args.columnFamily, args.isAscending, args.count)
399
+ result.success = @handler.get_slice_super(args.table, args.key, args.column_family, args.start, args.finish, args.is_ascending, args.count)
430
400
  rescue InvalidRequestException => ire
431
401
  result.ire = ire
432
402
  end
@@ -437,44 +407,44 @@ module Cassandra
437
407
  args = read_args(iprot, Get_slice_super_by_names_args)
438
408
  result = Get_slice_super_by_names_result.new()
439
409
  begin
440
- result.success = @handler.get_slice_super_by_names(args.tablename, args.key, args.columnFamily, args.superColumnNames)
410
+ result.success = @handler.get_slice_super_by_names(args.table, args.key, args.column_family, args.super_column_names)
441
411
  rescue InvalidRequestException => ire
442
412
  result.ire = ire
443
413
  end
444
414
  write_result(result, oprot, 'get_slice_super_by_names', seqid)
445
415
  end
446
416
 
447
- def process_get_superColumn(seqid, iprot, oprot)
448
- args = read_args(iprot, Get_superColumn_args)
449
- result = Get_superColumn_result.new()
417
+ def process_get_super_column(seqid, iprot, oprot)
418
+ args = read_args(iprot, Get_super_column_args)
419
+ result = Get_super_column_result.new()
450
420
  begin
451
- result.success = @handler.get_superColumn(args.tablename, args.key, args.superColumnPath)
421
+ result.success = @handler.get_super_column(args.table, args.key, args.super_column_path)
452
422
  rescue InvalidRequestException => ire
453
423
  result.ire = ire
454
424
  rescue NotFoundException => nfe
455
425
  result.nfe = nfe
456
426
  end
457
- write_result(result, oprot, 'get_superColumn', seqid)
427
+ write_result(result, oprot, 'get_super_column', seqid)
458
428
  end
459
429
 
460
- def process_batch_insert_superColumn(seqid, iprot, oprot)
461
- args = read_args(iprot, Batch_insert_superColumn_args)
462
- result = Batch_insert_superColumn_result.new()
430
+ def process_batch_insert_super_column(seqid, iprot, oprot)
431
+ args = read_args(iprot, Batch_insert_super_column_args)
432
+ result = Batch_insert_super_column_result.new()
463
433
  begin
464
- @handler.batch_insert_superColumn(args.batchMutationSuper, args.block_for)
434
+ @handler.batch_insert_super_column(args.table, args.batch_mutation_super, args.block_for)
465
435
  rescue InvalidRequestException => ire
466
436
  result.ire = ire
467
437
  rescue UnavailableException => ue
468
438
  result.ue = ue
469
439
  end
470
- write_result(result, oprot, 'batch_insert_superColumn', seqid)
440
+ write_result(result, oprot, 'batch_insert_super_column', seqid)
471
441
  end
472
442
 
473
443
  def process_get_key_range(seqid, iprot, oprot)
474
444
  args = read_args(iprot, Get_key_range_args)
475
445
  result = Get_key_range_result.new()
476
446
  begin
477
- result.success = @handler.get_key_range(args.tablename, args.columnFamilies, args.startWith, args.stopAt, args.maxResults)
447
+ result.success = @handler.get_key_range(args.table, args.column_family, args.startWith, args.stopAt, args.maxResults)
478
448
  rescue InvalidRequestException => ire
479
449
  result.ire = ire
480
450
  end
@@ -517,65 +487,19 @@ module Cassandra
517
487
 
518
488
  # HELPER FUNCTIONS AND STRUCTURES
519
489
 
520
- class Get_slice_by_name_range_args
521
- include ::Thrift::Struct
522
- TABLENAME = 1
523
- KEY = 2
524
- COLUMNPARENT = 3
525
- START = 4
526
- FINISH = 5
527
- COUNT = 6
528
-
529
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnParent, :start, :finish, :count
530
- FIELDS = {
531
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
532
- KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
533
- COLUMNPARENT => {:type => ::Thrift::Types::STRING, :name => 'columnParent'},
534
- START => {:type => ::Thrift::Types::STRING, :name => 'start'},
535
- FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
536
- COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => -1}
537
- }
538
-
539
- def struct_fields; FIELDS; end
540
-
541
- def validate
542
- end
543
-
544
- end
545
-
546
- class Get_slice_by_name_range_result
547
- include ::Thrift::Struct
548
- SUCCESS = 0
549
- IRE = 1
550
- NFE = 2
551
-
552
- ::Thrift::Struct.field_accessor self, :success, :ire, :nfe
553
- FIELDS = {
554
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column_t}},
555
- IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException},
556
- NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => NotFoundException}
557
- }
558
-
559
- def struct_fields; FIELDS; end
560
-
561
- def validate
562
- end
563
-
564
- end
565
-
566
490
  class Get_slice_by_names_args
567
491
  include ::Thrift::Struct
568
- TABLENAME = 1
492
+ TABLE = 1
569
493
  KEY = 2
570
- COLUMNPARENT = 3
571
- COLUMNNAMES = 4
494
+ COLUMN_PARENT = 3
495
+ COLUMN_NAMES = 4
572
496
 
573
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnParent, :columnNames
497
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_parent, :column_names
574
498
  FIELDS = {
575
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
499
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
576
500
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
577
- COLUMNPARENT => {:type => ::Thrift::Types::STRING, :name => 'columnParent'},
578
- COLUMNNAMES => {:type => ::Thrift::Types::LIST, :name => 'columnNames', :element => {:type => ::Thrift::Types::STRING}}
501
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => ColumnParent},
502
+ COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'column_names', :element => {:type => ::Thrift::Types::STRING}}
579
503
  }
580
504
 
581
505
  def struct_fields; FIELDS; end
@@ -593,7 +517,7 @@ module Cassandra
593
517
 
594
518
  ::Thrift::Struct.field_accessor self, :success, :ire, :nfe
595
519
  FIELDS = {
596
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column_t}},
520
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column}},
597
521
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException},
598
522
  NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => NotFoundException}
599
523
  }
@@ -607,19 +531,23 @@ module Cassandra
607
531
 
608
532
  class Get_slice_args
609
533
  include ::Thrift::Struct
610
- TABLENAME = 1
534
+ TABLE = 1
611
535
  KEY = 2
612
- COLUMNPARENT = 3
613
- ISASCENDING = 4
614
- COUNT = 5
536
+ COLUMN_PARENT = 3
537
+ START = 4
538
+ FINISH = 5
539
+ IS_ASCENDING = 6
540
+ COUNT = 7
615
541
 
616
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnParent, :isAscending, :count
542
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_parent, :start, :finish, :is_ascending, :count
617
543
  FIELDS = {
618
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
544
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
619
545
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
620
- COLUMNPARENT => {:type => ::Thrift::Types::STRING, :name => 'columnParent'},
621
- ISASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'isAscending'},
622
- COUNT => {:type => ::Thrift::Types::I32, :name => 'count'}
546
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => ColumnParent},
547
+ START => {:type => ::Thrift::Types::STRING, :name => 'start'},
548
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
549
+ IS_ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'is_ascending'},
550
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
623
551
  }
624
552
 
625
553
  def struct_fields; FIELDS; end
@@ -637,7 +565,7 @@ module Cassandra
637
565
 
638
566
  ::Thrift::Struct.field_accessor self, :success, :ire, :nfe
639
567
  FIELDS = {
640
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column_t}},
568
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column}},
641
569
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException},
642
570
  NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => NotFoundException}
643
571
  }
@@ -651,15 +579,15 @@ module Cassandra
651
579
 
652
580
  class Get_column_args
653
581
  include ::Thrift::Struct
654
- TABLENAME = 1
582
+ TABLE = 1
655
583
  KEY = 2
656
- COLUMNPATH = 3
584
+ COLUMN_PATH = 3
657
585
 
658
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnPath
586
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_path
659
587
  FIELDS = {
660
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
588
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
661
589
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
662
- COLUMNPATH => {:type => ::Thrift::Types::STRING, :name => 'columnPath'}
590
+ COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => ColumnPath}
663
591
  }
664
592
 
665
593
  def struct_fields; FIELDS; end
@@ -677,7 +605,7 @@ module Cassandra
677
605
 
678
606
  ::Thrift::Struct.field_accessor self, :success, :ire, :nfe
679
607
  FIELDS = {
680
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Column_t},
608
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => Column},
681
609
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException},
682
610
  NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => NotFoundException}
683
611
  }
@@ -691,15 +619,15 @@ module Cassandra
691
619
 
692
620
  class Get_column_count_args
693
621
  include ::Thrift::Struct
694
- TABLENAME = 1
622
+ TABLE = 1
695
623
  KEY = 2
696
- COLUMNPARENT = 3
624
+ COLUMN_PARENT = 3
697
625
 
698
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnParent
626
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_parent
699
627
  FIELDS = {
700
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
628
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
701
629
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
702
- COLUMNPARENT => {:type => ::Thrift::Types::STRING, :name => 'columnParent'}
630
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => ColumnParent}
703
631
  }
704
632
 
705
633
  def struct_fields; FIELDS; end
@@ -729,19 +657,19 @@ module Cassandra
729
657
 
730
658
  class Insert_args
731
659
  include ::Thrift::Struct
732
- TABLENAME = 1
660
+ TABLE = 1
733
661
  KEY = 2
734
- COLUMNPATH = 3
735
- CELLDATA = 4
662
+ COLUMN_PATH = 3
663
+ VALUE = 4
736
664
  TIMESTAMP = 5
737
665
  BLOCK_FOR = 6
738
666
 
739
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnPath, :cellData, :timestamp, :block_for
667
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_path, :value, :timestamp, :block_for
740
668
  FIELDS = {
741
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
669
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
742
670
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
743
- COLUMNPATH => {:type => ::Thrift::Types::STRING, :name => 'columnPath'},
744
- CELLDATA => {:type => ::Thrift::Types::STRING, :name => 'cellData'},
671
+ COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'column_path', :class => ColumnPath},
672
+ VALUE => {:type => ::Thrift::Types::STRING, :name => 'value'},
745
673
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
746
674
  BLOCK_FOR => {:type => ::Thrift::Types::I32, :name => 'block_for', :default => 0}
747
675
  }
@@ -773,12 +701,14 @@ module Cassandra
773
701
 
774
702
  class Batch_insert_args
775
703
  include ::Thrift::Struct
776
- BATCHMUTATION = 1
777
- BLOCK_FOR = 2
704
+ TABLE = 1
705
+ BATCH_MUTATION = 2
706
+ BLOCK_FOR = 3
778
707
 
779
- ::Thrift::Struct.field_accessor self, :batchMutation, :block_for
708
+ ::Thrift::Struct.field_accessor self, :table, :batch_mutation, :block_for
780
709
  FIELDS = {
781
- BATCHMUTATION => {:type => ::Thrift::Types::STRUCT, :name => 'batchMutation', :class => Batch_mutation_t},
710
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
711
+ BATCH_MUTATION => {:type => ::Thrift::Types::STRUCT, :name => 'batch_mutation', :class => BatchMutation},
782
712
  BLOCK_FOR => {:type => ::Thrift::Types::I32, :name => 'block_for', :default => 0}
783
713
  }
784
714
 
@@ -809,17 +739,17 @@ module Cassandra
809
739
 
810
740
  class Remove_args
811
741
  include ::Thrift::Struct
812
- TABLENAME = 1
742
+ TABLE = 1
813
743
  KEY = 2
814
- COLUMNPATHORPARENT = 3
744
+ COLUMN_PATH_OR_PARENT = 3
815
745
  TIMESTAMP = 4
816
746
  BLOCK_FOR = 5
817
747
 
818
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnPathOrParent, :timestamp, :block_for
748
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_path_or_parent, :timestamp, :block_for
819
749
  FIELDS = {
820
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
750
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
821
751
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
822
- COLUMNPATHORPARENT => {:type => ::Thrift::Types::STRING, :name => 'columnPathOrParent'},
752
+ COLUMN_PATH_OR_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_path_or_parent', :class => ColumnPathOrParent},
823
753
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
824
754
  BLOCK_FOR => {:type => ::Thrift::Types::I32, :name => 'block_for', :default => 0}
825
755
  }
@@ -851,16 +781,16 @@ module Cassandra
851
781
 
852
782
  class Get_columns_since_args
853
783
  include ::Thrift::Struct
854
- TABLENAME = 1
784
+ TABLE = 1
855
785
  KEY = 2
856
- COLUMNPARENT = 3
786
+ COLUMN_PARENT = 3
857
787
  TIMESTAMP = 4
858
788
 
859
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnParent, :timeStamp
789
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_parent, :timeStamp
860
790
  FIELDS = {
861
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
791
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
862
792
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
863
- COLUMNPARENT => {:type => ::Thrift::Types::STRING, :name => 'columnParent'},
793
+ COLUMN_PARENT => {:type => ::Thrift::Types::STRUCT, :name => 'column_parent', :class => ColumnParent},
864
794
  TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timeStamp'}
865
795
  }
866
796
 
@@ -879,7 +809,7 @@ module Cassandra
879
809
 
880
810
  ::Thrift::Struct.field_accessor self, :success, :ire, :nfe
881
811
  FIELDS = {
882
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column_t}},
812
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => Column}},
883
813
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException},
884
814
  NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => NotFoundException}
885
815
  }
@@ -893,19 +823,23 @@ module Cassandra
893
823
 
894
824
  class Get_slice_super_args
895
825
  include ::Thrift::Struct
896
- TABLENAME = 1
826
+ TABLE = 1
897
827
  KEY = 2
898
- COLUMNFAMILY = 3
899
- ISASCENDING = 4
900
- COUNT = 5
828
+ COLUMN_FAMILY = 3
829
+ START = 4
830
+ FINISH = 5
831
+ IS_ASCENDING = 6
832
+ COUNT = 7
901
833
 
902
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnFamily, :isAscending, :count
834
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_family, :start, :finish, :is_ascending, :count
903
835
  FIELDS = {
904
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
836
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
905
837
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
906
- COLUMNFAMILY => {:type => ::Thrift::Types::STRING, :name => 'columnFamily'},
907
- ISASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'isAscending'},
908
- COUNT => {:type => ::Thrift::Types::I32, :name => 'count'}
838
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
839
+ START => {:type => ::Thrift::Types::STRING, :name => 'start'},
840
+ FINISH => {:type => ::Thrift::Types::STRING, :name => 'finish'},
841
+ IS_ASCENDING => {:type => ::Thrift::Types::BOOL, :name => 'is_ascending'},
842
+ COUNT => {:type => ::Thrift::Types::I32, :name => 'count', :default => 100}
909
843
  }
910
844
 
911
845
  def struct_fields; FIELDS; end
@@ -922,7 +856,7 @@ module Cassandra
922
856
 
923
857
  ::Thrift::Struct.field_accessor self, :success, :ire
924
858
  FIELDS = {
925
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SuperColumn_t}},
859
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SuperColumn}},
926
860
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException}
927
861
  }
928
862
 
@@ -935,17 +869,17 @@ module Cassandra
935
869
 
936
870
  class Get_slice_super_by_names_args
937
871
  include ::Thrift::Struct
938
- TABLENAME = 1
872
+ TABLE = 1
939
873
  KEY = 2
940
- COLUMNFAMILY = 3
941
- SUPERCOLUMNNAMES = 4
874
+ COLUMN_FAMILY = 3
875
+ SUPER_COLUMN_NAMES = 4
942
876
 
943
- ::Thrift::Struct.field_accessor self, :tablename, :key, :columnFamily, :superColumnNames
877
+ ::Thrift::Struct.field_accessor self, :table, :key, :column_family, :super_column_names
944
878
  FIELDS = {
945
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
879
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
946
880
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
947
- COLUMNFAMILY => {:type => ::Thrift::Types::STRING, :name => 'columnFamily'},
948
- SUPERCOLUMNNAMES => {:type => ::Thrift::Types::LIST, :name => 'superColumnNames', :element => {:type => ::Thrift::Types::STRING}}
881
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
882
+ SUPER_COLUMN_NAMES => {:type => ::Thrift::Types::LIST, :name => 'super_column_names', :element => {:type => ::Thrift::Types::STRING}}
949
883
  }
950
884
 
951
885
  def struct_fields; FIELDS; end
@@ -962,7 +896,7 @@ module Cassandra
962
896
 
963
897
  ::Thrift::Struct.field_accessor self, :success, :ire
964
898
  FIELDS = {
965
- SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SuperColumn_t}},
899
+ SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => SuperColumn}},
966
900
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException}
967
901
  }
968
902
 
@@ -973,17 +907,17 @@ module Cassandra
973
907
 
974
908
  end
975
909
 
976
- class Get_superColumn_args
910
+ class Get_super_column_args
977
911
  include ::Thrift::Struct
978
- TABLENAME = 1
912
+ TABLE = 1
979
913
  KEY = 2
980
- SUPERCOLUMNPATH = 3
914
+ SUPER_COLUMN_PATH = 3
981
915
 
982
- ::Thrift::Struct.field_accessor self, :tablename, :key, :superColumnPath
916
+ ::Thrift::Struct.field_accessor self, :table, :key, :super_column_path
983
917
  FIELDS = {
984
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
918
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
985
919
  KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
986
- SUPERCOLUMNPATH => {:type => ::Thrift::Types::STRING, :name => 'superColumnPath'}
920
+ SUPER_COLUMN_PATH => {:type => ::Thrift::Types::STRUCT, :name => 'super_column_path', :class => SuperColumnPath}
987
921
  }
988
922
 
989
923
  def struct_fields; FIELDS; end
@@ -993,7 +927,7 @@ module Cassandra
993
927
 
994
928
  end
995
929
 
996
- class Get_superColumn_result
930
+ class Get_super_column_result
997
931
  include ::Thrift::Struct
998
932
  SUCCESS = 0
999
933
  IRE = 1
@@ -1001,7 +935,7 @@ module Cassandra
1001
935
 
1002
936
  ::Thrift::Struct.field_accessor self, :success, :ire, :nfe
1003
937
  FIELDS = {
1004
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => SuperColumn_t},
938
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => SuperColumn},
1005
939
  IRE => {:type => ::Thrift::Types::STRUCT, :name => 'ire', :class => InvalidRequestException},
1006
940
  NFE => {:type => ::Thrift::Types::STRUCT, :name => 'nfe', :class => NotFoundException}
1007
941
  }
@@ -1013,14 +947,16 @@ module Cassandra
1013
947
 
1014
948
  end
1015
949
 
1016
- class Batch_insert_superColumn_args
950
+ class Batch_insert_super_column_args
1017
951
  include ::Thrift::Struct
1018
- BATCHMUTATIONSUPER = 1
1019
- BLOCK_FOR = 2
952
+ TABLE = 1
953
+ BATCH_MUTATION_SUPER = 2
954
+ BLOCK_FOR = 3
1020
955
 
1021
- ::Thrift::Struct.field_accessor self, :batchMutationSuper, :block_for
956
+ ::Thrift::Struct.field_accessor self, :table, :batch_mutation_super, :block_for
1022
957
  FIELDS = {
1023
- BATCHMUTATIONSUPER => {:type => ::Thrift::Types::STRUCT, :name => 'batchMutationSuper', :class => Batch_mutation_super_t},
958
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
959
+ BATCH_MUTATION_SUPER => {:type => ::Thrift::Types::STRUCT, :name => 'batch_mutation_super', :class => BatchMutationSuper},
1024
960
  BLOCK_FOR => {:type => ::Thrift::Types::I32, :name => 'block_for', :default => 0}
1025
961
  }
1026
962
 
@@ -1031,7 +967,7 @@ module Cassandra
1031
967
 
1032
968
  end
1033
969
 
1034
- class Batch_insert_superColumn_result
970
+ class Batch_insert_super_column_result
1035
971
  include ::Thrift::Struct
1036
972
  IRE = 1
1037
973
  UE = 2
@@ -1051,20 +987,19 @@ module Cassandra
1051
987
 
1052
988
  class Get_key_range_args
1053
989
  include ::Thrift::Struct
1054
- TABLENAME = 1
1055
- COLUMNFAMILIES = 2
990
+ TABLE = 1
991
+ COLUMN_FAMILY = 2
1056
992
  STARTWITH = 3
1057
993
  STOPAT = 4
1058
994
  MAXRESULTS = 5
1059
995
 
1060
- ::Thrift::Struct.field_accessor self, :tablename, :columnFamilies, :startWith, :stopAt, :maxResults
996
+ ::Thrift::Struct.field_accessor self, :table, :column_family, :startWith, :stopAt, :maxResults
1061
997
  FIELDS = {
1062
- TABLENAME => {:type => ::Thrift::Types::STRING, :name => 'tablename'},
1063
- COLUMNFAMILIES => {:type => ::Thrift::Types::LIST, :name => 'columnFamilies', :default => [
1064
- ], :element => {:type => ::Thrift::Types::STRING}},
998
+ TABLE => {:type => ::Thrift::Types::STRING, :name => 'table'},
999
+ COLUMN_FAMILY => {:type => ::Thrift::Types::STRING, :name => 'column_family'},
1065
1000
  STARTWITH => {:type => ::Thrift::Types::STRING, :name => 'startWith', :default => %q""},
1066
1001
  STOPAT => {:type => ::Thrift::Types::STRING, :name => 'stopAt', :default => %q""},
1067
- MAXRESULTS => {:type => ::Thrift::Types::I32, :name => 'maxResults', :default => 1000}
1002
+ MAXRESULTS => {:type => ::Thrift::Types::I32, :name => 'maxResults', :default => 100}
1068
1003
  }
1069
1004
 
1070
1005
  def struct_fields; FIELDS; end
@@ -1212,7 +1147,7 @@ module Cassandra
1212
1147
 
1213
1148
  ::Thrift::Struct.field_accessor self, :success
1214
1149
  FIELDS = {
1215
- SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => CqlResult_t}
1150
+ SUCCESS => {:type => ::Thrift::Types::STRUCT, :name => 'success', :class => CqlResult}
1216
1151
  }
1217
1152
 
1218
1153
  def struct_fields; FIELDS; end