line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# Autogenerated by Thrift |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING |
5
|
|
|
|
|
|
|
# |
6
|
|
|
|
|
|
|
require 5.6.0; |
7
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
8
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
9
|
1
|
|
|
1
|
|
8
|
use Thrift; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
package Cassandra::ConsistencyLevel; |
12
|
|
|
|
|
|
|
BEGIN { |
13
|
1
|
|
|
1
|
|
19
|
$Cassandra::ConsistencyLevel::VERSION = '0.4.0'; |
14
|
|
|
|
|
|
|
} |
15
|
1
|
|
|
1
|
|
5
|
use constant ONE => 1; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
48
|
|
16
|
1
|
|
|
1
|
|
5
|
use constant QUORUM => 2; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
47
|
|
17
|
1
|
|
|
1
|
|
5
|
use constant LOCAL_QUORUM => 3; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
18
|
1
|
|
|
1
|
|
5
|
use constant EACH_QUORUM => 4; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
36
|
|
19
|
1
|
|
|
1
|
|
5
|
use constant ALL => 5; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
20
|
1
|
|
|
1
|
|
5
|
use constant ANY => 6; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
21
|
1
|
|
|
1
|
|
6
|
use constant TWO => 7; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
22
|
1
|
|
|
1
|
|
5
|
use constant THREE => 8; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
56
|
|
23
|
|
|
|
|
|
|
package Cassandra::IndexOperator; |
24
|
|
|
|
|
|
|
BEGIN { |
25
|
1
|
|
|
1
|
|
21
|
$Cassandra::IndexOperator::VERSION = '0.4.0'; |
26
|
|
|
|
|
|
|
} |
27
|
1
|
|
|
1
|
|
5
|
use constant EQ => 0; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
28
|
1
|
|
|
1
|
|
6
|
use constant GTE => 1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
29
|
1
|
|
|
1
|
|
5
|
use constant GT => 2; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
30
|
1
|
|
|
1
|
|
5
|
use constant LTE => 3; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
41
|
|
31
|
1
|
|
|
1
|
|
5
|
use constant LT => 4; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
32
|
|
|
|
|
|
|
package Cassandra::IndexType; |
33
|
|
|
|
|
|
|
BEGIN { |
34
|
1
|
|
|
1
|
|
19
|
$Cassandra::IndexType::VERSION = '0.4.0'; |
35
|
|
|
|
|
|
|
} |
36
|
1
|
|
|
1
|
|
5
|
use constant KEYS => 0; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
56
|
|
37
|
|
|
|
|
|
|
package Cassandra::Compression; |
38
|
|
|
|
|
|
|
BEGIN { |
39
|
1
|
|
|
1
|
|
23
|
$Cassandra::Compression::VERSION = '0.4.0'; |
40
|
|
|
|
|
|
|
} |
41
|
1
|
|
|
1
|
|
5
|
use constant GZIP => 1; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
40
|
|
42
|
1
|
|
|
1
|
|
6
|
use constant NONE => 2; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
67
|
|
43
|
|
|
|
|
|
|
package Cassandra::CqlResultType; |
44
|
|
|
|
|
|
|
BEGIN { |
45
|
1
|
|
|
1
|
|
19
|
$Cassandra::CqlResultType::VERSION = '0.4.0'; |
46
|
|
|
|
|
|
|
} |
47
|
1
|
|
|
1
|
|
6
|
use constant ROWS => 1; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
45
|
|
48
|
1
|
|
|
1
|
|
5
|
use constant VOID => 2; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
37
|
|
49
|
1
|
|
|
1
|
|
5
|
use constant INT => 3; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
50
|
|
|
|
|
|
|
package Cassandra::Column; |
51
|
|
|
|
|
|
|
BEGIN { |
52
|
1
|
|
|
1
|
|
106
|
$Cassandra::Column::VERSION = '0.4.0'; |
53
|
|
|
|
|
|
|
} |
54
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
944
|
|
55
|
|
|
|
|
|
|
Cassandra::Column->mk_accessors( qw( name value timestamp ttl ) ); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub new { |
58
|
0
|
|
|
0
|
|
|
my $classname = shift; |
59
|
0
|
|
|
|
|
|
my $self = {}; |
60
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
61
|
0
|
|
|
|
|
|
$self->{name} = undef; |
62
|
0
|
|
|
|
|
|
$self->{value} = undef; |
63
|
0
|
|
|
|
|
|
$self->{timestamp} = undef; |
64
|
0
|
|
|
|
|
|
$self->{ttl} = undef; |
65
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
66
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
67
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
68
|
|
|
|
|
|
|
} |
69
|
0
|
0
|
|
|
|
|
if (defined $vals->{value}) { |
70
|
0
|
|
|
|
|
|
$self->{value} = $vals->{value}; |
71
|
|
|
|
|
|
|
} |
72
|
0
|
0
|
|
|
|
|
if (defined $vals->{timestamp}) { |
73
|
0
|
|
|
|
|
|
$self->{timestamp} = $vals->{timestamp}; |
74
|
|
|
|
|
|
|
} |
75
|
0
|
0
|
|
|
|
|
if (defined $vals->{ttl}) { |
76
|
0
|
|
|
|
|
|
$self->{ttl} = $vals->{ttl}; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
} |
79
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
sub getName { |
83
|
0
|
|
|
0
|
|
|
return 'Column'; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
sub read { |
87
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
88
|
0
|
|
|
|
|
|
my $xfer = 0; |
89
|
0
|
|
|
|
|
|
my $fname; |
90
|
0
|
|
|
|
|
|
my $ftype = 0; |
91
|
0
|
|
|
|
|
|
my $fid = 0; |
92
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
93
|
0
|
|
|
|
|
|
while (1) |
94
|
|
|
|
|
|
|
{ |
95
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
96
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
97
|
0
|
|
|
|
|
|
last; |
98
|
|
|
|
|
|
|
} |
99
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
100
|
|
|
|
|
|
|
{ |
101
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
102
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
103
|
|
|
|
|
|
|
} else { |
104
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
105
|
|
|
|
|
|
|
} |
106
|
0
|
|
|
|
|
|
last; }; |
107
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
108
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{value}); |
109
|
|
|
|
|
|
|
} else { |
110
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
111
|
|
|
|
|
|
|
} |
112
|
0
|
|
|
|
|
|
last; }; |
113
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::I64) { |
|
0
|
0
|
|
|
|
|
|
114
|
0
|
|
|
|
|
|
$xfer += $input->readI64(\$self->{timestamp}); |
115
|
|
|
|
|
|
|
} else { |
116
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
117
|
|
|
|
|
|
|
} |
118
|
0
|
|
|
|
|
|
last; }; |
119
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{ttl}); |
121
|
|
|
|
|
|
|
} else { |
122
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
123
|
|
|
|
|
|
|
} |
124
|
0
|
|
|
|
|
|
last; }; |
125
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
126
|
|
|
|
|
|
|
} |
127
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
128
|
|
|
|
|
|
|
} |
129
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
130
|
0
|
|
|
|
|
|
return $xfer; |
131
|
|
|
|
|
|
|
} |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
sub write { |
134
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
135
|
0
|
|
|
|
|
|
my $xfer = 0; |
136
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('Column'); |
137
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
138
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
139
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
140
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
141
|
|
|
|
|
|
|
} |
142
|
0
|
0
|
|
|
|
|
if (defined $self->{value}) { |
143
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('value', TType::STRING, 2); |
144
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{value}); |
145
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
146
|
|
|
|
|
|
|
} |
147
|
0
|
0
|
|
|
|
|
if (defined $self->{timestamp}) { |
148
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('timestamp', TType::I64, 3); |
149
|
0
|
|
|
|
|
|
$xfer += $output->writeI64($self->{timestamp}); |
150
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
151
|
|
|
|
|
|
|
} |
152
|
0
|
0
|
|
|
|
|
if (defined $self->{ttl}) { |
153
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('ttl', TType::I32, 4); |
154
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{ttl}); |
155
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
156
|
|
|
|
|
|
|
} |
157
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
158
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
159
|
0
|
|
|
|
|
|
return $xfer; |
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
package Cassandra::SuperColumn; |
163
|
|
|
|
|
|
|
BEGIN { |
164
|
1
|
|
|
1
|
|
3110
|
$Cassandra::SuperColumn::VERSION = '0.4.0'; |
165
|
|
|
|
|
|
|
} |
166
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
797
|
|
167
|
|
|
|
|
|
|
Cassandra::SuperColumn->mk_accessors( qw( name columns ) ); |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub new { |
170
|
0
|
|
|
0
|
|
|
my $classname = shift; |
171
|
0
|
|
|
|
|
|
my $self = {}; |
172
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
173
|
0
|
|
|
|
|
|
$self->{name} = undef; |
174
|
0
|
|
|
|
|
|
$self->{columns} = undef; |
175
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
176
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
177
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
178
|
|
|
|
|
|
|
} |
179
|
0
|
0
|
|
|
|
|
if (defined $vals->{columns}) { |
180
|
0
|
|
|
|
|
|
$self->{columns} = $vals->{columns}; |
181
|
|
|
|
|
|
|
} |
182
|
|
|
|
|
|
|
} |
183
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
sub getName { |
187
|
0
|
|
|
0
|
|
|
return 'SuperColumn'; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub read { |
191
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
192
|
0
|
|
|
|
|
|
my $xfer = 0; |
193
|
0
|
|
|
|
|
|
my $fname; |
194
|
0
|
|
|
|
|
|
my $ftype = 0; |
195
|
0
|
|
|
|
|
|
my $fid = 0; |
196
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
197
|
0
|
|
|
|
|
|
while (1) |
198
|
|
|
|
|
|
|
{ |
199
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
200
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
201
|
0
|
|
|
|
|
|
last; |
202
|
|
|
|
|
|
|
} |
203
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
204
|
|
|
|
|
|
|
{ |
205
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
206
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
207
|
|
|
|
|
|
|
} else { |
208
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
209
|
|
|
|
|
|
|
} |
210
|
0
|
|
|
|
|
|
last; }; |
211
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
212
|
|
|
|
|
|
|
{ |
213
|
0
|
|
|
|
|
|
my $_size0 = 0; |
|
0
|
|
|
|
|
|
|
214
|
0
|
|
|
|
|
|
$self->{columns} = []; |
215
|
0
|
|
|
|
|
|
my $_etype3 = 0; |
216
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype3, \$_size0); |
217
|
0
|
|
|
|
|
|
for (my $_i4 = 0; $_i4 < $_size0; ++$_i4) |
218
|
|
|
|
|
|
|
{ |
219
|
0
|
|
|
|
|
|
my $elem5 = undef; |
220
|
0
|
|
|
|
|
|
$elem5 = new Cassandra::Column(); |
221
|
0
|
|
|
|
|
|
$xfer += $elem5->read($input); |
222
|
0
|
|
|
|
|
|
push(@{$self->{columns}},$elem5); |
|
0
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
} |
224
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
225
|
|
|
|
|
|
|
} |
226
|
|
|
|
|
|
|
} else { |
227
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
228
|
|
|
|
|
|
|
} |
229
|
0
|
|
|
|
|
|
last; }; |
230
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
231
|
|
|
|
|
|
|
} |
232
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
233
|
|
|
|
|
|
|
} |
234
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
235
|
0
|
|
|
|
|
|
return $xfer; |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
sub write { |
239
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
240
|
0
|
|
|
|
|
|
my $xfer = 0; |
241
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('SuperColumn'); |
242
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
243
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
244
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
245
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
246
|
|
|
|
|
|
|
} |
247
|
0
|
0
|
|
|
|
|
if (defined $self->{columns}) { |
248
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('columns', TType::LIST, 2); |
249
|
|
|
|
|
|
|
{ |
250
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{columns}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
{ |
252
|
0
|
|
|
|
|
|
foreach my $iter6 (@{$self->{columns}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
{ |
254
|
0
|
|
|
|
|
|
$xfer += ${iter6}->write($output); |
255
|
|
|
|
|
|
|
} |
256
|
|
|
|
|
|
|
} |
257
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
258
|
|
|
|
|
|
|
} |
259
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
260
|
|
|
|
|
|
|
} |
261
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
262
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
263
|
0
|
|
|
|
|
|
return $xfer; |
264
|
|
|
|
|
|
|
} |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
package Cassandra::CounterColumn; |
267
|
|
|
|
|
|
|
BEGIN { |
268
|
1
|
|
|
1
|
|
40
|
$Cassandra::CounterColumn::VERSION = '0.4.0'; |
269
|
|
|
|
|
|
|
} |
270
|
1
|
|
|
1
|
|
8
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
655
|
|
271
|
|
|
|
|
|
|
Cassandra::CounterColumn->mk_accessors( qw( name value ) ); |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
sub new { |
274
|
0
|
|
|
0
|
|
|
my $classname = shift; |
275
|
0
|
|
|
|
|
|
my $self = {}; |
276
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
277
|
0
|
|
|
|
|
|
$self->{name} = undef; |
278
|
0
|
|
|
|
|
|
$self->{value} = undef; |
279
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
280
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
281
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
282
|
|
|
|
|
|
|
} |
283
|
0
|
0
|
|
|
|
|
if (defined $vals->{value}) { |
284
|
0
|
|
|
|
|
|
$self->{value} = $vals->{value}; |
285
|
|
|
|
|
|
|
} |
286
|
|
|
|
|
|
|
} |
287
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
288
|
|
|
|
|
|
|
} |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
sub getName { |
291
|
0
|
|
|
0
|
|
|
return 'CounterColumn'; |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub read { |
295
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
296
|
0
|
|
|
|
|
|
my $xfer = 0; |
297
|
0
|
|
|
|
|
|
my $fname; |
298
|
0
|
|
|
|
|
|
my $ftype = 0; |
299
|
0
|
|
|
|
|
|
my $fid = 0; |
300
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
301
|
0
|
|
|
|
|
|
while (1) |
302
|
|
|
|
|
|
|
{ |
303
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
304
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
305
|
0
|
|
|
|
|
|
last; |
306
|
|
|
|
|
|
|
} |
307
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
308
|
|
|
|
|
|
|
{ |
309
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
310
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
311
|
|
|
|
|
|
|
} else { |
312
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
313
|
|
|
|
|
|
|
} |
314
|
0
|
|
|
|
|
|
last; }; |
315
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::I64) { |
|
0
|
0
|
|
|
|
|
|
316
|
0
|
|
|
|
|
|
$xfer += $input->readI64(\$self->{value}); |
317
|
|
|
|
|
|
|
} else { |
318
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
319
|
|
|
|
|
|
|
} |
320
|
0
|
|
|
|
|
|
last; }; |
321
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
322
|
|
|
|
|
|
|
} |
323
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
324
|
|
|
|
|
|
|
} |
325
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
326
|
0
|
|
|
|
|
|
return $xfer; |
327
|
|
|
|
|
|
|
} |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
sub write { |
330
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
331
|
0
|
|
|
|
|
|
my $xfer = 0; |
332
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('CounterColumn'); |
333
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
334
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
335
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
336
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
337
|
|
|
|
|
|
|
} |
338
|
0
|
0
|
|
|
|
|
if (defined $self->{value}) { |
339
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('value', TType::I64, 2); |
340
|
0
|
|
|
|
|
|
$xfer += $output->writeI64($self->{value}); |
341
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
342
|
|
|
|
|
|
|
} |
343
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
344
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
345
|
0
|
|
|
|
|
|
return $xfer; |
346
|
|
|
|
|
|
|
} |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
package Cassandra::CounterSuperColumn; |
349
|
|
|
|
|
|
|
BEGIN { |
350
|
1
|
|
|
1
|
|
21
|
$Cassandra::CounterSuperColumn::VERSION = '0.4.0'; |
351
|
|
|
|
|
|
|
} |
352
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
765
|
|
353
|
|
|
|
|
|
|
Cassandra::CounterSuperColumn->mk_accessors( qw( name columns ) ); |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
sub new { |
356
|
0
|
|
|
0
|
|
|
my $classname = shift; |
357
|
0
|
|
|
|
|
|
my $self = {}; |
358
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
359
|
0
|
|
|
|
|
|
$self->{name} = undef; |
360
|
0
|
|
|
|
|
|
$self->{columns} = undef; |
361
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
362
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
363
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
364
|
|
|
|
|
|
|
} |
365
|
0
|
0
|
|
|
|
|
if (defined $vals->{columns}) { |
366
|
0
|
|
|
|
|
|
$self->{columns} = $vals->{columns}; |
367
|
|
|
|
|
|
|
} |
368
|
|
|
|
|
|
|
} |
369
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
sub getName { |
373
|
0
|
|
|
0
|
|
|
return 'CounterSuperColumn'; |
374
|
|
|
|
|
|
|
} |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
sub read { |
377
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
378
|
0
|
|
|
|
|
|
my $xfer = 0; |
379
|
0
|
|
|
|
|
|
my $fname; |
380
|
0
|
|
|
|
|
|
my $ftype = 0; |
381
|
0
|
|
|
|
|
|
my $fid = 0; |
382
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
383
|
0
|
|
|
|
|
|
while (1) |
384
|
|
|
|
|
|
|
{ |
385
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
386
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
387
|
0
|
|
|
|
|
|
last; |
388
|
|
|
|
|
|
|
} |
389
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
390
|
|
|
|
|
|
|
{ |
391
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
392
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
393
|
|
|
|
|
|
|
} else { |
394
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
395
|
|
|
|
|
|
|
} |
396
|
0
|
|
|
|
|
|
last; }; |
397
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
398
|
|
|
|
|
|
|
{ |
399
|
0
|
|
|
|
|
|
my $_size7 = 0; |
|
0
|
|
|
|
|
|
|
400
|
0
|
|
|
|
|
|
$self->{columns} = []; |
401
|
0
|
|
|
|
|
|
my $_etype10 = 0; |
402
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype10, \$_size7); |
403
|
0
|
|
|
|
|
|
for (my $_i11 = 0; $_i11 < $_size7; ++$_i11) |
404
|
|
|
|
|
|
|
{ |
405
|
0
|
|
|
|
|
|
my $elem12 = undef; |
406
|
0
|
|
|
|
|
|
$elem12 = new Cassandra::CounterColumn(); |
407
|
0
|
|
|
|
|
|
$xfer += $elem12->read($input); |
408
|
0
|
|
|
|
|
|
push(@{$self->{columns}},$elem12); |
|
0
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
} |
410
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
411
|
|
|
|
|
|
|
} |
412
|
|
|
|
|
|
|
} else { |
413
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
414
|
|
|
|
|
|
|
} |
415
|
0
|
|
|
|
|
|
last; }; |
416
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
417
|
|
|
|
|
|
|
} |
418
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
419
|
|
|
|
|
|
|
} |
420
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
421
|
0
|
|
|
|
|
|
return $xfer; |
422
|
|
|
|
|
|
|
} |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
sub write { |
425
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
426
|
0
|
|
|
|
|
|
my $xfer = 0; |
427
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('CounterSuperColumn'); |
428
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
429
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
430
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
431
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
432
|
|
|
|
|
|
|
} |
433
|
0
|
0
|
|
|
|
|
if (defined $self->{columns}) { |
434
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('columns', TType::LIST, 2); |
435
|
|
|
|
|
|
|
{ |
436
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{columns}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
{ |
438
|
0
|
|
|
|
|
|
foreach my $iter13 (@{$self->{columns}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
{ |
440
|
0
|
|
|
|
|
|
$xfer += ${iter13}->write($output); |
441
|
|
|
|
|
|
|
} |
442
|
|
|
|
|
|
|
} |
443
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
444
|
|
|
|
|
|
|
} |
445
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
446
|
|
|
|
|
|
|
} |
447
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
448
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
449
|
0
|
|
|
|
|
|
return $xfer; |
450
|
|
|
|
|
|
|
} |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
package Cassandra::ColumnOrSuperColumn; |
453
|
|
|
|
|
|
|
BEGIN { |
454
|
1
|
|
|
1
|
|
20
|
$Cassandra::ColumnOrSuperColumn::VERSION = '0.4.0'; |
455
|
|
|
|
|
|
|
} |
456
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
917
|
|
457
|
|
|
|
|
|
|
Cassandra::ColumnOrSuperColumn->mk_accessors( qw( column super_column counter_column counter_super_column ) ); |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
sub new { |
460
|
0
|
|
|
0
|
|
|
my $classname = shift; |
461
|
0
|
|
|
|
|
|
my $self = {}; |
462
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
463
|
0
|
|
|
|
|
|
$self->{column} = undef; |
464
|
0
|
|
|
|
|
|
$self->{super_column} = undef; |
465
|
0
|
|
|
|
|
|
$self->{counter_column} = undef; |
466
|
0
|
|
|
|
|
|
$self->{counter_super_column} = undef; |
467
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
468
|
0
|
0
|
|
|
|
|
if (defined $vals->{column}) { |
469
|
0
|
|
|
|
|
|
$self->{column} = $vals->{column}; |
470
|
|
|
|
|
|
|
} |
471
|
0
|
0
|
|
|
|
|
if (defined $vals->{super_column}) { |
472
|
0
|
|
|
|
|
|
$self->{super_column} = $vals->{super_column}; |
473
|
|
|
|
|
|
|
} |
474
|
0
|
0
|
|
|
|
|
if (defined $vals->{counter_column}) { |
475
|
0
|
|
|
|
|
|
$self->{counter_column} = $vals->{counter_column}; |
476
|
|
|
|
|
|
|
} |
477
|
0
|
0
|
|
|
|
|
if (defined $vals->{counter_super_column}) { |
478
|
0
|
|
|
|
|
|
$self->{counter_super_column} = $vals->{counter_super_column}; |
479
|
|
|
|
|
|
|
} |
480
|
|
|
|
|
|
|
} |
481
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
482
|
|
|
|
|
|
|
} |
483
|
|
|
|
|
|
|
|
484
|
|
|
|
|
|
|
sub getName { |
485
|
0
|
|
|
0
|
|
|
return 'ColumnOrSuperColumn'; |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
sub read { |
489
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
490
|
0
|
|
|
|
|
|
my $xfer = 0; |
491
|
0
|
|
|
|
|
|
my $fname; |
492
|
0
|
|
|
|
|
|
my $ftype = 0; |
493
|
0
|
|
|
|
|
|
my $fid = 0; |
494
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
495
|
0
|
|
|
|
|
|
while (1) |
496
|
|
|
|
|
|
|
{ |
497
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
498
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
499
|
0
|
|
|
|
|
|
last; |
500
|
|
|
|
|
|
|
} |
501
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
502
|
|
|
|
|
|
|
{ |
503
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
504
|
0
|
|
|
|
|
|
$self->{column} = new Cassandra::Column(); |
505
|
0
|
|
|
|
|
|
$xfer += $self->{column}->read($input); |
506
|
|
|
|
|
|
|
} else { |
507
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
508
|
|
|
|
|
|
|
} |
509
|
0
|
|
|
|
|
|
last; }; |
510
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
511
|
0
|
|
|
|
|
|
$self->{super_column} = new Cassandra::SuperColumn(); |
512
|
0
|
|
|
|
|
|
$xfer += $self->{super_column}->read($input); |
513
|
|
|
|
|
|
|
} else { |
514
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
515
|
|
|
|
|
|
|
} |
516
|
0
|
|
|
|
|
|
last; }; |
517
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
518
|
0
|
|
|
|
|
|
$self->{counter_column} = new Cassandra::CounterColumn(); |
519
|
0
|
|
|
|
|
|
$xfer += $self->{counter_column}->read($input); |
520
|
|
|
|
|
|
|
} else { |
521
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
522
|
|
|
|
|
|
|
} |
523
|
0
|
|
|
|
|
|
last; }; |
524
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
525
|
0
|
|
|
|
|
|
$self->{counter_super_column} = new Cassandra::CounterSuperColumn(); |
526
|
0
|
|
|
|
|
|
$xfer += $self->{counter_super_column}->read($input); |
527
|
|
|
|
|
|
|
} else { |
528
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
529
|
|
|
|
|
|
|
} |
530
|
0
|
|
|
|
|
|
last; }; |
531
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
532
|
|
|
|
|
|
|
} |
533
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
534
|
|
|
|
|
|
|
} |
535
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
536
|
0
|
|
|
|
|
|
return $xfer; |
537
|
|
|
|
|
|
|
} |
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
sub write { |
540
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
541
|
0
|
|
|
|
|
|
my $xfer = 0; |
542
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('ColumnOrSuperColumn'); |
543
|
0
|
0
|
|
|
|
|
if (defined $self->{column}) { |
544
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column', TType::STRUCT, 1); |
545
|
0
|
|
|
|
|
|
$xfer += $self->{column}->write($output); |
546
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
547
|
|
|
|
|
|
|
} |
548
|
0
|
0
|
|
|
|
|
if (defined $self->{super_column}) { |
549
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('super_column', TType::STRUCT, 2); |
550
|
0
|
|
|
|
|
|
$xfer += $self->{super_column}->write($output); |
551
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
552
|
|
|
|
|
|
|
} |
553
|
0
|
0
|
|
|
|
|
if (defined $self->{counter_column}) { |
554
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('counter_column', TType::STRUCT, 3); |
555
|
0
|
|
|
|
|
|
$xfer += $self->{counter_column}->write($output); |
556
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
557
|
|
|
|
|
|
|
} |
558
|
0
|
0
|
|
|
|
|
if (defined $self->{counter_super_column}) { |
559
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('counter_super_column', TType::STRUCT, 4); |
560
|
0
|
|
|
|
|
|
$xfer += $self->{counter_super_column}->write($output); |
561
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
562
|
|
|
|
|
|
|
} |
563
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
564
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
565
|
0
|
|
|
|
|
|
return $xfer; |
566
|
|
|
|
|
|
|
} |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
package Cassandra::NotFoundException; |
569
|
|
|
|
|
|
|
BEGIN { |
570
|
1
|
|
|
1
|
|
26
|
$Cassandra::NotFoundException::VERSION = '0.4.0'; |
571
|
|
|
|
|
|
|
} |
572
|
1
|
|
|
1
|
|
6
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
493
|
|
573
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
360
|
|
574
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
sub new { |
576
|
0
|
|
|
0
|
|
|
my $classname = shift; |
577
|
0
|
|
|
|
|
|
my $self = {}; |
578
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
579
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
580
|
|
|
|
|
|
|
} |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
sub getName { |
583
|
0
|
|
|
0
|
|
|
return 'NotFoundException'; |
584
|
|
|
|
|
|
|
} |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
sub read { |
587
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
588
|
0
|
|
|
|
|
|
my $xfer = 0; |
589
|
0
|
|
|
|
|
|
my $fname; |
590
|
0
|
|
|
|
|
|
my $ftype = 0; |
591
|
0
|
|
|
|
|
|
my $fid = 0; |
592
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
593
|
0
|
|
|
|
|
|
while (1) |
594
|
|
|
|
|
|
|
{ |
595
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
596
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
597
|
0
|
|
|
|
|
|
last; |
598
|
|
|
|
|
|
|
} |
599
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
600
|
|
|
|
|
|
|
{ |
601
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
602
|
|
|
|
|
|
|
} |
603
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
604
|
|
|
|
|
|
|
} |
605
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
606
|
0
|
|
|
|
|
|
return $xfer; |
607
|
|
|
|
|
|
|
} |
608
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
sub write { |
610
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
611
|
0
|
|
|
|
|
|
my $xfer = 0; |
612
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('NotFoundException'); |
613
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
614
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
615
|
0
|
|
|
|
|
|
return $xfer; |
616
|
|
|
|
|
|
|
} |
617
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
package Cassandra::InvalidRequestException; |
619
|
|
|
|
|
|
|
BEGIN { |
620
|
1
|
|
|
1
|
|
30
|
$Cassandra::InvalidRequestException::VERSION = '0.4.0'; |
621
|
|
|
|
|
|
|
} |
622
|
1
|
|
|
1
|
|
6
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
440
|
|
623
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
492
|
|
624
|
|
|
|
|
|
|
Cassandra::InvalidRequestException->mk_accessors( qw( why ) ); |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
sub new { |
627
|
0
|
|
|
0
|
|
|
my $classname = shift; |
628
|
0
|
|
|
|
|
|
my $self = {}; |
629
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
630
|
0
|
|
|
|
|
|
$self->{why} = undef; |
631
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
632
|
0
|
0
|
|
|
|
|
if (defined $vals->{why}) { |
633
|
0
|
|
|
|
|
|
$self->{why} = $vals->{why}; |
634
|
|
|
|
|
|
|
} |
635
|
|
|
|
|
|
|
} |
636
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
637
|
|
|
|
|
|
|
} |
638
|
|
|
|
|
|
|
|
639
|
|
|
|
|
|
|
sub getName { |
640
|
0
|
|
|
0
|
|
|
return 'InvalidRequestException'; |
641
|
|
|
|
|
|
|
} |
642
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
sub read { |
644
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
645
|
0
|
|
|
|
|
|
my $xfer = 0; |
646
|
0
|
|
|
|
|
|
my $fname; |
647
|
0
|
|
|
|
|
|
my $ftype = 0; |
648
|
0
|
|
|
|
|
|
my $fid = 0; |
649
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
650
|
0
|
|
|
|
|
|
while (1) |
651
|
|
|
|
|
|
|
{ |
652
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
653
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
654
|
0
|
|
|
|
|
|
last; |
655
|
|
|
|
|
|
|
} |
656
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
657
|
|
|
|
|
|
|
{ |
658
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
659
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{why}); |
660
|
|
|
|
|
|
|
} else { |
661
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
662
|
|
|
|
|
|
|
} |
663
|
0
|
|
|
|
|
|
last; }; |
664
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
665
|
|
|
|
|
|
|
} |
666
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
667
|
|
|
|
|
|
|
} |
668
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
669
|
0
|
|
|
|
|
|
return $xfer; |
670
|
|
|
|
|
|
|
} |
671
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
sub write { |
673
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
674
|
0
|
|
|
|
|
|
my $xfer = 0; |
675
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('InvalidRequestException'); |
676
|
0
|
0
|
|
|
|
|
if (defined $self->{why}) { |
677
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('why', TType::STRING, 1); |
678
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{why}); |
679
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
680
|
|
|
|
|
|
|
} |
681
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
682
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
683
|
0
|
|
|
|
|
|
return $xfer; |
684
|
|
|
|
|
|
|
} |
685
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
package Cassandra::UnavailableException; |
687
|
|
|
|
|
|
|
BEGIN { |
688
|
1
|
|
|
1
|
|
28
|
$Cassandra::UnavailableException::VERSION = '0.4.0'; |
689
|
|
|
|
|
|
|
} |
690
|
1
|
|
|
1
|
|
13
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
504
|
|
691
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
360
|
|
692
|
|
|
|
|
|
|
|
693
|
|
|
|
|
|
|
sub new { |
694
|
0
|
|
|
0
|
|
|
my $classname = shift; |
695
|
0
|
|
|
|
|
|
my $self = {}; |
696
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
697
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
698
|
|
|
|
|
|
|
} |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
sub getName { |
701
|
0
|
|
|
0
|
|
|
return 'UnavailableException'; |
702
|
|
|
|
|
|
|
} |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
sub read { |
705
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
706
|
0
|
|
|
|
|
|
my $xfer = 0; |
707
|
0
|
|
|
|
|
|
my $fname; |
708
|
0
|
|
|
|
|
|
my $ftype = 0; |
709
|
0
|
|
|
|
|
|
my $fid = 0; |
710
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
711
|
0
|
|
|
|
|
|
while (1) |
712
|
|
|
|
|
|
|
{ |
713
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
714
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
715
|
0
|
|
|
|
|
|
last; |
716
|
|
|
|
|
|
|
} |
717
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
718
|
|
|
|
|
|
|
{ |
719
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
720
|
|
|
|
|
|
|
} |
721
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
722
|
|
|
|
|
|
|
} |
723
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
724
|
0
|
|
|
|
|
|
return $xfer; |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
sub write { |
728
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
729
|
0
|
|
|
|
|
|
my $xfer = 0; |
730
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('UnavailableException'); |
731
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
732
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
733
|
0
|
|
|
|
|
|
return $xfer; |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
package Cassandra::TimedOutException; |
737
|
|
|
|
|
|
|
BEGIN { |
738
|
1
|
|
|
1
|
|
27
|
$Cassandra::TimedOutException::VERSION = '0.4.0'; |
739
|
|
|
|
|
|
|
} |
740
|
1
|
|
|
1
|
|
6
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
496
|
|
741
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
548
|
|
742
|
|
|
|
|
|
|
|
743
|
|
|
|
|
|
|
sub new { |
744
|
0
|
|
|
0
|
|
|
my $classname = shift; |
745
|
0
|
|
|
|
|
|
my $self = {}; |
746
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
747
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
748
|
|
|
|
|
|
|
} |
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
sub getName { |
751
|
0
|
|
|
0
|
|
|
return 'TimedOutException'; |
752
|
|
|
|
|
|
|
} |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
sub read { |
755
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
756
|
0
|
|
|
|
|
|
my $xfer = 0; |
757
|
0
|
|
|
|
|
|
my $fname; |
758
|
0
|
|
|
|
|
|
my $ftype = 0; |
759
|
0
|
|
|
|
|
|
my $fid = 0; |
760
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
761
|
0
|
|
|
|
|
|
while (1) |
762
|
|
|
|
|
|
|
{ |
763
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
764
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
765
|
0
|
|
|
|
|
|
last; |
766
|
|
|
|
|
|
|
} |
767
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
768
|
|
|
|
|
|
|
{ |
769
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
770
|
|
|
|
|
|
|
} |
771
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
772
|
|
|
|
|
|
|
} |
773
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
774
|
0
|
|
|
|
|
|
return $xfer; |
775
|
|
|
|
|
|
|
} |
776
|
|
|
|
|
|
|
|
777
|
|
|
|
|
|
|
sub write { |
778
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
779
|
0
|
|
|
|
|
|
my $xfer = 0; |
780
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('TimedOutException'); |
781
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
782
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
783
|
0
|
|
|
|
|
|
return $xfer; |
784
|
|
|
|
|
|
|
} |
785
|
|
|
|
|
|
|
|
786
|
|
|
|
|
|
|
package Cassandra::AuthenticationException; |
787
|
|
|
|
|
|
|
BEGIN { |
788
|
1
|
|
|
1
|
|
23
|
$Cassandra::AuthenticationException::VERSION = '0.4.0'; |
789
|
|
|
|
|
|
|
} |
790
|
1
|
|
|
1
|
|
7
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
504
|
|
791
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
616
|
|
792
|
|
|
|
|
|
|
Cassandra::AuthenticationException->mk_accessors( qw( why ) ); |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
sub new { |
795
|
0
|
|
|
0
|
|
|
my $classname = shift; |
796
|
0
|
|
|
|
|
|
my $self = {}; |
797
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
798
|
0
|
|
|
|
|
|
$self->{why} = undef; |
799
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
800
|
0
|
0
|
|
|
|
|
if (defined $vals->{why}) { |
801
|
0
|
|
|
|
|
|
$self->{why} = $vals->{why}; |
802
|
|
|
|
|
|
|
} |
803
|
|
|
|
|
|
|
} |
804
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
805
|
|
|
|
|
|
|
} |
806
|
|
|
|
|
|
|
|
807
|
|
|
|
|
|
|
sub getName { |
808
|
0
|
|
|
0
|
|
|
return 'AuthenticationException'; |
809
|
|
|
|
|
|
|
} |
810
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
sub read { |
812
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
813
|
0
|
|
|
|
|
|
my $xfer = 0; |
814
|
0
|
|
|
|
|
|
my $fname; |
815
|
0
|
|
|
|
|
|
my $ftype = 0; |
816
|
0
|
|
|
|
|
|
my $fid = 0; |
817
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
818
|
0
|
|
|
|
|
|
while (1) |
819
|
|
|
|
|
|
|
{ |
820
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
821
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
822
|
0
|
|
|
|
|
|
last; |
823
|
|
|
|
|
|
|
} |
824
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
825
|
|
|
|
|
|
|
{ |
826
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
827
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{why}); |
828
|
|
|
|
|
|
|
} else { |
829
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
830
|
|
|
|
|
|
|
} |
831
|
0
|
|
|
|
|
|
last; }; |
832
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
833
|
|
|
|
|
|
|
} |
834
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
835
|
|
|
|
|
|
|
} |
836
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
837
|
0
|
|
|
|
|
|
return $xfer; |
838
|
|
|
|
|
|
|
} |
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
sub write { |
841
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
842
|
0
|
|
|
|
|
|
my $xfer = 0; |
843
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('AuthenticationException'); |
844
|
0
|
0
|
|
|
|
|
if (defined $self->{why}) { |
845
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('why', TType::STRING, 1); |
846
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{why}); |
847
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
848
|
|
|
|
|
|
|
} |
849
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
850
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
851
|
0
|
|
|
|
|
|
return $xfer; |
852
|
|
|
|
|
|
|
} |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
package Cassandra::AuthorizationException; |
855
|
|
|
|
|
|
|
BEGIN { |
856
|
1
|
|
|
1
|
|
29
|
$Cassandra::AuthorizationException::VERSION = '0.4.0'; |
857
|
|
|
|
|
|
|
} |
858
|
1
|
|
|
1
|
|
8
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
473
|
|
859
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
481
|
|
860
|
|
|
|
|
|
|
Cassandra::AuthorizationException->mk_accessors( qw( why ) ); |
861
|
|
|
|
|
|
|
|
862
|
|
|
|
|
|
|
sub new { |
863
|
0
|
|
|
0
|
|
|
my $classname = shift; |
864
|
0
|
|
|
|
|
|
my $self = {}; |
865
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
866
|
0
|
|
|
|
|
|
$self->{why} = undef; |
867
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
868
|
0
|
0
|
|
|
|
|
if (defined $vals->{why}) { |
869
|
0
|
|
|
|
|
|
$self->{why} = $vals->{why}; |
870
|
|
|
|
|
|
|
} |
871
|
|
|
|
|
|
|
} |
872
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
873
|
|
|
|
|
|
|
} |
874
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
sub getName { |
876
|
0
|
|
|
0
|
|
|
return 'AuthorizationException'; |
877
|
|
|
|
|
|
|
} |
878
|
|
|
|
|
|
|
|
879
|
|
|
|
|
|
|
sub read { |
880
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
881
|
0
|
|
|
|
|
|
my $xfer = 0; |
882
|
0
|
|
|
|
|
|
my $fname; |
883
|
0
|
|
|
|
|
|
my $ftype = 0; |
884
|
0
|
|
|
|
|
|
my $fid = 0; |
885
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
886
|
0
|
|
|
|
|
|
while (1) |
887
|
|
|
|
|
|
|
{ |
888
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
889
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
890
|
0
|
|
|
|
|
|
last; |
891
|
|
|
|
|
|
|
} |
892
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
893
|
|
|
|
|
|
|
{ |
894
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
895
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{why}); |
896
|
|
|
|
|
|
|
} else { |
897
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
898
|
|
|
|
|
|
|
} |
899
|
0
|
|
|
|
|
|
last; }; |
900
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
901
|
|
|
|
|
|
|
} |
902
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
903
|
|
|
|
|
|
|
} |
904
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
905
|
0
|
|
|
|
|
|
return $xfer; |
906
|
|
|
|
|
|
|
} |
907
|
|
|
|
|
|
|
|
908
|
|
|
|
|
|
|
sub write { |
909
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
910
|
0
|
|
|
|
|
|
my $xfer = 0; |
911
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('AuthorizationException'); |
912
|
0
|
0
|
|
|
|
|
if (defined $self->{why}) { |
913
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('why', TType::STRING, 1); |
914
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{why}); |
915
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
916
|
|
|
|
|
|
|
} |
917
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
918
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
919
|
0
|
|
|
|
|
|
return $xfer; |
920
|
|
|
|
|
|
|
} |
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
package Cassandra::SchemaDisagreementException; |
923
|
|
|
|
|
|
|
BEGIN { |
924
|
1
|
|
|
1
|
|
20
|
$Cassandra::SchemaDisagreementException::VERSION = '0.4.0'; |
925
|
|
|
|
|
|
|
} |
926
|
1
|
|
|
1
|
|
6
|
use base qw(Thrift::TException); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
642
|
|
927
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
355
|
|
928
|
|
|
|
|
|
|
|
929
|
|
|
|
|
|
|
sub new { |
930
|
0
|
|
|
0
|
|
|
my $classname = shift; |
931
|
0
|
|
|
|
|
|
my $self = {}; |
932
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
933
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
934
|
|
|
|
|
|
|
} |
935
|
|
|
|
|
|
|
|
936
|
|
|
|
|
|
|
sub getName { |
937
|
0
|
|
|
0
|
|
|
return 'SchemaDisagreementException'; |
938
|
|
|
|
|
|
|
} |
939
|
|
|
|
|
|
|
|
940
|
|
|
|
|
|
|
sub read { |
941
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
942
|
0
|
|
|
|
|
|
my $xfer = 0; |
943
|
0
|
|
|
|
|
|
my $fname; |
944
|
0
|
|
|
|
|
|
my $ftype = 0; |
945
|
0
|
|
|
|
|
|
my $fid = 0; |
946
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
947
|
0
|
|
|
|
|
|
while (1) |
948
|
|
|
|
|
|
|
{ |
949
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
950
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
951
|
0
|
|
|
|
|
|
last; |
952
|
|
|
|
|
|
|
} |
953
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
954
|
|
|
|
|
|
|
{ |
955
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
956
|
|
|
|
|
|
|
} |
957
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
958
|
|
|
|
|
|
|
} |
959
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
960
|
0
|
|
|
|
|
|
return $xfer; |
961
|
|
|
|
|
|
|
} |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
sub write { |
964
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
965
|
0
|
|
|
|
|
|
my $xfer = 0; |
966
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('SchemaDisagreementException'); |
967
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
968
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
969
|
0
|
|
|
|
|
|
return $xfer; |
970
|
|
|
|
|
|
|
} |
971
|
|
|
|
|
|
|
|
972
|
|
|
|
|
|
|
package Cassandra::ColumnParent; |
973
|
|
|
|
|
|
|
BEGIN { |
974
|
1
|
|
|
1
|
|
20
|
$Cassandra::ColumnParent::VERSION = '0.4.0'; |
975
|
|
|
|
|
|
|
} |
976
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
625
|
|
977
|
|
|
|
|
|
|
Cassandra::ColumnParent->mk_accessors( qw( column_family super_column ) ); |
978
|
|
|
|
|
|
|
|
979
|
|
|
|
|
|
|
sub new { |
980
|
0
|
|
|
0
|
|
|
my $classname = shift; |
981
|
0
|
|
|
|
|
|
my $self = {}; |
982
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
983
|
0
|
|
|
|
|
|
$self->{column_family} = undef; |
984
|
0
|
|
|
|
|
|
$self->{super_column} = undef; |
985
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
986
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_family}) { |
987
|
0
|
|
|
|
|
|
$self->{column_family} = $vals->{column_family}; |
988
|
|
|
|
|
|
|
} |
989
|
0
|
0
|
|
|
|
|
if (defined $vals->{super_column}) { |
990
|
0
|
|
|
|
|
|
$self->{super_column} = $vals->{super_column}; |
991
|
|
|
|
|
|
|
} |
992
|
|
|
|
|
|
|
} |
993
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
994
|
|
|
|
|
|
|
} |
995
|
|
|
|
|
|
|
|
996
|
|
|
|
|
|
|
sub getName { |
997
|
0
|
|
|
0
|
|
|
return 'ColumnParent'; |
998
|
|
|
|
|
|
|
} |
999
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
sub read { |
1001
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1002
|
0
|
|
|
|
|
|
my $xfer = 0; |
1003
|
0
|
|
|
|
|
|
my $fname; |
1004
|
0
|
|
|
|
|
|
my $ftype = 0; |
1005
|
0
|
|
|
|
|
|
my $fid = 0; |
1006
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1007
|
0
|
|
|
|
|
|
while (1) |
1008
|
|
|
|
|
|
|
{ |
1009
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1010
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1011
|
0
|
|
|
|
|
|
last; |
1012
|
|
|
|
|
|
|
} |
1013
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1014
|
|
|
|
|
|
|
{ |
1015
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1016
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{column_family}); |
1017
|
|
|
|
|
|
|
} else { |
1018
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1019
|
|
|
|
|
|
|
} |
1020
|
0
|
|
|
|
|
|
last; }; |
1021
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1022
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{super_column}); |
1023
|
|
|
|
|
|
|
} else { |
1024
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1025
|
|
|
|
|
|
|
} |
1026
|
0
|
|
|
|
|
|
last; }; |
1027
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1028
|
|
|
|
|
|
|
} |
1029
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1030
|
|
|
|
|
|
|
} |
1031
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1032
|
0
|
|
|
|
|
|
return $xfer; |
1033
|
|
|
|
|
|
|
} |
1034
|
|
|
|
|
|
|
|
1035
|
|
|
|
|
|
|
sub write { |
1036
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1037
|
0
|
|
|
|
|
|
my $xfer = 0; |
1038
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('ColumnParent'); |
1039
|
0
|
0
|
|
|
|
|
if (defined $self->{column_family}) { |
1040
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_family', TType::STRING, 3); |
1041
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{column_family}); |
1042
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1043
|
|
|
|
|
|
|
} |
1044
|
0
|
0
|
|
|
|
|
if (defined $self->{super_column}) { |
1045
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('super_column', TType::STRING, 4); |
1046
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{super_column}); |
1047
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1048
|
|
|
|
|
|
|
} |
1049
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1050
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1051
|
0
|
|
|
|
|
|
return $xfer; |
1052
|
|
|
|
|
|
|
} |
1053
|
|
|
|
|
|
|
|
1054
|
|
|
|
|
|
|
package Cassandra::ColumnPath; |
1055
|
|
|
|
|
|
|
BEGIN { |
1056
|
1
|
|
|
1
|
|
19
|
$Cassandra::ColumnPath::VERSION = '0.4.0'; |
1057
|
|
|
|
|
|
|
} |
1058
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
736
|
|
1059
|
|
|
|
|
|
|
Cassandra::ColumnPath->mk_accessors( qw( column_family super_column column ) ); |
1060
|
|
|
|
|
|
|
|
1061
|
|
|
|
|
|
|
sub new { |
1062
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1063
|
0
|
|
|
|
|
|
my $self = {}; |
1064
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1065
|
0
|
|
|
|
|
|
$self->{column_family} = undef; |
1066
|
0
|
|
|
|
|
|
$self->{super_column} = undef; |
1067
|
0
|
|
|
|
|
|
$self->{column} = undef; |
1068
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1069
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_family}) { |
1070
|
0
|
|
|
|
|
|
$self->{column_family} = $vals->{column_family}; |
1071
|
|
|
|
|
|
|
} |
1072
|
0
|
0
|
|
|
|
|
if (defined $vals->{super_column}) { |
1073
|
0
|
|
|
|
|
|
$self->{super_column} = $vals->{super_column}; |
1074
|
|
|
|
|
|
|
} |
1075
|
0
|
0
|
|
|
|
|
if (defined $vals->{column}) { |
1076
|
0
|
|
|
|
|
|
$self->{column} = $vals->{column}; |
1077
|
|
|
|
|
|
|
} |
1078
|
|
|
|
|
|
|
} |
1079
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1080
|
|
|
|
|
|
|
} |
1081
|
|
|
|
|
|
|
|
1082
|
|
|
|
|
|
|
sub getName { |
1083
|
0
|
|
|
0
|
|
|
return 'ColumnPath'; |
1084
|
|
|
|
|
|
|
} |
1085
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
sub read { |
1087
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1088
|
0
|
|
|
|
|
|
my $xfer = 0; |
1089
|
0
|
|
|
|
|
|
my $fname; |
1090
|
0
|
|
|
|
|
|
my $ftype = 0; |
1091
|
0
|
|
|
|
|
|
my $fid = 0; |
1092
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1093
|
0
|
|
|
|
|
|
while (1) |
1094
|
|
|
|
|
|
|
{ |
1095
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1096
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1097
|
0
|
|
|
|
|
|
last; |
1098
|
|
|
|
|
|
|
} |
1099
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1100
|
|
|
|
|
|
|
{ |
1101
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1102
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{column_family}); |
1103
|
|
|
|
|
|
|
} else { |
1104
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1105
|
|
|
|
|
|
|
} |
1106
|
0
|
|
|
|
|
|
last; }; |
1107
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1108
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{super_column}); |
1109
|
|
|
|
|
|
|
} else { |
1110
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1111
|
|
|
|
|
|
|
} |
1112
|
0
|
|
|
|
|
|
last; }; |
1113
|
0
|
0
|
|
|
|
|
/^5$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1114
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{column}); |
1115
|
|
|
|
|
|
|
} else { |
1116
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1117
|
|
|
|
|
|
|
} |
1118
|
0
|
|
|
|
|
|
last; }; |
1119
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1120
|
|
|
|
|
|
|
} |
1121
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1122
|
|
|
|
|
|
|
} |
1123
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1124
|
0
|
|
|
|
|
|
return $xfer; |
1125
|
|
|
|
|
|
|
} |
1126
|
|
|
|
|
|
|
|
1127
|
|
|
|
|
|
|
sub write { |
1128
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1129
|
0
|
|
|
|
|
|
my $xfer = 0; |
1130
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('ColumnPath'); |
1131
|
0
|
0
|
|
|
|
|
if (defined $self->{column_family}) { |
1132
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_family', TType::STRING, 3); |
1133
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{column_family}); |
1134
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1135
|
|
|
|
|
|
|
} |
1136
|
0
|
0
|
|
|
|
|
if (defined $self->{super_column}) { |
1137
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('super_column', TType::STRING, 4); |
1138
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{super_column}); |
1139
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1140
|
|
|
|
|
|
|
} |
1141
|
0
|
0
|
|
|
|
|
if (defined $self->{column}) { |
1142
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column', TType::STRING, 5); |
1143
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{column}); |
1144
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1145
|
|
|
|
|
|
|
} |
1146
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1147
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1148
|
0
|
|
|
|
|
|
return $xfer; |
1149
|
|
|
|
|
|
|
} |
1150
|
|
|
|
|
|
|
|
1151
|
|
|
|
|
|
|
package Cassandra::SliceRange; |
1152
|
|
|
|
|
|
|
BEGIN { |
1153
|
1
|
|
|
1
|
|
20
|
$Cassandra::SliceRange::VERSION = '0.4.0'; |
1154
|
|
|
|
|
|
|
} |
1155
|
1
|
|
|
1
|
|
12
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
1806
|
|
1156
|
|
|
|
|
|
|
Cassandra::SliceRange->mk_accessors( qw( start finish reversed count ) ); |
1157
|
|
|
|
|
|
|
|
1158
|
|
|
|
|
|
|
sub new { |
1159
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1160
|
0
|
|
|
|
|
|
my $self = {}; |
1161
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1162
|
0
|
|
|
|
|
|
$self->{start} = undef; |
1163
|
0
|
|
|
|
|
|
$self->{finish} = undef; |
1164
|
0
|
|
|
|
|
|
$self->{reversed} = 0; |
1165
|
0
|
|
|
|
|
|
$self->{count} = 100; |
1166
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1167
|
0
|
0
|
|
|
|
|
if (defined $vals->{start}) { |
1168
|
0
|
|
|
|
|
|
$self->{start} = $vals->{start}; |
1169
|
|
|
|
|
|
|
} |
1170
|
0
|
0
|
|
|
|
|
if (defined $vals->{finish}) { |
1171
|
0
|
|
|
|
|
|
$self->{finish} = $vals->{finish}; |
1172
|
|
|
|
|
|
|
} |
1173
|
0
|
0
|
|
|
|
|
if (defined $vals->{reversed}) { |
1174
|
0
|
|
|
|
|
|
$self->{reversed} = $vals->{reversed}; |
1175
|
|
|
|
|
|
|
} |
1176
|
0
|
0
|
|
|
|
|
if (defined $vals->{count}) { |
1177
|
0
|
|
|
|
|
|
$self->{count} = $vals->{count}; |
1178
|
|
|
|
|
|
|
} |
1179
|
|
|
|
|
|
|
} |
1180
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1181
|
|
|
|
|
|
|
} |
1182
|
|
|
|
|
|
|
|
1183
|
|
|
|
|
|
|
sub getName { |
1184
|
0
|
|
|
0
|
|
|
return 'SliceRange'; |
1185
|
|
|
|
|
|
|
} |
1186
|
|
|
|
|
|
|
|
1187
|
|
|
|
|
|
|
sub read { |
1188
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1189
|
0
|
|
|
|
|
|
my $xfer = 0; |
1190
|
0
|
|
|
|
|
|
my $fname; |
1191
|
0
|
|
|
|
|
|
my $ftype = 0; |
1192
|
0
|
|
|
|
|
|
my $fid = 0; |
1193
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1194
|
0
|
|
|
|
|
|
while (1) |
1195
|
|
|
|
|
|
|
{ |
1196
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1197
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1198
|
0
|
|
|
|
|
|
last; |
1199
|
|
|
|
|
|
|
} |
1200
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1201
|
|
|
|
|
|
|
{ |
1202
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1203
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{start}); |
1204
|
|
|
|
|
|
|
} else { |
1205
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1206
|
|
|
|
|
|
|
} |
1207
|
0
|
|
|
|
|
|
last; }; |
1208
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1209
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{finish}); |
1210
|
|
|
|
|
|
|
} else { |
1211
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1212
|
|
|
|
|
|
|
} |
1213
|
0
|
|
|
|
|
|
last; }; |
1214
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::BOOL) { |
|
0
|
0
|
|
|
|
|
|
1215
|
0
|
|
|
|
|
|
$xfer += $input->readBool(\$self->{reversed}); |
1216
|
|
|
|
|
|
|
} else { |
1217
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1218
|
|
|
|
|
|
|
} |
1219
|
0
|
|
|
|
|
|
last; }; |
1220
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
1221
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{count}); |
1222
|
|
|
|
|
|
|
} else { |
1223
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1224
|
|
|
|
|
|
|
} |
1225
|
0
|
|
|
|
|
|
last; }; |
1226
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1227
|
|
|
|
|
|
|
} |
1228
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1229
|
|
|
|
|
|
|
} |
1230
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1231
|
0
|
|
|
|
|
|
return $xfer; |
1232
|
|
|
|
|
|
|
} |
1233
|
|
|
|
|
|
|
|
1234
|
|
|
|
|
|
|
sub write { |
1235
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1236
|
0
|
|
|
|
|
|
my $xfer = 0; |
1237
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('SliceRange'); |
1238
|
0
|
0
|
|
|
|
|
if (defined $self->{start}) { |
1239
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('start', TType::STRING, 1); |
1240
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{start}); |
1241
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1242
|
|
|
|
|
|
|
} |
1243
|
0
|
0
|
|
|
|
|
if (defined $self->{finish}) { |
1244
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('finish', TType::STRING, 2); |
1245
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{finish}); |
1246
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1247
|
|
|
|
|
|
|
} |
1248
|
0
|
0
|
|
|
|
|
if (defined $self->{reversed}) { |
1249
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('reversed', TType::BOOL, 3); |
1250
|
0
|
|
|
|
|
|
$xfer += $output->writeBool($self->{reversed}); |
1251
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1252
|
|
|
|
|
|
|
} |
1253
|
0
|
0
|
|
|
|
|
if (defined $self->{count}) { |
1254
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('count', TType::I32, 4); |
1255
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{count}); |
1256
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1257
|
|
|
|
|
|
|
} |
1258
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1259
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1260
|
0
|
|
|
|
|
|
return $xfer; |
1261
|
|
|
|
|
|
|
} |
1262
|
|
|
|
|
|
|
|
1263
|
|
|
|
|
|
|
package Cassandra::SlicePredicate; |
1264
|
|
|
|
|
|
|
BEGIN { |
1265
|
1
|
|
|
1
|
|
23
|
$Cassandra::SlicePredicate::VERSION = '0.4.0'; |
1266
|
|
|
|
|
|
|
} |
1267
|
1
|
|
|
1
|
|
8
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
886
|
|
1268
|
|
|
|
|
|
|
Cassandra::SlicePredicate->mk_accessors( qw( column_names slice_range ) ); |
1269
|
|
|
|
|
|
|
|
1270
|
|
|
|
|
|
|
sub new { |
1271
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1272
|
0
|
|
|
|
|
|
my $self = {}; |
1273
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1274
|
0
|
|
|
|
|
|
$self->{column_names} = undef; |
1275
|
0
|
|
|
|
|
|
$self->{slice_range} = undef; |
1276
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1277
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_names}) { |
1278
|
0
|
|
|
|
|
|
$self->{column_names} = $vals->{column_names}; |
1279
|
|
|
|
|
|
|
} |
1280
|
0
|
0
|
|
|
|
|
if (defined $vals->{slice_range}) { |
1281
|
0
|
|
|
|
|
|
$self->{slice_range} = $vals->{slice_range}; |
1282
|
|
|
|
|
|
|
} |
1283
|
|
|
|
|
|
|
} |
1284
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1285
|
|
|
|
|
|
|
} |
1286
|
|
|
|
|
|
|
|
1287
|
|
|
|
|
|
|
sub getName { |
1288
|
0
|
|
|
0
|
|
|
return 'SlicePredicate'; |
1289
|
|
|
|
|
|
|
} |
1290
|
|
|
|
|
|
|
|
1291
|
|
|
|
|
|
|
sub read { |
1292
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1293
|
0
|
|
|
|
|
|
my $xfer = 0; |
1294
|
0
|
|
|
|
|
|
my $fname; |
1295
|
0
|
|
|
|
|
|
my $ftype = 0; |
1296
|
0
|
|
|
|
|
|
my $fid = 0; |
1297
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1298
|
0
|
|
|
|
|
|
while (1) |
1299
|
|
|
|
|
|
|
{ |
1300
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1301
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1302
|
0
|
|
|
|
|
|
last; |
1303
|
|
|
|
|
|
|
} |
1304
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1305
|
|
|
|
|
|
|
{ |
1306
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
1307
|
|
|
|
|
|
|
{ |
1308
|
0
|
|
|
|
|
|
my $_size14 = 0; |
|
0
|
|
|
|
|
|
|
1309
|
0
|
|
|
|
|
|
$self->{column_names} = []; |
1310
|
0
|
|
|
|
|
|
my $_etype17 = 0; |
1311
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype17, \$_size14); |
1312
|
0
|
|
|
|
|
|
for (my $_i18 = 0; $_i18 < $_size14; ++$_i18) |
1313
|
|
|
|
|
|
|
{ |
1314
|
0
|
|
|
|
|
|
my $elem19 = undef; |
1315
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$elem19); |
1316
|
0
|
|
|
|
|
|
push(@{$self->{column_names}},$elem19); |
|
0
|
|
|
|
|
|
|
1317
|
|
|
|
|
|
|
} |
1318
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
1319
|
|
|
|
|
|
|
} |
1320
|
|
|
|
|
|
|
} else { |
1321
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1322
|
|
|
|
|
|
|
} |
1323
|
0
|
|
|
|
|
|
last; }; |
1324
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
1325
|
0
|
|
|
|
|
|
$self->{slice_range} = new Cassandra::SliceRange(); |
1326
|
0
|
|
|
|
|
|
$xfer += $self->{slice_range}->read($input); |
1327
|
|
|
|
|
|
|
} else { |
1328
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1329
|
|
|
|
|
|
|
} |
1330
|
0
|
|
|
|
|
|
last; }; |
1331
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1332
|
|
|
|
|
|
|
} |
1333
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1334
|
|
|
|
|
|
|
} |
1335
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1336
|
0
|
|
|
|
|
|
return $xfer; |
1337
|
|
|
|
|
|
|
} |
1338
|
|
|
|
|
|
|
|
1339
|
|
|
|
|
|
|
sub write { |
1340
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1341
|
0
|
|
|
|
|
|
my $xfer = 0; |
1342
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('SlicePredicate'); |
1343
|
0
|
0
|
|
|
|
|
if (defined $self->{column_names}) { |
1344
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_names', TType::LIST, 1); |
1345
|
|
|
|
|
|
|
{ |
1346
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{column_names}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1347
|
|
|
|
|
|
|
{ |
1348
|
0
|
|
|
|
|
|
foreach my $iter20 (@{$self->{column_names}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1349
|
|
|
|
|
|
|
{ |
1350
|
0
|
|
|
|
|
|
$xfer += $output->writeString($iter20); |
1351
|
|
|
|
|
|
|
} |
1352
|
|
|
|
|
|
|
} |
1353
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
1354
|
|
|
|
|
|
|
} |
1355
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1356
|
|
|
|
|
|
|
} |
1357
|
0
|
0
|
|
|
|
|
if (defined $self->{slice_range}) { |
1358
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('slice_range', TType::STRUCT, 2); |
1359
|
0
|
|
|
|
|
|
$xfer += $self->{slice_range}->write($output); |
1360
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1361
|
|
|
|
|
|
|
} |
1362
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1363
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1364
|
0
|
|
|
|
|
|
return $xfer; |
1365
|
|
|
|
|
|
|
} |
1366
|
|
|
|
|
|
|
|
1367
|
|
|
|
|
|
|
package Cassandra::IndexExpression; |
1368
|
|
|
|
|
|
|
BEGIN { |
1369
|
1
|
|
|
1
|
|
22
|
$Cassandra::IndexExpression::VERSION = '0.4.0'; |
1370
|
|
|
|
|
|
|
} |
1371
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
838
|
|
1372
|
|
|
|
|
|
|
Cassandra::IndexExpression->mk_accessors( qw( column_name op value ) ); |
1373
|
|
|
|
|
|
|
|
1374
|
|
|
|
|
|
|
sub new { |
1375
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1376
|
0
|
|
|
|
|
|
my $self = {}; |
1377
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1378
|
0
|
|
|
|
|
|
$self->{column_name} = undef; |
1379
|
0
|
|
|
|
|
|
$self->{op} = undef; |
1380
|
0
|
|
|
|
|
|
$self->{value} = undef; |
1381
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1382
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_name}) { |
1383
|
0
|
|
|
|
|
|
$self->{column_name} = $vals->{column_name}; |
1384
|
|
|
|
|
|
|
} |
1385
|
0
|
0
|
|
|
|
|
if (defined $vals->{op}) { |
1386
|
0
|
|
|
|
|
|
$self->{op} = $vals->{op}; |
1387
|
|
|
|
|
|
|
} |
1388
|
0
|
0
|
|
|
|
|
if (defined $vals->{value}) { |
1389
|
0
|
|
|
|
|
|
$self->{value} = $vals->{value}; |
1390
|
|
|
|
|
|
|
} |
1391
|
|
|
|
|
|
|
} |
1392
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1393
|
|
|
|
|
|
|
} |
1394
|
|
|
|
|
|
|
|
1395
|
|
|
|
|
|
|
sub getName { |
1396
|
0
|
|
|
0
|
|
|
return 'IndexExpression'; |
1397
|
|
|
|
|
|
|
} |
1398
|
|
|
|
|
|
|
|
1399
|
|
|
|
|
|
|
sub read { |
1400
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1401
|
0
|
|
|
|
|
|
my $xfer = 0; |
1402
|
0
|
|
|
|
|
|
my $fname; |
1403
|
0
|
|
|
|
|
|
my $ftype = 0; |
1404
|
0
|
|
|
|
|
|
my $fid = 0; |
1405
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1406
|
0
|
|
|
|
|
|
while (1) |
1407
|
|
|
|
|
|
|
{ |
1408
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1409
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1410
|
0
|
|
|
|
|
|
last; |
1411
|
|
|
|
|
|
|
} |
1412
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1413
|
|
|
|
|
|
|
{ |
1414
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1415
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{column_name}); |
1416
|
|
|
|
|
|
|
} else { |
1417
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1418
|
|
|
|
|
|
|
} |
1419
|
0
|
|
|
|
|
|
last; }; |
1420
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
1421
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{op}); |
1422
|
|
|
|
|
|
|
} else { |
1423
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1424
|
|
|
|
|
|
|
} |
1425
|
0
|
|
|
|
|
|
last; }; |
1426
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1427
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{value}); |
1428
|
|
|
|
|
|
|
} else { |
1429
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1430
|
|
|
|
|
|
|
} |
1431
|
0
|
|
|
|
|
|
last; }; |
1432
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1433
|
|
|
|
|
|
|
} |
1434
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1435
|
|
|
|
|
|
|
} |
1436
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1437
|
0
|
|
|
|
|
|
return $xfer; |
1438
|
|
|
|
|
|
|
} |
1439
|
|
|
|
|
|
|
|
1440
|
|
|
|
|
|
|
sub write { |
1441
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1442
|
0
|
|
|
|
|
|
my $xfer = 0; |
1443
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('IndexExpression'); |
1444
|
0
|
0
|
|
|
|
|
if (defined $self->{column_name}) { |
1445
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_name', TType::STRING, 1); |
1446
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{column_name}); |
1447
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1448
|
|
|
|
|
|
|
} |
1449
|
0
|
0
|
|
|
|
|
if (defined $self->{op}) { |
1450
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('op', TType::I32, 2); |
1451
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{op}); |
1452
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1453
|
|
|
|
|
|
|
} |
1454
|
0
|
0
|
|
|
|
|
if (defined $self->{value}) { |
1455
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('value', TType::STRING, 3); |
1456
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{value}); |
1457
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1458
|
|
|
|
|
|
|
} |
1459
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1460
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1461
|
0
|
|
|
|
|
|
return $xfer; |
1462
|
|
|
|
|
|
|
} |
1463
|
|
|
|
|
|
|
|
1464
|
|
|
|
|
|
|
package Cassandra::IndexClause; |
1465
|
|
|
|
|
|
|
BEGIN { |
1466
|
1
|
|
|
1
|
|
23
|
$Cassandra::IndexClause::VERSION = '0.4.0'; |
1467
|
|
|
|
|
|
|
} |
1468
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
8
|
|
|
1
|
|
|
|
|
876
|
|
1469
|
|
|
|
|
|
|
Cassandra::IndexClause->mk_accessors( qw( expressions start_key count ) ); |
1470
|
|
|
|
|
|
|
|
1471
|
|
|
|
|
|
|
sub new { |
1472
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1473
|
0
|
|
|
|
|
|
my $self = {}; |
1474
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1475
|
0
|
|
|
|
|
|
$self->{expressions} = undef; |
1476
|
0
|
|
|
|
|
|
$self->{start_key} = undef; |
1477
|
0
|
|
|
|
|
|
$self->{count} = 100; |
1478
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1479
|
0
|
0
|
|
|
|
|
if (defined $vals->{expressions}) { |
1480
|
0
|
|
|
|
|
|
$self->{expressions} = $vals->{expressions}; |
1481
|
|
|
|
|
|
|
} |
1482
|
0
|
0
|
|
|
|
|
if (defined $vals->{start_key}) { |
1483
|
0
|
|
|
|
|
|
$self->{start_key} = $vals->{start_key}; |
1484
|
|
|
|
|
|
|
} |
1485
|
0
|
0
|
|
|
|
|
if (defined $vals->{count}) { |
1486
|
0
|
|
|
|
|
|
$self->{count} = $vals->{count}; |
1487
|
|
|
|
|
|
|
} |
1488
|
|
|
|
|
|
|
} |
1489
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1490
|
|
|
|
|
|
|
} |
1491
|
|
|
|
|
|
|
|
1492
|
|
|
|
|
|
|
sub getName { |
1493
|
0
|
|
|
0
|
|
|
return 'IndexClause'; |
1494
|
|
|
|
|
|
|
} |
1495
|
|
|
|
|
|
|
|
1496
|
|
|
|
|
|
|
sub read { |
1497
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1498
|
0
|
|
|
|
|
|
my $xfer = 0; |
1499
|
0
|
|
|
|
|
|
my $fname; |
1500
|
0
|
|
|
|
|
|
my $ftype = 0; |
1501
|
0
|
|
|
|
|
|
my $fid = 0; |
1502
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1503
|
0
|
|
|
|
|
|
while (1) |
1504
|
|
|
|
|
|
|
{ |
1505
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1506
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1507
|
0
|
|
|
|
|
|
last; |
1508
|
|
|
|
|
|
|
} |
1509
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1510
|
|
|
|
|
|
|
{ |
1511
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
{ |
1513
|
0
|
|
|
|
|
|
my $_size21 = 0; |
|
0
|
|
|
|
|
|
|
1514
|
0
|
|
|
|
|
|
$self->{expressions} = []; |
1515
|
0
|
|
|
|
|
|
my $_etype24 = 0; |
1516
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype24, \$_size21); |
1517
|
0
|
|
|
|
|
|
for (my $_i25 = 0; $_i25 < $_size21; ++$_i25) |
1518
|
|
|
|
|
|
|
{ |
1519
|
0
|
|
|
|
|
|
my $elem26 = undef; |
1520
|
0
|
|
|
|
|
|
$elem26 = new Cassandra::IndexExpression(); |
1521
|
0
|
|
|
|
|
|
$xfer += $elem26->read($input); |
1522
|
0
|
|
|
|
|
|
push(@{$self->{expressions}},$elem26); |
|
0
|
|
|
|
|
|
|
1523
|
|
|
|
|
|
|
} |
1524
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
1525
|
|
|
|
|
|
|
} |
1526
|
|
|
|
|
|
|
} else { |
1527
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1528
|
|
|
|
|
|
|
} |
1529
|
0
|
|
|
|
|
|
last; }; |
1530
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1531
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{start_key}); |
1532
|
|
|
|
|
|
|
} else { |
1533
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1534
|
|
|
|
|
|
|
} |
1535
|
0
|
|
|
|
|
|
last; }; |
1536
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
1537
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{count}); |
1538
|
|
|
|
|
|
|
} else { |
1539
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1540
|
|
|
|
|
|
|
} |
1541
|
0
|
|
|
|
|
|
last; }; |
1542
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1543
|
|
|
|
|
|
|
} |
1544
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1545
|
|
|
|
|
|
|
} |
1546
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1547
|
0
|
|
|
|
|
|
return $xfer; |
1548
|
|
|
|
|
|
|
} |
1549
|
|
|
|
|
|
|
|
1550
|
|
|
|
|
|
|
sub write { |
1551
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1552
|
0
|
|
|
|
|
|
my $xfer = 0; |
1553
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('IndexClause'); |
1554
|
0
|
0
|
|
|
|
|
if (defined $self->{expressions}) { |
1555
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('expressions', TType::LIST, 1); |
1556
|
|
|
|
|
|
|
{ |
1557
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{expressions}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1558
|
|
|
|
|
|
|
{ |
1559
|
0
|
|
|
|
|
|
foreach my $iter27 (@{$self->{expressions}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1560
|
|
|
|
|
|
|
{ |
1561
|
0
|
|
|
|
|
|
$xfer += ${iter27}->write($output); |
1562
|
|
|
|
|
|
|
} |
1563
|
|
|
|
|
|
|
} |
1564
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
1565
|
|
|
|
|
|
|
} |
1566
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1567
|
|
|
|
|
|
|
} |
1568
|
0
|
0
|
|
|
|
|
if (defined $self->{start_key}) { |
1569
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('start_key', TType::STRING, 2); |
1570
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{start_key}); |
1571
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1572
|
|
|
|
|
|
|
} |
1573
|
0
|
0
|
|
|
|
|
if (defined $self->{count}) { |
1574
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('count', TType::I32, 3); |
1575
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{count}); |
1576
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1577
|
|
|
|
|
|
|
} |
1578
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1579
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1580
|
0
|
|
|
|
|
|
return $xfer; |
1581
|
|
|
|
|
|
|
} |
1582
|
|
|
|
|
|
|
|
1583
|
|
|
|
|
|
|
package Cassandra::KeyRange; |
1584
|
|
|
|
|
|
|
BEGIN { |
1585
|
1
|
|
|
1
|
|
24
|
$Cassandra::KeyRange::VERSION = '0.4.0'; |
1586
|
|
|
|
|
|
|
} |
1587
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
977
|
|
1588
|
|
|
|
|
|
|
Cassandra::KeyRange->mk_accessors( qw( start_key end_key start_token end_token count ) ); |
1589
|
|
|
|
|
|
|
|
1590
|
|
|
|
|
|
|
sub new { |
1591
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1592
|
0
|
|
|
|
|
|
my $self = {}; |
1593
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1594
|
0
|
|
|
|
|
|
$self->{start_key} = undef; |
1595
|
0
|
|
|
|
|
|
$self->{end_key} = undef; |
1596
|
0
|
|
|
|
|
|
$self->{start_token} = undef; |
1597
|
0
|
|
|
|
|
|
$self->{end_token} = undef; |
1598
|
0
|
|
|
|
|
|
$self->{count} = 100; |
1599
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1600
|
0
|
0
|
|
|
|
|
if (defined $vals->{start_key}) { |
1601
|
0
|
|
|
|
|
|
$self->{start_key} = $vals->{start_key}; |
1602
|
|
|
|
|
|
|
} |
1603
|
0
|
0
|
|
|
|
|
if (defined $vals->{end_key}) { |
1604
|
0
|
|
|
|
|
|
$self->{end_key} = $vals->{end_key}; |
1605
|
|
|
|
|
|
|
} |
1606
|
0
|
0
|
|
|
|
|
if (defined $vals->{start_token}) { |
1607
|
0
|
|
|
|
|
|
$self->{start_token} = $vals->{start_token}; |
1608
|
|
|
|
|
|
|
} |
1609
|
0
|
0
|
|
|
|
|
if (defined $vals->{end_token}) { |
1610
|
0
|
|
|
|
|
|
$self->{end_token} = $vals->{end_token}; |
1611
|
|
|
|
|
|
|
} |
1612
|
0
|
0
|
|
|
|
|
if (defined $vals->{count}) { |
1613
|
0
|
|
|
|
|
|
$self->{count} = $vals->{count}; |
1614
|
|
|
|
|
|
|
} |
1615
|
|
|
|
|
|
|
} |
1616
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1617
|
|
|
|
|
|
|
} |
1618
|
|
|
|
|
|
|
|
1619
|
|
|
|
|
|
|
sub getName { |
1620
|
0
|
|
|
0
|
|
|
return 'KeyRange'; |
1621
|
|
|
|
|
|
|
} |
1622
|
|
|
|
|
|
|
|
1623
|
|
|
|
|
|
|
sub read { |
1624
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1625
|
0
|
|
|
|
|
|
my $xfer = 0; |
1626
|
0
|
|
|
|
|
|
my $fname; |
1627
|
0
|
|
|
|
|
|
my $ftype = 0; |
1628
|
0
|
|
|
|
|
|
my $fid = 0; |
1629
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1630
|
0
|
|
|
|
|
|
while (1) |
1631
|
|
|
|
|
|
|
{ |
1632
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1633
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1634
|
0
|
|
|
|
|
|
last; |
1635
|
|
|
|
|
|
|
} |
1636
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1637
|
|
|
|
|
|
|
{ |
1638
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1639
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{start_key}); |
1640
|
|
|
|
|
|
|
} else { |
1641
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1642
|
|
|
|
|
|
|
} |
1643
|
0
|
|
|
|
|
|
last; }; |
1644
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1645
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{end_key}); |
1646
|
|
|
|
|
|
|
} else { |
1647
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1648
|
|
|
|
|
|
|
} |
1649
|
0
|
|
|
|
|
|
last; }; |
1650
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1651
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{start_token}); |
1652
|
|
|
|
|
|
|
} else { |
1653
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1654
|
|
|
|
|
|
|
} |
1655
|
0
|
|
|
|
|
|
last; }; |
1656
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1657
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{end_token}); |
1658
|
|
|
|
|
|
|
} else { |
1659
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1660
|
|
|
|
|
|
|
} |
1661
|
0
|
|
|
|
|
|
last; }; |
1662
|
0
|
0
|
|
|
|
|
/^5$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
1663
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{count}); |
1664
|
|
|
|
|
|
|
} else { |
1665
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1666
|
|
|
|
|
|
|
} |
1667
|
0
|
|
|
|
|
|
last; }; |
1668
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1669
|
|
|
|
|
|
|
} |
1670
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1671
|
|
|
|
|
|
|
} |
1672
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1673
|
0
|
|
|
|
|
|
return $xfer; |
1674
|
|
|
|
|
|
|
} |
1675
|
|
|
|
|
|
|
|
1676
|
|
|
|
|
|
|
sub write { |
1677
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1678
|
0
|
|
|
|
|
|
my $xfer = 0; |
1679
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('KeyRange'); |
1680
|
0
|
0
|
|
|
|
|
if (defined $self->{start_key}) { |
1681
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('start_key', TType::STRING, 1); |
1682
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{start_key}); |
1683
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1684
|
|
|
|
|
|
|
} |
1685
|
0
|
0
|
|
|
|
|
if (defined $self->{end_key}) { |
1686
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('end_key', TType::STRING, 2); |
1687
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{end_key}); |
1688
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1689
|
|
|
|
|
|
|
} |
1690
|
0
|
0
|
|
|
|
|
if (defined $self->{start_token}) { |
1691
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('start_token', TType::STRING, 3); |
1692
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{start_token}); |
1693
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1694
|
|
|
|
|
|
|
} |
1695
|
0
|
0
|
|
|
|
|
if (defined $self->{end_token}) { |
1696
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('end_token', TType::STRING, 4); |
1697
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{end_token}); |
1698
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1699
|
|
|
|
|
|
|
} |
1700
|
0
|
0
|
|
|
|
|
if (defined $self->{count}) { |
1701
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('count', TType::I32, 5); |
1702
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{count}); |
1703
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1704
|
|
|
|
|
|
|
} |
1705
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1706
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1707
|
0
|
|
|
|
|
|
return $xfer; |
1708
|
|
|
|
|
|
|
} |
1709
|
|
|
|
|
|
|
|
1710
|
|
|
|
|
|
|
package Cassandra::KeySlice; |
1711
|
|
|
|
|
|
|
BEGIN { |
1712
|
1
|
|
|
1
|
|
25
|
$Cassandra::KeySlice::VERSION = '0.4.0'; |
1713
|
|
|
|
|
|
|
} |
1714
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
912
|
|
1715
|
|
|
|
|
|
|
Cassandra::KeySlice->mk_accessors( qw( key columns ) ); |
1716
|
|
|
|
|
|
|
|
1717
|
|
|
|
|
|
|
sub new { |
1718
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1719
|
0
|
|
|
|
|
|
my $self = {}; |
1720
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1721
|
0
|
|
|
|
|
|
$self->{key} = undef; |
1722
|
0
|
|
|
|
|
|
$self->{columns} = undef; |
1723
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1724
|
0
|
0
|
|
|
|
|
if (defined $vals->{key}) { |
1725
|
0
|
|
|
|
|
|
$self->{key} = $vals->{key}; |
1726
|
|
|
|
|
|
|
} |
1727
|
0
|
0
|
|
|
|
|
if (defined $vals->{columns}) { |
1728
|
0
|
|
|
|
|
|
$self->{columns} = $vals->{columns}; |
1729
|
|
|
|
|
|
|
} |
1730
|
|
|
|
|
|
|
} |
1731
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1732
|
|
|
|
|
|
|
} |
1733
|
|
|
|
|
|
|
|
1734
|
|
|
|
|
|
|
sub getName { |
1735
|
0
|
|
|
0
|
|
|
return 'KeySlice'; |
1736
|
|
|
|
|
|
|
} |
1737
|
|
|
|
|
|
|
|
1738
|
|
|
|
|
|
|
sub read { |
1739
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1740
|
0
|
|
|
|
|
|
my $xfer = 0; |
1741
|
0
|
|
|
|
|
|
my $fname; |
1742
|
0
|
|
|
|
|
|
my $ftype = 0; |
1743
|
0
|
|
|
|
|
|
my $fid = 0; |
1744
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1745
|
0
|
|
|
|
|
|
while (1) |
1746
|
|
|
|
|
|
|
{ |
1747
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1748
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1749
|
0
|
|
|
|
|
|
last; |
1750
|
|
|
|
|
|
|
} |
1751
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1752
|
|
|
|
|
|
|
{ |
1753
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1754
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{key}); |
1755
|
|
|
|
|
|
|
} else { |
1756
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1757
|
|
|
|
|
|
|
} |
1758
|
0
|
|
|
|
|
|
last; }; |
1759
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
1760
|
|
|
|
|
|
|
{ |
1761
|
0
|
|
|
|
|
|
my $_size28 = 0; |
|
0
|
|
|
|
|
|
|
1762
|
0
|
|
|
|
|
|
$self->{columns} = []; |
1763
|
0
|
|
|
|
|
|
my $_etype31 = 0; |
1764
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype31, \$_size28); |
1765
|
0
|
|
|
|
|
|
for (my $_i32 = 0; $_i32 < $_size28; ++$_i32) |
1766
|
|
|
|
|
|
|
{ |
1767
|
0
|
|
|
|
|
|
my $elem33 = undef; |
1768
|
0
|
|
|
|
|
|
$elem33 = new Cassandra::ColumnOrSuperColumn(); |
1769
|
0
|
|
|
|
|
|
$xfer += $elem33->read($input); |
1770
|
0
|
|
|
|
|
|
push(@{$self->{columns}},$elem33); |
|
0
|
|
|
|
|
|
|
1771
|
|
|
|
|
|
|
} |
1772
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
1773
|
|
|
|
|
|
|
} |
1774
|
|
|
|
|
|
|
} else { |
1775
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1776
|
|
|
|
|
|
|
} |
1777
|
0
|
|
|
|
|
|
last; }; |
1778
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1779
|
|
|
|
|
|
|
} |
1780
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1781
|
|
|
|
|
|
|
} |
1782
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1783
|
0
|
|
|
|
|
|
return $xfer; |
1784
|
|
|
|
|
|
|
} |
1785
|
|
|
|
|
|
|
|
1786
|
|
|
|
|
|
|
sub write { |
1787
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1788
|
0
|
|
|
|
|
|
my $xfer = 0; |
1789
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('KeySlice'); |
1790
|
0
|
0
|
|
|
|
|
if (defined $self->{key}) { |
1791
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key', TType::STRING, 1); |
1792
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{key}); |
1793
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1794
|
|
|
|
|
|
|
} |
1795
|
0
|
0
|
|
|
|
|
if (defined $self->{columns}) { |
1796
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('columns', TType::LIST, 2); |
1797
|
|
|
|
|
|
|
{ |
1798
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{columns}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1799
|
|
|
|
|
|
|
{ |
1800
|
0
|
|
|
|
|
|
foreach my $iter34 (@{$self->{columns}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
1801
|
|
|
|
|
|
|
{ |
1802
|
0
|
|
|
|
|
|
$xfer += ${iter34}->write($output); |
1803
|
|
|
|
|
|
|
} |
1804
|
|
|
|
|
|
|
} |
1805
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
1806
|
|
|
|
|
|
|
} |
1807
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1808
|
|
|
|
|
|
|
} |
1809
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1810
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1811
|
0
|
|
|
|
|
|
return $xfer; |
1812
|
|
|
|
|
|
|
} |
1813
|
|
|
|
|
|
|
|
1814
|
|
|
|
|
|
|
package Cassandra::KeyCount; |
1815
|
|
|
|
|
|
|
BEGIN { |
1816
|
1
|
|
|
1
|
|
26
|
$Cassandra::KeyCount::VERSION = '0.4.0'; |
1817
|
|
|
|
|
|
|
} |
1818
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1114
|
|
1819
|
|
|
|
|
|
|
Cassandra::KeyCount->mk_accessors( qw( key count ) ); |
1820
|
|
|
|
|
|
|
|
1821
|
|
|
|
|
|
|
sub new { |
1822
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1823
|
0
|
|
|
|
|
|
my $self = {}; |
1824
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1825
|
0
|
|
|
|
|
|
$self->{key} = undef; |
1826
|
0
|
|
|
|
|
|
$self->{count} = undef; |
1827
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1828
|
0
|
0
|
|
|
|
|
if (defined $vals->{key}) { |
1829
|
0
|
|
|
|
|
|
$self->{key} = $vals->{key}; |
1830
|
|
|
|
|
|
|
} |
1831
|
0
|
0
|
|
|
|
|
if (defined $vals->{count}) { |
1832
|
0
|
|
|
|
|
|
$self->{count} = $vals->{count}; |
1833
|
|
|
|
|
|
|
} |
1834
|
|
|
|
|
|
|
} |
1835
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1836
|
|
|
|
|
|
|
} |
1837
|
|
|
|
|
|
|
|
1838
|
|
|
|
|
|
|
sub getName { |
1839
|
0
|
|
|
0
|
|
|
return 'KeyCount'; |
1840
|
|
|
|
|
|
|
} |
1841
|
|
|
|
|
|
|
|
1842
|
|
|
|
|
|
|
sub read { |
1843
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1844
|
0
|
|
|
|
|
|
my $xfer = 0; |
1845
|
0
|
|
|
|
|
|
my $fname; |
1846
|
0
|
|
|
|
|
|
my $ftype = 0; |
1847
|
0
|
|
|
|
|
|
my $fid = 0; |
1848
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1849
|
0
|
|
|
|
|
|
while (1) |
1850
|
|
|
|
|
|
|
{ |
1851
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1852
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1853
|
0
|
|
|
|
|
|
last; |
1854
|
|
|
|
|
|
|
} |
1855
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1856
|
|
|
|
|
|
|
{ |
1857
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1858
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{key}); |
1859
|
|
|
|
|
|
|
} else { |
1860
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1861
|
|
|
|
|
|
|
} |
1862
|
0
|
|
|
|
|
|
last; }; |
1863
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
1864
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{count}); |
1865
|
|
|
|
|
|
|
} else { |
1866
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1867
|
|
|
|
|
|
|
} |
1868
|
0
|
|
|
|
|
|
last; }; |
1869
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1870
|
|
|
|
|
|
|
} |
1871
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1872
|
|
|
|
|
|
|
} |
1873
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1874
|
0
|
|
|
|
|
|
return $xfer; |
1875
|
|
|
|
|
|
|
} |
1876
|
|
|
|
|
|
|
|
1877
|
|
|
|
|
|
|
sub write { |
1878
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1879
|
0
|
|
|
|
|
|
my $xfer = 0; |
1880
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('KeyCount'); |
1881
|
0
|
0
|
|
|
|
|
if (defined $self->{key}) { |
1882
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key', TType::STRING, 1); |
1883
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{key}); |
1884
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1885
|
|
|
|
|
|
|
} |
1886
|
0
|
0
|
|
|
|
|
if (defined $self->{count}) { |
1887
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('count', TType::I32, 2); |
1888
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{count}); |
1889
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1890
|
|
|
|
|
|
|
} |
1891
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1892
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1893
|
0
|
|
|
|
|
|
return $xfer; |
1894
|
|
|
|
|
|
|
} |
1895
|
|
|
|
|
|
|
|
1896
|
|
|
|
|
|
|
package Cassandra::Deletion; |
1897
|
|
|
|
|
|
|
BEGIN { |
1898
|
1
|
|
|
1
|
|
22
|
$Cassandra::Deletion::VERSION = '0.4.0'; |
1899
|
|
|
|
|
|
|
} |
1900
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
800
|
|
1901
|
|
|
|
|
|
|
Cassandra::Deletion->mk_accessors( qw( timestamp super_column predicate ) ); |
1902
|
|
|
|
|
|
|
|
1903
|
|
|
|
|
|
|
sub new { |
1904
|
0
|
|
|
0
|
|
|
my $classname = shift; |
1905
|
0
|
|
|
|
|
|
my $self = {}; |
1906
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
1907
|
0
|
|
|
|
|
|
$self->{timestamp} = undef; |
1908
|
0
|
|
|
|
|
|
$self->{super_column} = undef; |
1909
|
0
|
|
|
|
|
|
$self->{predicate} = undef; |
1910
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
1911
|
0
|
0
|
|
|
|
|
if (defined $vals->{timestamp}) { |
1912
|
0
|
|
|
|
|
|
$self->{timestamp} = $vals->{timestamp}; |
1913
|
|
|
|
|
|
|
} |
1914
|
0
|
0
|
|
|
|
|
if (defined $vals->{super_column}) { |
1915
|
0
|
|
|
|
|
|
$self->{super_column} = $vals->{super_column}; |
1916
|
|
|
|
|
|
|
} |
1917
|
0
|
0
|
|
|
|
|
if (defined $vals->{predicate}) { |
1918
|
0
|
|
|
|
|
|
$self->{predicate} = $vals->{predicate}; |
1919
|
|
|
|
|
|
|
} |
1920
|
|
|
|
|
|
|
} |
1921
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
1922
|
|
|
|
|
|
|
} |
1923
|
|
|
|
|
|
|
|
1924
|
|
|
|
|
|
|
sub getName { |
1925
|
0
|
|
|
0
|
|
|
return 'Deletion'; |
1926
|
|
|
|
|
|
|
} |
1927
|
|
|
|
|
|
|
|
1928
|
|
|
|
|
|
|
sub read { |
1929
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
1930
|
0
|
|
|
|
|
|
my $xfer = 0; |
1931
|
0
|
|
|
|
|
|
my $fname; |
1932
|
0
|
|
|
|
|
|
my $ftype = 0; |
1933
|
0
|
|
|
|
|
|
my $fid = 0; |
1934
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
1935
|
0
|
|
|
|
|
|
while (1) |
1936
|
|
|
|
|
|
|
{ |
1937
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
1938
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
1939
|
0
|
|
|
|
|
|
last; |
1940
|
|
|
|
|
|
|
} |
1941
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
1942
|
|
|
|
|
|
|
{ |
1943
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::I64) { |
|
0
|
0
|
|
|
|
|
|
1944
|
0
|
|
|
|
|
|
$xfer += $input->readI64(\$self->{timestamp}); |
1945
|
|
|
|
|
|
|
} else { |
1946
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1947
|
|
|
|
|
|
|
} |
1948
|
0
|
|
|
|
|
|
last; }; |
1949
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
1950
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{super_column}); |
1951
|
|
|
|
|
|
|
} else { |
1952
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1953
|
|
|
|
|
|
|
} |
1954
|
0
|
|
|
|
|
|
last; }; |
1955
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
1956
|
0
|
|
|
|
|
|
$self->{predicate} = new Cassandra::SlicePredicate(); |
1957
|
0
|
|
|
|
|
|
$xfer += $self->{predicate}->read($input); |
1958
|
|
|
|
|
|
|
} else { |
1959
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1960
|
|
|
|
|
|
|
} |
1961
|
0
|
|
|
|
|
|
last; }; |
1962
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
1963
|
|
|
|
|
|
|
} |
1964
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
1965
|
|
|
|
|
|
|
} |
1966
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
1967
|
0
|
|
|
|
|
|
return $xfer; |
1968
|
|
|
|
|
|
|
} |
1969
|
|
|
|
|
|
|
|
1970
|
|
|
|
|
|
|
sub write { |
1971
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
1972
|
0
|
|
|
|
|
|
my $xfer = 0; |
1973
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('Deletion'); |
1974
|
0
|
0
|
|
|
|
|
if (defined $self->{timestamp}) { |
1975
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('timestamp', TType::I64, 1); |
1976
|
0
|
|
|
|
|
|
$xfer += $output->writeI64($self->{timestamp}); |
1977
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1978
|
|
|
|
|
|
|
} |
1979
|
0
|
0
|
|
|
|
|
if (defined $self->{super_column}) { |
1980
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('super_column', TType::STRING, 2); |
1981
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{super_column}); |
1982
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1983
|
|
|
|
|
|
|
} |
1984
|
0
|
0
|
|
|
|
|
if (defined $self->{predicate}) { |
1985
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('predicate', TType::STRUCT, 3); |
1986
|
0
|
|
|
|
|
|
$xfer += $self->{predicate}->write($output); |
1987
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
1988
|
|
|
|
|
|
|
} |
1989
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
1990
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
1991
|
0
|
|
|
|
|
|
return $xfer; |
1992
|
|
|
|
|
|
|
} |
1993
|
|
|
|
|
|
|
|
1994
|
|
|
|
|
|
|
package Cassandra::Mutation; |
1995
|
|
|
|
|
|
|
BEGIN { |
1996
|
1
|
|
|
1
|
|
19
|
$Cassandra::Mutation::VERSION = '0.4.0'; |
1997
|
|
|
|
|
|
|
} |
1998
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
712
|
|
1999
|
|
|
|
|
|
|
Cassandra::Mutation->mk_accessors( qw( column_or_supercolumn deletion ) ); |
2000
|
|
|
|
|
|
|
|
2001
|
|
|
|
|
|
|
sub new { |
2002
|
0
|
|
|
0
|
|
|
my $classname = shift; |
2003
|
0
|
|
|
|
|
|
my $self = {}; |
2004
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
2005
|
0
|
|
|
|
|
|
$self->{column_or_supercolumn} = undef; |
2006
|
0
|
|
|
|
|
|
$self->{deletion} = undef; |
2007
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
2008
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_or_supercolumn}) { |
2009
|
0
|
|
|
|
|
|
$self->{column_or_supercolumn} = $vals->{column_or_supercolumn}; |
2010
|
|
|
|
|
|
|
} |
2011
|
0
|
0
|
|
|
|
|
if (defined $vals->{deletion}) { |
2012
|
0
|
|
|
|
|
|
$self->{deletion} = $vals->{deletion}; |
2013
|
|
|
|
|
|
|
} |
2014
|
|
|
|
|
|
|
} |
2015
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
2016
|
|
|
|
|
|
|
} |
2017
|
|
|
|
|
|
|
|
2018
|
|
|
|
|
|
|
sub getName { |
2019
|
0
|
|
|
0
|
|
|
return 'Mutation'; |
2020
|
|
|
|
|
|
|
} |
2021
|
|
|
|
|
|
|
|
2022
|
|
|
|
|
|
|
sub read { |
2023
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
2024
|
0
|
|
|
|
|
|
my $xfer = 0; |
2025
|
0
|
|
|
|
|
|
my $fname; |
2026
|
0
|
|
|
|
|
|
my $ftype = 0; |
2027
|
0
|
|
|
|
|
|
my $fid = 0; |
2028
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
2029
|
0
|
|
|
|
|
|
while (1) |
2030
|
|
|
|
|
|
|
{ |
2031
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
2032
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
2033
|
0
|
|
|
|
|
|
last; |
2034
|
|
|
|
|
|
|
} |
2035
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
2036
|
|
|
|
|
|
|
{ |
2037
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
2038
|
0
|
|
|
|
|
|
$self->{column_or_supercolumn} = new Cassandra::ColumnOrSuperColumn(); |
2039
|
0
|
|
|
|
|
|
$xfer += $self->{column_or_supercolumn}->read($input); |
2040
|
|
|
|
|
|
|
} else { |
2041
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2042
|
|
|
|
|
|
|
} |
2043
|
0
|
|
|
|
|
|
last; }; |
2044
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRUCT) { |
|
0
|
0
|
|
|
|
|
|
2045
|
0
|
|
|
|
|
|
$self->{deletion} = new Cassandra::Deletion(); |
2046
|
0
|
|
|
|
|
|
$xfer += $self->{deletion}->read($input); |
2047
|
|
|
|
|
|
|
} else { |
2048
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2049
|
|
|
|
|
|
|
} |
2050
|
0
|
|
|
|
|
|
last; }; |
2051
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2052
|
|
|
|
|
|
|
} |
2053
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
2054
|
|
|
|
|
|
|
} |
2055
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
2056
|
0
|
|
|
|
|
|
return $xfer; |
2057
|
|
|
|
|
|
|
} |
2058
|
|
|
|
|
|
|
|
2059
|
|
|
|
|
|
|
sub write { |
2060
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
2061
|
0
|
|
|
|
|
|
my $xfer = 0; |
2062
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('Mutation'); |
2063
|
0
|
0
|
|
|
|
|
if (defined $self->{column_or_supercolumn}) { |
2064
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_or_supercolumn', TType::STRUCT, 1); |
2065
|
0
|
|
|
|
|
|
$xfer += $self->{column_or_supercolumn}->write($output); |
2066
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2067
|
|
|
|
|
|
|
} |
2068
|
0
|
0
|
|
|
|
|
if (defined $self->{deletion}) { |
2069
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('deletion', TType::STRUCT, 2); |
2070
|
0
|
|
|
|
|
|
$xfer += $self->{deletion}->write($output); |
2071
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2072
|
|
|
|
|
|
|
} |
2073
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
2074
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
2075
|
0
|
|
|
|
|
|
return $xfer; |
2076
|
|
|
|
|
|
|
} |
2077
|
|
|
|
|
|
|
|
2078
|
|
|
|
|
|
|
package Cassandra::TokenRange; |
2079
|
|
|
|
|
|
|
BEGIN { |
2080
|
1
|
|
|
1
|
|
21
|
$Cassandra::TokenRange::VERSION = '0.4.0'; |
2081
|
|
|
|
|
|
|
} |
2082
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1021
|
|
2083
|
|
|
|
|
|
|
Cassandra::TokenRange->mk_accessors( qw( start_token end_token endpoints ) ); |
2084
|
|
|
|
|
|
|
|
2085
|
|
|
|
|
|
|
sub new { |
2086
|
0
|
|
|
0
|
|
|
my $classname = shift; |
2087
|
0
|
|
|
|
|
|
my $self = {}; |
2088
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
2089
|
0
|
|
|
|
|
|
$self->{start_token} = undef; |
2090
|
0
|
|
|
|
|
|
$self->{end_token} = undef; |
2091
|
0
|
|
|
|
|
|
$self->{endpoints} = undef; |
2092
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
2093
|
0
|
0
|
|
|
|
|
if (defined $vals->{start_token}) { |
2094
|
0
|
|
|
|
|
|
$self->{start_token} = $vals->{start_token}; |
2095
|
|
|
|
|
|
|
} |
2096
|
0
|
0
|
|
|
|
|
if (defined $vals->{end_token}) { |
2097
|
0
|
|
|
|
|
|
$self->{end_token} = $vals->{end_token}; |
2098
|
|
|
|
|
|
|
} |
2099
|
0
|
0
|
|
|
|
|
if (defined $vals->{endpoints}) { |
2100
|
0
|
|
|
|
|
|
$self->{endpoints} = $vals->{endpoints}; |
2101
|
|
|
|
|
|
|
} |
2102
|
|
|
|
|
|
|
} |
2103
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
2104
|
|
|
|
|
|
|
} |
2105
|
|
|
|
|
|
|
|
2106
|
|
|
|
|
|
|
sub getName { |
2107
|
0
|
|
|
0
|
|
|
return 'TokenRange'; |
2108
|
|
|
|
|
|
|
} |
2109
|
|
|
|
|
|
|
|
2110
|
|
|
|
|
|
|
sub read { |
2111
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
2112
|
0
|
|
|
|
|
|
my $xfer = 0; |
2113
|
0
|
|
|
|
|
|
my $fname; |
2114
|
0
|
|
|
|
|
|
my $ftype = 0; |
2115
|
0
|
|
|
|
|
|
my $fid = 0; |
2116
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
2117
|
0
|
|
|
|
|
|
while (1) |
2118
|
|
|
|
|
|
|
{ |
2119
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
2120
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
2121
|
0
|
|
|
|
|
|
last; |
2122
|
|
|
|
|
|
|
} |
2123
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
2124
|
|
|
|
|
|
|
{ |
2125
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2126
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{start_token}); |
2127
|
|
|
|
|
|
|
} else { |
2128
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2129
|
|
|
|
|
|
|
} |
2130
|
0
|
|
|
|
|
|
last; }; |
2131
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2132
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{end_token}); |
2133
|
|
|
|
|
|
|
} else { |
2134
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2135
|
|
|
|
|
|
|
} |
2136
|
0
|
|
|
|
|
|
last; }; |
2137
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
2138
|
|
|
|
|
|
|
{ |
2139
|
0
|
|
|
|
|
|
my $_size35 = 0; |
|
0
|
|
|
|
|
|
|
2140
|
0
|
|
|
|
|
|
$self->{endpoints} = []; |
2141
|
0
|
|
|
|
|
|
my $_etype38 = 0; |
2142
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype38, \$_size35); |
2143
|
0
|
|
|
|
|
|
for (my $_i39 = 0; $_i39 < $_size35; ++$_i39) |
2144
|
|
|
|
|
|
|
{ |
2145
|
0
|
|
|
|
|
|
my $elem40 = undef; |
2146
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$elem40); |
2147
|
0
|
|
|
|
|
|
push(@{$self->{endpoints}},$elem40); |
|
0
|
|
|
|
|
|
|
2148
|
|
|
|
|
|
|
} |
2149
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
2150
|
|
|
|
|
|
|
} |
2151
|
|
|
|
|
|
|
} else { |
2152
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2153
|
|
|
|
|
|
|
} |
2154
|
0
|
|
|
|
|
|
last; }; |
2155
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2156
|
|
|
|
|
|
|
} |
2157
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
2158
|
|
|
|
|
|
|
} |
2159
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
2160
|
0
|
|
|
|
|
|
return $xfer; |
2161
|
|
|
|
|
|
|
} |
2162
|
|
|
|
|
|
|
|
2163
|
|
|
|
|
|
|
sub write { |
2164
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
2165
|
0
|
|
|
|
|
|
my $xfer = 0; |
2166
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('TokenRange'); |
2167
|
0
|
0
|
|
|
|
|
if (defined $self->{start_token}) { |
2168
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('start_token', TType::STRING, 1); |
2169
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{start_token}); |
2170
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2171
|
|
|
|
|
|
|
} |
2172
|
0
|
0
|
|
|
|
|
if (defined $self->{end_token}) { |
2173
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('end_token', TType::STRING, 2); |
2174
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{end_token}); |
2175
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2176
|
|
|
|
|
|
|
} |
2177
|
0
|
0
|
|
|
|
|
if (defined $self->{endpoints}) { |
2178
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('endpoints', TType::LIST, 3); |
2179
|
|
|
|
|
|
|
{ |
2180
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRING, scalar(@{$self->{endpoints}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2181
|
|
|
|
|
|
|
{ |
2182
|
0
|
|
|
|
|
|
foreach my $iter41 (@{$self->{endpoints}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2183
|
|
|
|
|
|
|
{ |
2184
|
0
|
|
|
|
|
|
$xfer += $output->writeString($iter41); |
2185
|
|
|
|
|
|
|
} |
2186
|
|
|
|
|
|
|
} |
2187
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
2188
|
|
|
|
|
|
|
} |
2189
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2190
|
|
|
|
|
|
|
} |
2191
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
2192
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
2193
|
0
|
|
|
|
|
|
return $xfer; |
2194
|
|
|
|
|
|
|
} |
2195
|
|
|
|
|
|
|
|
2196
|
|
|
|
|
|
|
package Cassandra::AuthenticationRequest; |
2197
|
|
|
|
|
|
|
BEGIN { |
2198
|
1
|
|
|
1
|
|
29
|
$Cassandra::AuthenticationRequest::VERSION = '0.4.0'; |
2199
|
|
|
|
|
|
|
} |
2200
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
802
|
|
2201
|
|
|
|
|
|
|
Cassandra::AuthenticationRequest->mk_accessors( qw( credentials ) ); |
2202
|
|
|
|
|
|
|
|
2203
|
|
|
|
|
|
|
sub new { |
2204
|
0
|
|
|
0
|
|
|
my $classname = shift; |
2205
|
0
|
|
|
|
|
|
my $self = {}; |
2206
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
2207
|
0
|
|
|
|
|
|
$self->{credentials} = undef; |
2208
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
2209
|
0
|
0
|
|
|
|
|
if (defined $vals->{credentials}) { |
2210
|
0
|
|
|
|
|
|
$self->{credentials} = $vals->{credentials}; |
2211
|
|
|
|
|
|
|
} |
2212
|
|
|
|
|
|
|
} |
2213
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
2214
|
|
|
|
|
|
|
} |
2215
|
|
|
|
|
|
|
|
2216
|
|
|
|
|
|
|
sub getName { |
2217
|
0
|
|
|
0
|
|
|
return 'AuthenticationRequest'; |
2218
|
|
|
|
|
|
|
} |
2219
|
|
|
|
|
|
|
|
2220
|
|
|
|
|
|
|
sub read { |
2221
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
2222
|
0
|
|
|
|
|
|
my $xfer = 0; |
2223
|
0
|
|
|
|
|
|
my $fname; |
2224
|
0
|
|
|
|
|
|
my $ftype = 0; |
2225
|
0
|
|
|
|
|
|
my $fid = 0; |
2226
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
2227
|
0
|
|
|
|
|
|
while (1) |
2228
|
|
|
|
|
|
|
{ |
2229
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
2230
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
2231
|
0
|
|
|
|
|
|
last; |
2232
|
|
|
|
|
|
|
} |
2233
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
2234
|
|
|
|
|
|
|
{ |
2235
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::MAP) { |
|
0
|
0
|
|
|
|
|
|
2236
|
|
|
|
|
|
|
{ |
2237
|
0
|
|
|
|
|
|
my $_size42 = 0; |
|
0
|
|
|
|
|
|
|
2238
|
0
|
|
|
|
|
|
$self->{credentials} = {}; |
2239
|
0
|
|
|
|
|
|
my $_ktype43 = 0; |
2240
|
0
|
|
|
|
|
|
my $_vtype44 = 0; |
2241
|
0
|
|
|
|
|
|
$xfer += $input->readMapBegin(\$_ktype43, \$_vtype44, \$_size42); |
2242
|
0
|
|
|
|
|
|
for (my $_i46 = 0; $_i46 < $_size42; ++$_i46) |
2243
|
|
|
|
|
|
|
{ |
2244
|
0
|
|
|
|
|
|
my $key47 = ''; |
2245
|
0
|
|
|
|
|
|
my $val48 = ''; |
2246
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$key47); |
2247
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$val48); |
2248
|
0
|
|
|
|
|
|
$self->{credentials}->{$key47} = $val48; |
2249
|
|
|
|
|
|
|
} |
2250
|
0
|
|
|
|
|
|
$xfer += $input->readMapEnd(); |
2251
|
|
|
|
|
|
|
} |
2252
|
|
|
|
|
|
|
} else { |
2253
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2254
|
|
|
|
|
|
|
} |
2255
|
0
|
|
|
|
|
|
last; }; |
2256
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2257
|
|
|
|
|
|
|
} |
2258
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
2259
|
|
|
|
|
|
|
} |
2260
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
2261
|
0
|
|
|
|
|
|
return $xfer; |
2262
|
|
|
|
|
|
|
} |
2263
|
|
|
|
|
|
|
|
2264
|
|
|
|
|
|
|
sub write { |
2265
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
2266
|
0
|
|
|
|
|
|
my $xfer = 0; |
2267
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('AuthenticationRequest'); |
2268
|
0
|
0
|
|
|
|
|
if (defined $self->{credentials}) { |
2269
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('credentials', TType::MAP, 1); |
2270
|
|
|
|
|
|
|
{ |
2271
|
0
|
|
|
|
|
|
$xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{credentials}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2272
|
|
|
|
|
|
|
{ |
2273
|
0
|
|
|
|
|
|
while( my ($kiter49,$viter50) = each %{$self->{credentials}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2274
|
|
|
|
|
|
|
{ |
2275
|
0
|
|
|
|
|
|
$xfer += $output->writeString($kiter49); |
2276
|
0
|
|
|
|
|
|
$xfer += $output->writeString($viter50); |
2277
|
|
|
|
|
|
|
} |
2278
|
|
|
|
|
|
|
} |
2279
|
0
|
|
|
|
|
|
$xfer += $output->writeMapEnd(); |
2280
|
|
|
|
|
|
|
} |
2281
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2282
|
|
|
|
|
|
|
} |
2283
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
2284
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
2285
|
0
|
|
|
|
|
|
return $xfer; |
2286
|
|
|
|
|
|
|
} |
2287
|
|
|
|
|
|
|
|
2288
|
|
|
|
|
|
|
package Cassandra::ColumnDef; |
2289
|
|
|
|
|
|
|
BEGIN { |
2290
|
1
|
|
|
1
|
|
20
|
$Cassandra::ColumnDef::VERSION = '0.4.0'; |
2291
|
|
|
|
|
|
|
} |
2292
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
843
|
|
2293
|
|
|
|
|
|
|
Cassandra::ColumnDef->mk_accessors( qw( name validation_class index_type index_name ) ); |
2294
|
|
|
|
|
|
|
|
2295
|
|
|
|
|
|
|
sub new { |
2296
|
0
|
|
|
0
|
|
|
my $classname = shift; |
2297
|
0
|
|
|
|
|
|
my $self = {}; |
2298
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
2299
|
0
|
|
|
|
|
|
$self->{name} = undef; |
2300
|
0
|
|
|
|
|
|
$self->{validation_class} = undef; |
2301
|
0
|
|
|
|
|
|
$self->{index_type} = undef; |
2302
|
0
|
|
|
|
|
|
$self->{index_name} = undef; |
2303
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
2304
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
2305
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
2306
|
|
|
|
|
|
|
} |
2307
|
0
|
0
|
|
|
|
|
if (defined $vals->{validation_class}) { |
2308
|
0
|
|
|
|
|
|
$self->{validation_class} = $vals->{validation_class}; |
2309
|
|
|
|
|
|
|
} |
2310
|
0
|
0
|
|
|
|
|
if (defined $vals->{index_type}) { |
2311
|
0
|
|
|
|
|
|
$self->{index_type} = $vals->{index_type}; |
2312
|
|
|
|
|
|
|
} |
2313
|
0
|
0
|
|
|
|
|
if (defined $vals->{index_name}) { |
2314
|
0
|
|
|
|
|
|
$self->{index_name} = $vals->{index_name}; |
2315
|
|
|
|
|
|
|
} |
2316
|
|
|
|
|
|
|
} |
2317
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
2318
|
|
|
|
|
|
|
} |
2319
|
|
|
|
|
|
|
|
2320
|
|
|
|
|
|
|
sub getName { |
2321
|
0
|
|
|
0
|
|
|
return 'ColumnDef'; |
2322
|
|
|
|
|
|
|
} |
2323
|
|
|
|
|
|
|
|
2324
|
|
|
|
|
|
|
sub read { |
2325
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
2326
|
0
|
|
|
|
|
|
my $xfer = 0; |
2327
|
0
|
|
|
|
|
|
my $fname; |
2328
|
0
|
|
|
|
|
|
my $ftype = 0; |
2329
|
0
|
|
|
|
|
|
my $fid = 0; |
2330
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
2331
|
0
|
|
|
|
|
|
while (1) |
2332
|
|
|
|
|
|
|
{ |
2333
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
2334
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
2335
|
0
|
|
|
|
|
|
last; |
2336
|
|
|
|
|
|
|
} |
2337
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
2338
|
|
|
|
|
|
|
{ |
2339
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2340
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
2341
|
|
|
|
|
|
|
} else { |
2342
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2343
|
|
|
|
|
|
|
} |
2344
|
0
|
|
|
|
|
|
last; }; |
2345
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2346
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{validation_class}); |
2347
|
|
|
|
|
|
|
} else { |
2348
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2349
|
|
|
|
|
|
|
} |
2350
|
0
|
|
|
|
|
|
last; }; |
2351
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2352
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{index_type}); |
2353
|
|
|
|
|
|
|
} else { |
2354
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2355
|
|
|
|
|
|
|
} |
2356
|
0
|
|
|
|
|
|
last; }; |
2357
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2358
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{index_name}); |
2359
|
|
|
|
|
|
|
} else { |
2360
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2361
|
|
|
|
|
|
|
} |
2362
|
0
|
|
|
|
|
|
last; }; |
2363
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2364
|
|
|
|
|
|
|
} |
2365
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
2366
|
|
|
|
|
|
|
} |
2367
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
2368
|
0
|
|
|
|
|
|
return $xfer; |
2369
|
|
|
|
|
|
|
} |
2370
|
|
|
|
|
|
|
|
2371
|
|
|
|
|
|
|
sub write { |
2372
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
2373
|
0
|
|
|
|
|
|
my $xfer = 0; |
2374
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('ColumnDef'); |
2375
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
2376
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
2377
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
2378
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2379
|
|
|
|
|
|
|
} |
2380
|
0
|
0
|
|
|
|
|
if (defined $self->{validation_class}) { |
2381
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('validation_class', TType::STRING, 2); |
2382
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{validation_class}); |
2383
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2384
|
|
|
|
|
|
|
} |
2385
|
0
|
0
|
|
|
|
|
if (defined $self->{index_type}) { |
2386
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('index_type', TType::I32, 3); |
2387
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{index_type}); |
2388
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2389
|
|
|
|
|
|
|
} |
2390
|
0
|
0
|
|
|
|
|
if (defined $self->{index_name}) { |
2391
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('index_name', TType::STRING, 4); |
2392
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{index_name}); |
2393
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2394
|
|
|
|
|
|
|
} |
2395
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
2396
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
2397
|
0
|
|
|
|
|
|
return $xfer; |
2398
|
|
|
|
|
|
|
} |
2399
|
|
|
|
|
|
|
|
2400
|
|
|
|
|
|
|
package Cassandra::CfDef; |
2401
|
|
|
|
|
|
|
BEGIN { |
2402
|
1
|
|
|
1
|
|
19
|
$Cassandra::CfDef::VERSION = '0.4.0'; |
2403
|
|
|
|
|
|
|
} |
2404
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
3636
|
|
2405
|
|
|
|
|
|
|
Cassandra::CfDef->mk_accessors( qw( keyspace name column_type comparator_type subcomparator_type comment row_cache_size key_cache_size read_repair_chance column_metadata gc_grace_seconds default_validation_class id min_compaction_threshold max_compaction_threshold row_cache_save_period_in_seconds key_cache_save_period_in_seconds memtable_flush_after_mins memtable_throughput_in_mb memtable_operations_in_millions replicate_on_write merge_shards_chance key_validation_class row_cache_provider key_alias ) ); |
2406
|
|
|
|
|
|
|
|
2407
|
|
|
|
|
|
|
sub new { |
2408
|
0
|
|
|
0
|
|
|
my $classname = shift; |
2409
|
0
|
|
|
|
|
|
my $self = {}; |
2410
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
2411
|
0
|
|
|
|
|
|
$self->{keyspace} = undef; |
2412
|
0
|
|
|
|
|
|
$self->{name} = undef; |
2413
|
0
|
|
|
|
|
|
$self->{column_type} = "Standard"; |
2414
|
0
|
|
|
|
|
|
$self->{comparator_type} = "BytesType"; |
2415
|
0
|
|
|
|
|
|
$self->{subcomparator_type} = undef; |
2416
|
0
|
|
|
|
|
|
$self->{comment} = undef; |
2417
|
0
|
|
|
|
|
|
$self->{row_cache_size} = 0; |
2418
|
0
|
|
|
|
|
|
$self->{key_cache_size} = 200000; |
2419
|
0
|
|
|
|
|
|
$self->{read_repair_chance} = 1; |
2420
|
0
|
|
|
|
|
|
$self->{column_metadata} = undef; |
2421
|
0
|
|
|
|
|
|
$self->{gc_grace_seconds} = undef; |
2422
|
0
|
|
|
|
|
|
$self->{default_validation_class} = undef; |
2423
|
0
|
|
|
|
|
|
$self->{id} = undef; |
2424
|
0
|
|
|
|
|
|
$self->{min_compaction_threshold} = undef; |
2425
|
0
|
|
|
|
|
|
$self->{max_compaction_threshold} = undef; |
2426
|
0
|
|
|
|
|
|
$self->{row_cache_save_period_in_seconds} = undef; |
2427
|
0
|
|
|
|
|
|
$self->{key_cache_save_period_in_seconds} = undef; |
2428
|
0
|
|
|
|
|
|
$self->{memtable_flush_after_mins} = undef; |
2429
|
0
|
|
|
|
|
|
$self->{memtable_throughput_in_mb} = undef; |
2430
|
0
|
|
|
|
|
|
$self->{memtable_operations_in_millions} = undef; |
2431
|
0
|
|
|
|
|
|
$self->{replicate_on_write} = undef; |
2432
|
0
|
|
|
|
|
|
$self->{merge_shards_chance} = undef; |
2433
|
0
|
|
|
|
|
|
$self->{key_validation_class} = undef; |
2434
|
0
|
|
|
|
|
|
$self->{row_cache_provider} = "org.apache.cassandra.cache.ConcurrentLinkedHashCacheProvider"; |
2435
|
0
|
|
|
|
|
|
$self->{key_alias} = undef; |
2436
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
2437
|
0
|
0
|
|
|
|
|
if (defined $vals->{keyspace}) { |
2438
|
0
|
|
|
|
|
|
$self->{keyspace} = $vals->{keyspace}; |
2439
|
|
|
|
|
|
|
} |
2440
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
2441
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
2442
|
|
|
|
|
|
|
} |
2443
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_type}) { |
2444
|
0
|
|
|
|
|
|
$self->{column_type} = $vals->{column_type}; |
2445
|
|
|
|
|
|
|
} |
2446
|
0
|
0
|
|
|
|
|
if (defined $vals->{comparator_type}) { |
2447
|
0
|
|
|
|
|
|
$self->{comparator_type} = $vals->{comparator_type}; |
2448
|
|
|
|
|
|
|
} |
2449
|
0
|
0
|
|
|
|
|
if (defined $vals->{subcomparator_type}) { |
2450
|
0
|
|
|
|
|
|
$self->{subcomparator_type} = $vals->{subcomparator_type}; |
2451
|
|
|
|
|
|
|
} |
2452
|
0
|
0
|
|
|
|
|
if (defined $vals->{comment}) { |
2453
|
0
|
|
|
|
|
|
$self->{comment} = $vals->{comment}; |
2454
|
|
|
|
|
|
|
} |
2455
|
0
|
0
|
|
|
|
|
if (defined $vals->{row_cache_size}) { |
2456
|
0
|
|
|
|
|
|
$self->{row_cache_size} = $vals->{row_cache_size}; |
2457
|
|
|
|
|
|
|
} |
2458
|
0
|
0
|
|
|
|
|
if (defined $vals->{key_cache_size}) { |
2459
|
0
|
|
|
|
|
|
$self->{key_cache_size} = $vals->{key_cache_size}; |
2460
|
|
|
|
|
|
|
} |
2461
|
0
|
0
|
|
|
|
|
if (defined $vals->{read_repair_chance}) { |
2462
|
0
|
|
|
|
|
|
$self->{read_repair_chance} = $vals->{read_repair_chance}; |
2463
|
|
|
|
|
|
|
} |
2464
|
0
|
0
|
|
|
|
|
if (defined $vals->{column_metadata}) { |
2465
|
0
|
|
|
|
|
|
$self->{column_metadata} = $vals->{column_metadata}; |
2466
|
|
|
|
|
|
|
} |
2467
|
0
|
0
|
|
|
|
|
if (defined $vals->{gc_grace_seconds}) { |
2468
|
0
|
|
|
|
|
|
$self->{gc_grace_seconds} = $vals->{gc_grace_seconds}; |
2469
|
|
|
|
|
|
|
} |
2470
|
0
|
0
|
|
|
|
|
if (defined $vals->{default_validation_class}) { |
2471
|
0
|
|
|
|
|
|
$self->{default_validation_class} = $vals->{default_validation_class}; |
2472
|
|
|
|
|
|
|
} |
2473
|
0
|
0
|
|
|
|
|
if (defined $vals->{id}) { |
2474
|
0
|
|
|
|
|
|
$self->{id} = $vals->{id}; |
2475
|
|
|
|
|
|
|
} |
2476
|
0
|
0
|
|
|
|
|
if (defined $vals->{min_compaction_threshold}) { |
2477
|
0
|
|
|
|
|
|
$self->{min_compaction_threshold} = $vals->{min_compaction_threshold}; |
2478
|
|
|
|
|
|
|
} |
2479
|
0
|
0
|
|
|
|
|
if (defined $vals->{max_compaction_threshold}) { |
2480
|
0
|
|
|
|
|
|
$self->{max_compaction_threshold} = $vals->{max_compaction_threshold}; |
2481
|
|
|
|
|
|
|
} |
2482
|
0
|
0
|
|
|
|
|
if (defined $vals->{row_cache_save_period_in_seconds}) { |
2483
|
0
|
|
|
|
|
|
$self->{row_cache_save_period_in_seconds} = $vals->{row_cache_save_period_in_seconds}; |
2484
|
|
|
|
|
|
|
} |
2485
|
0
|
0
|
|
|
|
|
if (defined $vals->{key_cache_save_period_in_seconds}) { |
2486
|
0
|
|
|
|
|
|
$self->{key_cache_save_period_in_seconds} = $vals->{key_cache_save_period_in_seconds}; |
2487
|
|
|
|
|
|
|
} |
2488
|
0
|
0
|
|
|
|
|
if (defined $vals->{memtable_flush_after_mins}) { |
2489
|
0
|
|
|
|
|
|
$self->{memtable_flush_after_mins} = $vals->{memtable_flush_after_mins}; |
2490
|
|
|
|
|
|
|
} |
2491
|
0
|
0
|
|
|
|
|
if (defined $vals->{memtable_throughput_in_mb}) { |
2492
|
0
|
|
|
|
|
|
$self->{memtable_throughput_in_mb} = $vals->{memtable_throughput_in_mb}; |
2493
|
|
|
|
|
|
|
} |
2494
|
0
|
0
|
|
|
|
|
if (defined $vals->{memtable_operations_in_millions}) { |
2495
|
0
|
|
|
|
|
|
$self->{memtable_operations_in_millions} = $vals->{memtable_operations_in_millions}; |
2496
|
|
|
|
|
|
|
} |
2497
|
0
|
0
|
|
|
|
|
if (defined $vals->{replicate_on_write}) { |
2498
|
0
|
|
|
|
|
|
$self->{replicate_on_write} = $vals->{replicate_on_write}; |
2499
|
|
|
|
|
|
|
} |
2500
|
0
|
0
|
|
|
|
|
if (defined $vals->{merge_shards_chance}) { |
2501
|
0
|
|
|
|
|
|
$self->{merge_shards_chance} = $vals->{merge_shards_chance}; |
2502
|
|
|
|
|
|
|
} |
2503
|
0
|
0
|
|
|
|
|
if (defined $vals->{key_validation_class}) { |
2504
|
0
|
|
|
|
|
|
$self->{key_validation_class} = $vals->{key_validation_class}; |
2505
|
|
|
|
|
|
|
} |
2506
|
0
|
0
|
|
|
|
|
if (defined $vals->{row_cache_provider}) { |
2507
|
0
|
|
|
|
|
|
$self->{row_cache_provider} = $vals->{row_cache_provider}; |
2508
|
|
|
|
|
|
|
} |
2509
|
0
|
0
|
|
|
|
|
if (defined $vals->{key_alias}) { |
2510
|
0
|
|
|
|
|
|
$self->{key_alias} = $vals->{key_alias}; |
2511
|
|
|
|
|
|
|
} |
2512
|
|
|
|
|
|
|
} |
2513
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
2514
|
|
|
|
|
|
|
} |
2515
|
|
|
|
|
|
|
|
2516
|
|
|
|
|
|
|
sub getName { |
2517
|
0
|
|
|
0
|
|
|
return 'CfDef'; |
2518
|
|
|
|
|
|
|
} |
2519
|
|
|
|
|
|
|
|
2520
|
|
|
|
|
|
|
sub read { |
2521
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
2522
|
0
|
|
|
|
|
|
my $xfer = 0; |
2523
|
0
|
|
|
|
|
|
my $fname; |
2524
|
0
|
|
|
|
|
|
my $ftype = 0; |
2525
|
0
|
|
|
|
|
|
my $fid = 0; |
2526
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
2527
|
0
|
|
|
|
|
|
while (1) |
2528
|
|
|
|
|
|
|
{ |
2529
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
2530
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
2531
|
0
|
|
|
|
|
|
last; |
2532
|
|
|
|
|
|
|
} |
2533
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
2534
|
|
|
|
|
|
|
{ |
2535
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2536
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{keyspace}); |
2537
|
|
|
|
|
|
|
} else { |
2538
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2539
|
|
|
|
|
|
|
} |
2540
|
0
|
|
|
|
|
|
last; }; |
2541
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2542
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
2543
|
|
|
|
|
|
|
} else { |
2544
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2545
|
|
|
|
|
|
|
} |
2546
|
0
|
|
|
|
|
|
last; }; |
2547
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2548
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{column_type}); |
2549
|
|
|
|
|
|
|
} else { |
2550
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2551
|
|
|
|
|
|
|
} |
2552
|
0
|
|
|
|
|
|
last; }; |
2553
|
0
|
0
|
|
|
|
|
/^5$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2554
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{comparator_type}); |
2555
|
|
|
|
|
|
|
} else { |
2556
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2557
|
|
|
|
|
|
|
} |
2558
|
0
|
|
|
|
|
|
last; }; |
2559
|
0
|
0
|
|
|
|
|
/^6$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2560
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{subcomparator_type}); |
2561
|
|
|
|
|
|
|
} else { |
2562
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2563
|
|
|
|
|
|
|
} |
2564
|
0
|
|
|
|
|
|
last; }; |
2565
|
0
|
0
|
|
|
|
|
/^8$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2566
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{comment}); |
2567
|
|
|
|
|
|
|
} else { |
2568
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2569
|
|
|
|
|
|
|
} |
2570
|
0
|
|
|
|
|
|
last; }; |
2571
|
0
|
0
|
|
|
|
|
/^9$/ && do{ if ($ftype == TType::DOUBLE) { |
|
0
|
0
|
|
|
|
|
|
2572
|
0
|
|
|
|
|
|
$xfer += $input->readDouble(\$self->{row_cache_size}); |
2573
|
|
|
|
|
|
|
} else { |
2574
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2575
|
|
|
|
|
|
|
} |
2576
|
0
|
|
|
|
|
|
last; }; |
2577
|
0
|
0
|
|
|
|
|
/^11$/ && do{ if ($ftype == TType::DOUBLE) { |
|
0
|
0
|
|
|
|
|
|
2578
|
0
|
|
|
|
|
|
$xfer += $input->readDouble(\$self->{key_cache_size}); |
2579
|
|
|
|
|
|
|
} else { |
2580
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2581
|
|
|
|
|
|
|
} |
2582
|
0
|
|
|
|
|
|
last; }; |
2583
|
0
|
0
|
|
|
|
|
/^12$/ && do{ if ($ftype == TType::DOUBLE) { |
|
0
|
0
|
|
|
|
|
|
2584
|
0
|
|
|
|
|
|
$xfer += $input->readDouble(\$self->{read_repair_chance}); |
2585
|
|
|
|
|
|
|
} else { |
2586
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2587
|
|
|
|
|
|
|
} |
2588
|
0
|
|
|
|
|
|
last; }; |
2589
|
0
|
0
|
|
|
|
|
/^13$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
2590
|
|
|
|
|
|
|
{ |
2591
|
0
|
|
|
|
|
|
my $_size51 = 0; |
|
0
|
|
|
|
|
|
|
2592
|
0
|
|
|
|
|
|
$self->{column_metadata} = []; |
2593
|
0
|
|
|
|
|
|
my $_etype54 = 0; |
2594
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype54, \$_size51); |
2595
|
0
|
|
|
|
|
|
for (my $_i55 = 0; $_i55 < $_size51; ++$_i55) |
2596
|
|
|
|
|
|
|
{ |
2597
|
0
|
|
|
|
|
|
my $elem56 = undef; |
2598
|
0
|
|
|
|
|
|
$elem56 = new Cassandra::ColumnDef(); |
2599
|
0
|
|
|
|
|
|
$xfer += $elem56->read($input); |
2600
|
0
|
|
|
|
|
|
push(@{$self->{column_metadata}},$elem56); |
|
0
|
|
|
|
|
|
|
2601
|
|
|
|
|
|
|
} |
2602
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
2603
|
|
|
|
|
|
|
} |
2604
|
|
|
|
|
|
|
} else { |
2605
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2606
|
|
|
|
|
|
|
} |
2607
|
0
|
|
|
|
|
|
last; }; |
2608
|
0
|
0
|
|
|
|
|
/^14$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2609
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{gc_grace_seconds}); |
2610
|
|
|
|
|
|
|
} else { |
2611
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2612
|
|
|
|
|
|
|
} |
2613
|
0
|
|
|
|
|
|
last; }; |
2614
|
0
|
0
|
|
|
|
|
/^15$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2615
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{default_validation_class}); |
2616
|
|
|
|
|
|
|
} else { |
2617
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2618
|
|
|
|
|
|
|
} |
2619
|
0
|
|
|
|
|
|
last; }; |
2620
|
0
|
0
|
|
|
|
|
/^16$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2621
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{id}); |
2622
|
|
|
|
|
|
|
} else { |
2623
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2624
|
|
|
|
|
|
|
} |
2625
|
0
|
|
|
|
|
|
last; }; |
2626
|
0
|
0
|
|
|
|
|
/^17$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2627
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{min_compaction_threshold}); |
2628
|
|
|
|
|
|
|
} else { |
2629
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2630
|
|
|
|
|
|
|
} |
2631
|
0
|
|
|
|
|
|
last; }; |
2632
|
0
|
0
|
|
|
|
|
/^18$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2633
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{max_compaction_threshold}); |
2634
|
|
|
|
|
|
|
} else { |
2635
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2636
|
|
|
|
|
|
|
} |
2637
|
0
|
|
|
|
|
|
last; }; |
2638
|
0
|
0
|
|
|
|
|
/^19$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2639
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{row_cache_save_period_in_seconds}); |
2640
|
|
|
|
|
|
|
} else { |
2641
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2642
|
|
|
|
|
|
|
} |
2643
|
0
|
|
|
|
|
|
last; }; |
2644
|
0
|
0
|
|
|
|
|
/^20$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2645
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{key_cache_save_period_in_seconds}); |
2646
|
|
|
|
|
|
|
} else { |
2647
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2648
|
|
|
|
|
|
|
} |
2649
|
0
|
|
|
|
|
|
last; }; |
2650
|
0
|
0
|
|
|
|
|
/^21$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2651
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{memtable_flush_after_mins}); |
2652
|
|
|
|
|
|
|
} else { |
2653
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2654
|
|
|
|
|
|
|
} |
2655
|
0
|
|
|
|
|
|
last; }; |
2656
|
0
|
0
|
|
|
|
|
/^22$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2657
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{memtable_throughput_in_mb}); |
2658
|
|
|
|
|
|
|
} else { |
2659
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2660
|
|
|
|
|
|
|
} |
2661
|
0
|
|
|
|
|
|
last; }; |
2662
|
0
|
0
|
|
|
|
|
/^23$/ && do{ if ($ftype == TType::DOUBLE) { |
|
0
|
0
|
|
|
|
|
|
2663
|
0
|
|
|
|
|
|
$xfer += $input->readDouble(\$self->{memtable_operations_in_millions}); |
2664
|
|
|
|
|
|
|
} else { |
2665
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2666
|
|
|
|
|
|
|
} |
2667
|
0
|
|
|
|
|
|
last; }; |
2668
|
0
|
0
|
|
|
|
|
/^24$/ && do{ if ($ftype == TType::BOOL) { |
|
0
|
0
|
|
|
|
|
|
2669
|
0
|
|
|
|
|
|
$xfer += $input->readBool(\$self->{replicate_on_write}); |
2670
|
|
|
|
|
|
|
} else { |
2671
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2672
|
|
|
|
|
|
|
} |
2673
|
0
|
|
|
|
|
|
last; }; |
2674
|
0
|
0
|
|
|
|
|
/^25$/ && do{ if ($ftype == TType::DOUBLE) { |
|
0
|
0
|
|
|
|
|
|
2675
|
0
|
|
|
|
|
|
$xfer += $input->readDouble(\$self->{merge_shards_chance}); |
2676
|
|
|
|
|
|
|
} else { |
2677
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2678
|
|
|
|
|
|
|
} |
2679
|
0
|
|
|
|
|
|
last; }; |
2680
|
0
|
0
|
|
|
|
|
/^26$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2681
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{key_validation_class}); |
2682
|
|
|
|
|
|
|
} else { |
2683
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2684
|
|
|
|
|
|
|
} |
2685
|
0
|
|
|
|
|
|
last; }; |
2686
|
0
|
0
|
|
|
|
|
/^27$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2687
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{row_cache_provider}); |
2688
|
|
|
|
|
|
|
} else { |
2689
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2690
|
|
|
|
|
|
|
} |
2691
|
0
|
|
|
|
|
|
last; }; |
2692
|
0
|
0
|
|
|
|
|
/^28$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2693
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{key_alias}); |
2694
|
|
|
|
|
|
|
} else { |
2695
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2696
|
|
|
|
|
|
|
} |
2697
|
0
|
|
|
|
|
|
last; }; |
2698
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2699
|
|
|
|
|
|
|
} |
2700
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
2701
|
|
|
|
|
|
|
} |
2702
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
2703
|
0
|
|
|
|
|
|
return $xfer; |
2704
|
|
|
|
|
|
|
} |
2705
|
|
|
|
|
|
|
|
2706
|
|
|
|
|
|
|
sub write { |
2707
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
2708
|
0
|
|
|
|
|
|
my $xfer = 0; |
2709
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('CfDef'); |
2710
|
0
|
0
|
|
|
|
|
if (defined $self->{keyspace}) { |
2711
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('keyspace', TType::STRING, 1); |
2712
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{keyspace}); |
2713
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2714
|
|
|
|
|
|
|
} |
2715
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
2716
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 2); |
2717
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
2718
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2719
|
|
|
|
|
|
|
} |
2720
|
0
|
0
|
|
|
|
|
if (defined $self->{column_type}) { |
2721
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_type', TType::STRING, 3); |
2722
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{column_type}); |
2723
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2724
|
|
|
|
|
|
|
} |
2725
|
0
|
0
|
|
|
|
|
if (defined $self->{comparator_type}) { |
2726
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('comparator_type', TType::STRING, 5); |
2727
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{comparator_type}); |
2728
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2729
|
|
|
|
|
|
|
} |
2730
|
0
|
0
|
|
|
|
|
if (defined $self->{subcomparator_type}) { |
2731
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('subcomparator_type', TType::STRING, 6); |
2732
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{subcomparator_type}); |
2733
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2734
|
|
|
|
|
|
|
} |
2735
|
0
|
0
|
|
|
|
|
if (defined $self->{comment}) { |
2736
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('comment', TType::STRING, 8); |
2737
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{comment}); |
2738
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2739
|
|
|
|
|
|
|
} |
2740
|
0
|
0
|
|
|
|
|
if (defined $self->{row_cache_size}) { |
2741
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('row_cache_size', TType::DOUBLE, 9); |
2742
|
0
|
|
|
|
|
|
$xfer += $output->writeDouble($self->{row_cache_size}); |
2743
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2744
|
|
|
|
|
|
|
} |
2745
|
0
|
0
|
|
|
|
|
if (defined $self->{key_cache_size}) { |
2746
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key_cache_size', TType::DOUBLE, 11); |
2747
|
0
|
|
|
|
|
|
$xfer += $output->writeDouble($self->{key_cache_size}); |
2748
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2749
|
|
|
|
|
|
|
} |
2750
|
0
|
0
|
|
|
|
|
if (defined $self->{read_repair_chance}) { |
2751
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('read_repair_chance', TType::DOUBLE, 12); |
2752
|
0
|
|
|
|
|
|
$xfer += $output->writeDouble($self->{read_repair_chance}); |
2753
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2754
|
|
|
|
|
|
|
} |
2755
|
0
|
0
|
|
|
|
|
if (defined $self->{column_metadata}) { |
2756
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('column_metadata', TType::LIST, 13); |
2757
|
|
|
|
|
|
|
{ |
2758
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{column_metadata}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2759
|
|
|
|
|
|
|
{ |
2760
|
0
|
|
|
|
|
|
foreach my $iter57 (@{$self->{column_metadata}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2761
|
|
|
|
|
|
|
{ |
2762
|
0
|
|
|
|
|
|
$xfer += ${iter57}->write($output); |
2763
|
|
|
|
|
|
|
} |
2764
|
|
|
|
|
|
|
} |
2765
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
2766
|
|
|
|
|
|
|
} |
2767
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2768
|
|
|
|
|
|
|
} |
2769
|
0
|
0
|
|
|
|
|
if (defined $self->{gc_grace_seconds}) { |
2770
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('gc_grace_seconds', TType::I32, 14); |
2771
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{gc_grace_seconds}); |
2772
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2773
|
|
|
|
|
|
|
} |
2774
|
0
|
0
|
|
|
|
|
if (defined $self->{default_validation_class}) { |
2775
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('default_validation_class', TType::STRING, 15); |
2776
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{default_validation_class}); |
2777
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2778
|
|
|
|
|
|
|
} |
2779
|
0
|
0
|
|
|
|
|
if (defined $self->{id}) { |
2780
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('id', TType::I32, 16); |
2781
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{id}); |
2782
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2783
|
|
|
|
|
|
|
} |
2784
|
0
|
0
|
|
|
|
|
if (defined $self->{min_compaction_threshold}) { |
2785
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('min_compaction_threshold', TType::I32, 17); |
2786
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{min_compaction_threshold}); |
2787
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2788
|
|
|
|
|
|
|
} |
2789
|
0
|
0
|
|
|
|
|
if (defined $self->{max_compaction_threshold}) { |
2790
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('max_compaction_threshold', TType::I32, 18); |
2791
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{max_compaction_threshold}); |
2792
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2793
|
|
|
|
|
|
|
} |
2794
|
0
|
0
|
|
|
|
|
if (defined $self->{row_cache_save_period_in_seconds}) { |
2795
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('row_cache_save_period_in_seconds', TType::I32, 19); |
2796
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{row_cache_save_period_in_seconds}); |
2797
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2798
|
|
|
|
|
|
|
} |
2799
|
0
|
0
|
|
|
|
|
if (defined $self->{key_cache_save_period_in_seconds}) { |
2800
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key_cache_save_period_in_seconds', TType::I32, 20); |
2801
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{key_cache_save_period_in_seconds}); |
2802
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2803
|
|
|
|
|
|
|
} |
2804
|
0
|
0
|
|
|
|
|
if (defined $self->{memtable_flush_after_mins}) { |
2805
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('memtable_flush_after_mins', TType::I32, 21); |
2806
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{memtable_flush_after_mins}); |
2807
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2808
|
|
|
|
|
|
|
} |
2809
|
0
|
0
|
|
|
|
|
if (defined $self->{memtable_throughput_in_mb}) { |
2810
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('memtable_throughput_in_mb', TType::I32, 22); |
2811
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{memtable_throughput_in_mb}); |
2812
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2813
|
|
|
|
|
|
|
} |
2814
|
0
|
0
|
|
|
|
|
if (defined $self->{memtable_operations_in_millions}) { |
2815
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('memtable_operations_in_millions', TType::DOUBLE, 23); |
2816
|
0
|
|
|
|
|
|
$xfer += $output->writeDouble($self->{memtable_operations_in_millions}); |
2817
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2818
|
|
|
|
|
|
|
} |
2819
|
0
|
0
|
|
|
|
|
if (defined $self->{replicate_on_write}) { |
2820
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('replicate_on_write', TType::BOOL, 24); |
2821
|
0
|
|
|
|
|
|
$xfer += $output->writeBool($self->{replicate_on_write}); |
2822
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2823
|
|
|
|
|
|
|
} |
2824
|
0
|
0
|
|
|
|
|
if (defined $self->{merge_shards_chance}) { |
2825
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('merge_shards_chance', TType::DOUBLE, 25); |
2826
|
0
|
|
|
|
|
|
$xfer += $output->writeDouble($self->{merge_shards_chance}); |
2827
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2828
|
|
|
|
|
|
|
} |
2829
|
0
|
0
|
|
|
|
|
if (defined $self->{key_validation_class}) { |
2830
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key_validation_class', TType::STRING, 26); |
2831
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{key_validation_class}); |
2832
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2833
|
|
|
|
|
|
|
} |
2834
|
0
|
0
|
|
|
|
|
if (defined $self->{row_cache_provider}) { |
2835
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('row_cache_provider', TType::STRING, 27); |
2836
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{row_cache_provider}); |
2837
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2838
|
|
|
|
|
|
|
} |
2839
|
0
|
0
|
|
|
|
|
if (defined $self->{key_alias}) { |
2840
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key_alias', TType::STRING, 28); |
2841
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{key_alias}); |
2842
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2843
|
|
|
|
|
|
|
} |
2844
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
2845
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
2846
|
0
|
|
|
|
|
|
return $xfer; |
2847
|
|
|
|
|
|
|
} |
2848
|
|
|
|
|
|
|
|
2849
|
|
|
|
|
|
|
package Cassandra::KsDef; |
2850
|
|
|
|
|
|
|
BEGIN { |
2851
|
1
|
|
|
1
|
|
25
|
$Cassandra::KsDef::VERSION = '0.4.0'; |
2852
|
|
|
|
|
|
|
} |
2853
|
1
|
|
|
1
|
|
8
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1473
|
|
2854
|
|
|
|
|
|
|
Cassandra::KsDef->mk_accessors( qw( name strategy_class strategy_options replication_factor cf_defs durable_writes ) ); |
2855
|
|
|
|
|
|
|
|
2856
|
|
|
|
|
|
|
sub new { |
2857
|
0
|
|
|
0
|
|
|
my $classname = shift; |
2858
|
0
|
|
|
|
|
|
my $self = {}; |
2859
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
2860
|
0
|
|
|
|
|
|
$self->{name} = undef; |
2861
|
0
|
|
|
|
|
|
$self->{strategy_class} = undef; |
2862
|
0
|
|
|
|
|
|
$self->{strategy_options} = undef; |
2863
|
0
|
|
|
|
|
|
$self->{replication_factor} = undef; |
2864
|
0
|
|
|
|
|
|
$self->{cf_defs} = undef; |
2865
|
0
|
|
|
|
|
|
$self->{durable_writes} = 1; |
2866
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
2867
|
0
|
0
|
|
|
|
|
if (defined $vals->{name}) { |
2868
|
0
|
|
|
|
|
|
$self->{name} = $vals->{name}; |
2869
|
|
|
|
|
|
|
} |
2870
|
0
|
0
|
|
|
|
|
if (defined $vals->{strategy_class}) { |
2871
|
0
|
|
|
|
|
|
$self->{strategy_class} = $vals->{strategy_class}; |
2872
|
|
|
|
|
|
|
} |
2873
|
0
|
0
|
|
|
|
|
if (defined $vals->{strategy_options}) { |
2874
|
0
|
|
|
|
|
|
$self->{strategy_options} = $vals->{strategy_options}; |
2875
|
|
|
|
|
|
|
} |
2876
|
0
|
0
|
|
|
|
|
if (defined $vals->{replication_factor}) { |
2877
|
0
|
|
|
|
|
|
$self->{replication_factor} = $vals->{replication_factor}; |
2878
|
|
|
|
|
|
|
} |
2879
|
0
|
0
|
|
|
|
|
if (defined $vals->{cf_defs}) { |
2880
|
0
|
|
|
|
|
|
$self->{cf_defs} = $vals->{cf_defs}; |
2881
|
|
|
|
|
|
|
} |
2882
|
0
|
0
|
|
|
|
|
if (defined $vals->{durable_writes}) { |
2883
|
0
|
|
|
|
|
|
$self->{durable_writes} = $vals->{durable_writes}; |
2884
|
|
|
|
|
|
|
} |
2885
|
|
|
|
|
|
|
} |
2886
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
2887
|
|
|
|
|
|
|
} |
2888
|
|
|
|
|
|
|
|
2889
|
|
|
|
|
|
|
sub getName { |
2890
|
0
|
|
|
0
|
|
|
return 'KsDef'; |
2891
|
|
|
|
|
|
|
} |
2892
|
|
|
|
|
|
|
|
2893
|
|
|
|
|
|
|
sub read { |
2894
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
2895
|
0
|
|
|
|
|
|
my $xfer = 0; |
2896
|
0
|
|
|
|
|
|
my $fname; |
2897
|
0
|
|
|
|
|
|
my $ftype = 0; |
2898
|
0
|
|
|
|
|
|
my $fid = 0; |
2899
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
2900
|
0
|
|
|
|
|
|
while (1) |
2901
|
|
|
|
|
|
|
{ |
2902
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
2903
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
2904
|
0
|
|
|
|
|
|
last; |
2905
|
|
|
|
|
|
|
} |
2906
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
2907
|
|
|
|
|
|
|
{ |
2908
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2909
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{name}); |
2910
|
|
|
|
|
|
|
} else { |
2911
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2912
|
|
|
|
|
|
|
} |
2913
|
0
|
|
|
|
|
|
last; }; |
2914
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
2915
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{strategy_class}); |
2916
|
|
|
|
|
|
|
} else { |
2917
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2918
|
|
|
|
|
|
|
} |
2919
|
0
|
|
|
|
|
|
last; }; |
2920
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::MAP) { |
|
0
|
0
|
|
|
|
|
|
2921
|
|
|
|
|
|
|
{ |
2922
|
0
|
|
|
|
|
|
my $_size58 = 0; |
|
0
|
|
|
|
|
|
|
2923
|
0
|
|
|
|
|
|
$self->{strategy_options} = {}; |
2924
|
0
|
|
|
|
|
|
my $_ktype59 = 0; |
2925
|
0
|
|
|
|
|
|
my $_vtype60 = 0; |
2926
|
0
|
|
|
|
|
|
$xfer += $input->readMapBegin(\$_ktype59, \$_vtype60, \$_size58); |
2927
|
0
|
|
|
|
|
|
for (my $_i62 = 0; $_i62 < $_size58; ++$_i62) |
2928
|
|
|
|
|
|
|
{ |
2929
|
0
|
|
|
|
|
|
my $key63 = ''; |
2930
|
0
|
|
|
|
|
|
my $val64 = ''; |
2931
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$key63); |
2932
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$val64); |
2933
|
0
|
|
|
|
|
|
$self->{strategy_options}->{$key63} = $val64; |
2934
|
|
|
|
|
|
|
} |
2935
|
0
|
|
|
|
|
|
$xfer += $input->readMapEnd(); |
2936
|
|
|
|
|
|
|
} |
2937
|
|
|
|
|
|
|
} else { |
2938
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2939
|
|
|
|
|
|
|
} |
2940
|
0
|
|
|
|
|
|
last; }; |
2941
|
0
|
0
|
|
|
|
|
/^4$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
2942
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{replication_factor}); |
2943
|
|
|
|
|
|
|
} else { |
2944
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2945
|
|
|
|
|
|
|
} |
2946
|
0
|
|
|
|
|
|
last; }; |
2947
|
0
|
0
|
|
|
|
|
/^5$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
2948
|
|
|
|
|
|
|
{ |
2949
|
0
|
|
|
|
|
|
my $_size65 = 0; |
|
0
|
|
|
|
|
|
|
2950
|
0
|
|
|
|
|
|
$self->{cf_defs} = []; |
2951
|
0
|
|
|
|
|
|
my $_etype68 = 0; |
2952
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype68, \$_size65); |
2953
|
0
|
|
|
|
|
|
for (my $_i69 = 0; $_i69 < $_size65; ++$_i69) |
2954
|
|
|
|
|
|
|
{ |
2955
|
0
|
|
|
|
|
|
my $elem70 = undef; |
2956
|
0
|
|
|
|
|
|
$elem70 = new Cassandra::CfDef(); |
2957
|
0
|
|
|
|
|
|
$xfer += $elem70->read($input); |
2958
|
0
|
|
|
|
|
|
push(@{$self->{cf_defs}},$elem70); |
|
0
|
|
|
|
|
|
|
2959
|
|
|
|
|
|
|
} |
2960
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
2961
|
|
|
|
|
|
|
} |
2962
|
|
|
|
|
|
|
} else { |
2963
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2964
|
|
|
|
|
|
|
} |
2965
|
0
|
|
|
|
|
|
last; }; |
2966
|
0
|
0
|
|
|
|
|
/^6$/ && do{ if ($ftype == TType::BOOL) { |
|
0
|
0
|
|
|
|
|
|
2967
|
0
|
|
|
|
|
|
$xfer += $input->readBool(\$self->{durable_writes}); |
2968
|
|
|
|
|
|
|
} else { |
2969
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2970
|
|
|
|
|
|
|
} |
2971
|
0
|
|
|
|
|
|
last; }; |
2972
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
2973
|
|
|
|
|
|
|
} |
2974
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
2975
|
|
|
|
|
|
|
} |
2976
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
2977
|
0
|
|
|
|
|
|
return $xfer; |
2978
|
|
|
|
|
|
|
} |
2979
|
|
|
|
|
|
|
|
2980
|
|
|
|
|
|
|
sub write { |
2981
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
2982
|
0
|
|
|
|
|
|
my $xfer = 0; |
2983
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('KsDef'); |
2984
|
0
|
0
|
|
|
|
|
if (defined $self->{name}) { |
2985
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('name', TType::STRING, 1); |
2986
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{name}); |
2987
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2988
|
|
|
|
|
|
|
} |
2989
|
0
|
0
|
|
|
|
|
if (defined $self->{strategy_class}) { |
2990
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('strategy_class', TType::STRING, 2); |
2991
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{strategy_class}); |
2992
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
2993
|
|
|
|
|
|
|
} |
2994
|
0
|
0
|
|
|
|
|
if (defined $self->{strategy_options}) { |
2995
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('strategy_options', TType::MAP, 3); |
2996
|
|
|
|
|
|
|
{ |
2997
|
0
|
|
|
|
|
|
$xfer += $output->writeMapBegin(TType::STRING, TType::STRING, scalar(keys %{$self->{strategy_options}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
2998
|
|
|
|
|
|
|
{ |
2999
|
0
|
|
|
|
|
|
while( my ($kiter71,$viter72) = each %{$self->{strategy_options}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3000
|
|
|
|
|
|
|
{ |
3001
|
0
|
|
|
|
|
|
$xfer += $output->writeString($kiter71); |
3002
|
0
|
|
|
|
|
|
$xfer += $output->writeString($viter72); |
3003
|
|
|
|
|
|
|
} |
3004
|
|
|
|
|
|
|
} |
3005
|
0
|
|
|
|
|
|
$xfer += $output->writeMapEnd(); |
3006
|
|
|
|
|
|
|
} |
3007
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3008
|
|
|
|
|
|
|
} |
3009
|
0
|
0
|
|
|
|
|
if (defined $self->{replication_factor}) { |
3010
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('replication_factor', TType::I32, 4); |
3011
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{replication_factor}); |
3012
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3013
|
|
|
|
|
|
|
} |
3014
|
0
|
0
|
|
|
|
|
if (defined $self->{cf_defs}) { |
3015
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('cf_defs', TType::LIST, 5); |
3016
|
|
|
|
|
|
|
{ |
3017
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{cf_defs}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3018
|
|
|
|
|
|
|
{ |
3019
|
0
|
|
|
|
|
|
foreach my $iter73 (@{$self->{cf_defs}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3020
|
|
|
|
|
|
|
{ |
3021
|
0
|
|
|
|
|
|
$xfer += ${iter73}->write($output); |
3022
|
|
|
|
|
|
|
} |
3023
|
|
|
|
|
|
|
} |
3024
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
3025
|
|
|
|
|
|
|
} |
3026
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3027
|
|
|
|
|
|
|
} |
3028
|
0
|
0
|
|
|
|
|
if (defined $self->{durable_writes}) { |
3029
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('durable_writes', TType::BOOL, 6); |
3030
|
0
|
|
|
|
|
|
$xfer += $output->writeBool($self->{durable_writes}); |
3031
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3032
|
|
|
|
|
|
|
} |
3033
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
3034
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
3035
|
0
|
|
|
|
|
|
return $xfer; |
3036
|
|
|
|
|
|
|
} |
3037
|
|
|
|
|
|
|
|
3038
|
|
|
|
|
|
|
package Cassandra::CqlRow; |
3039
|
|
|
|
|
|
|
BEGIN { |
3040
|
1
|
|
|
1
|
|
22
|
$Cassandra::CqlRow::VERSION = '0.4.0'; |
3041
|
|
|
|
|
|
|
} |
3042
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
944
|
|
3043
|
|
|
|
|
|
|
Cassandra::CqlRow->mk_accessors( qw( key columns ) ); |
3044
|
|
|
|
|
|
|
|
3045
|
|
|
|
|
|
|
sub new { |
3046
|
0
|
|
|
0
|
|
|
my $classname = shift; |
3047
|
0
|
|
|
|
|
|
my $self = {}; |
3048
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
3049
|
0
|
|
|
|
|
|
$self->{key} = undef; |
3050
|
0
|
|
|
|
|
|
$self->{columns} = undef; |
3051
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
3052
|
0
|
0
|
|
|
|
|
if (defined $vals->{key}) { |
3053
|
0
|
|
|
|
|
|
$self->{key} = $vals->{key}; |
3054
|
|
|
|
|
|
|
} |
3055
|
0
|
0
|
|
|
|
|
if (defined $vals->{columns}) { |
3056
|
0
|
|
|
|
|
|
$self->{columns} = $vals->{columns}; |
3057
|
|
|
|
|
|
|
} |
3058
|
|
|
|
|
|
|
} |
3059
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
3060
|
|
|
|
|
|
|
} |
3061
|
|
|
|
|
|
|
|
3062
|
|
|
|
|
|
|
sub getName { |
3063
|
0
|
|
|
0
|
|
|
return 'CqlRow'; |
3064
|
|
|
|
|
|
|
} |
3065
|
|
|
|
|
|
|
|
3066
|
|
|
|
|
|
|
sub read { |
3067
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
3068
|
0
|
|
|
|
|
|
my $xfer = 0; |
3069
|
0
|
|
|
|
|
|
my $fname; |
3070
|
0
|
|
|
|
|
|
my $ftype = 0; |
3071
|
0
|
|
|
|
|
|
my $fid = 0; |
3072
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
3073
|
0
|
|
|
|
|
|
while (1) |
3074
|
|
|
|
|
|
|
{ |
3075
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
3076
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
3077
|
0
|
|
|
|
|
|
last; |
3078
|
|
|
|
|
|
|
} |
3079
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
3080
|
|
|
|
|
|
|
{ |
3081
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::STRING) { |
|
0
|
0
|
|
|
|
|
|
3082
|
0
|
|
|
|
|
|
$xfer += $input->readString(\$self->{key}); |
3083
|
|
|
|
|
|
|
} else { |
3084
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3085
|
|
|
|
|
|
|
} |
3086
|
0
|
|
|
|
|
|
last; }; |
3087
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
3088
|
|
|
|
|
|
|
{ |
3089
|
0
|
|
|
|
|
|
my $_size74 = 0; |
|
0
|
|
|
|
|
|
|
3090
|
0
|
|
|
|
|
|
$self->{columns} = []; |
3091
|
0
|
|
|
|
|
|
my $_etype77 = 0; |
3092
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype77, \$_size74); |
3093
|
0
|
|
|
|
|
|
for (my $_i78 = 0; $_i78 < $_size74; ++$_i78) |
3094
|
|
|
|
|
|
|
{ |
3095
|
0
|
|
|
|
|
|
my $elem79 = undef; |
3096
|
0
|
|
|
|
|
|
$elem79 = new Cassandra::Column(); |
3097
|
0
|
|
|
|
|
|
$xfer += $elem79->read($input); |
3098
|
0
|
|
|
|
|
|
push(@{$self->{columns}},$elem79); |
|
0
|
|
|
|
|
|
|
3099
|
|
|
|
|
|
|
} |
3100
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
3101
|
|
|
|
|
|
|
} |
3102
|
|
|
|
|
|
|
} else { |
3103
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3104
|
|
|
|
|
|
|
} |
3105
|
0
|
|
|
|
|
|
last; }; |
3106
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3107
|
|
|
|
|
|
|
} |
3108
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
3109
|
|
|
|
|
|
|
} |
3110
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
3111
|
0
|
|
|
|
|
|
return $xfer; |
3112
|
|
|
|
|
|
|
} |
3113
|
|
|
|
|
|
|
|
3114
|
|
|
|
|
|
|
sub write { |
3115
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
3116
|
0
|
|
|
|
|
|
my $xfer = 0; |
3117
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('CqlRow'); |
3118
|
0
|
0
|
|
|
|
|
if (defined $self->{key}) { |
3119
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('key', TType::STRING, 1); |
3120
|
0
|
|
|
|
|
|
$xfer += $output->writeString($self->{key}); |
3121
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3122
|
|
|
|
|
|
|
} |
3123
|
0
|
0
|
|
|
|
|
if (defined $self->{columns}) { |
3124
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('columns', TType::LIST, 2); |
3125
|
|
|
|
|
|
|
{ |
3126
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{columns}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3127
|
|
|
|
|
|
|
{ |
3128
|
0
|
|
|
|
|
|
foreach my $iter80 (@{$self->{columns}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3129
|
|
|
|
|
|
|
{ |
3130
|
0
|
|
|
|
|
|
$xfer += ${iter80}->write($output); |
3131
|
|
|
|
|
|
|
} |
3132
|
|
|
|
|
|
|
} |
3133
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
3134
|
|
|
|
|
|
|
} |
3135
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3136
|
|
|
|
|
|
|
} |
3137
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
3138
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
3139
|
0
|
|
|
|
|
|
return $xfer; |
3140
|
|
|
|
|
|
|
} |
3141
|
|
|
|
|
|
|
|
3142
|
|
|
|
|
|
|
package Cassandra::CqlResult; |
3143
|
|
|
|
|
|
|
BEGIN { |
3144
|
1
|
|
|
1
|
|
22
|
$Cassandra::CqlResult::VERSION = '0.4.0'; |
3145
|
|
|
|
|
|
|
} |
3146
|
1
|
|
|
1
|
|
7
|
use base qw(Class::Accessor); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1065
|
|
3147
|
|
|
|
|
|
|
Cassandra::CqlResult->mk_accessors( qw( type rows num ) ); |
3148
|
|
|
|
|
|
|
|
3149
|
|
|
|
|
|
|
sub new { |
3150
|
0
|
|
|
0
|
|
|
my $classname = shift; |
3151
|
0
|
|
|
|
|
|
my $self = {}; |
3152
|
0
|
|
0
|
|
|
|
my $vals = shift || {}; |
3153
|
0
|
|
|
|
|
|
$self->{type} = undef; |
3154
|
0
|
|
|
|
|
|
$self->{rows} = undef; |
3155
|
0
|
|
|
|
|
|
$self->{num} = undef; |
3156
|
0
|
0
|
|
|
|
|
if (UNIVERSAL::isa($vals,'HASH')) { |
3157
|
0
|
0
|
|
|
|
|
if (defined $vals->{type}) { |
3158
|
0
|
|
|
|
|
|
$self->{type} = $vals->{type}; |
3159
|
|
|
|
|
|
|
} |
3160
|
0
|
0
|
|
|
|
|
if (defined $vals->{rows}) { |
3161
|
0
|
|
|
|
|
|
$self->{rows} = $vals->{rows}; |
3162
|
|
|
|
|
|
|
} |
3163
|
0
|
0
|
|
|
|
|
if (defined $vals->{num}) { |
3164
|
0
|
|
|
|
|
|
$self->{num} = $vals->{num}; |
3165
|
|
|
|
|
|
|
} |
3166
|
|
|
|
|
|
|
} |
3167
|
0
|
|
|
|
|
|
return bless ($self, $classname); |
3168
|
|
|
|
|
|
|
} |
3169
|
|
|
|
|
|
|
|
3170
|
|
|
|
|
|
|
sub getName { |
3171
|
0
|
|
|
0
|
|
|
return 'CqlResult'; |
3172
|
|
|
|
|
|
|
} |
3173
|
|
|
|
|
|
|
|
3174
|
|
|
|
|
|
|
sub read { |
3175
|
0
|
|
|
0
|
|
|
my ($self, $input) = @_; |
3176
|
0
|
|
|
|
|
|
my $xfer = 0; |
3177
|
0
|
|
|
|
|
|
my $fname; |
3178
|
0
|
|
|
|
|
|
my $ftype = 0; |
3179
|
0
|
|
|
|
|
|
my $fid = 0; |
3180
|
0
|
|
|
|
|
|
$xfer += $input->readStructBegin(\$fname); |
3181
|
0
|
|
|
|
|
|
while (1) |
3182
|
|
|
|
|
|
|
{ |
3183
|
0
|
|
|
|
|
|
$xfer += $input->readFieldBegin(\$fname, \$ftype, \$fid); |
3184
|
0
|
0
|
|
|
|
|
if ($ftype == TType::STOP) { |
3185
|
0
|
|
|
|
|
|
last; |
3186
|
|
|
|
|
|
|
} |
3187
|
0
|
|
|
|
|
|
SWITCH: for($fid) |
3188
|
|
|
|
|
|
|
{ |
3189
|
0
|
0
|
|
|
|
|
/^1$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
3190
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{type}); |
3191
|
|
|
|
|
|
|
} else { |
3192
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3193
|
|
|
|
|
|
|
} |
3194
|
0
|
|
|
|
|
|
last; }; |
3195
|
0
|
0
|
|
|
|
|
/^2$/ && do{ if ($ftype == TType::LIST) { |
|
0
|
0
|
|
|
|
|
|
3196
|
|
|
|
|
|
|
{ |
3197
|
0
|
|
|
|
|
|
my $_size81 = 0; |
|
0
|
|
|
|
|
|
|
3198
|
0
|
|
|
|
|
|
$self->{rows} = []; |
3199
|
0
|
|
|
|
|
|
my $_etype84 = 0; |
3200
|
0
|
|
|
|
|
|
$xfer += $input->readListBegin(\$_etype84, \$_size81); |
3201
|
0
|
|
|
|
|
|
for (my $_i85 = 0; $_i85 < $_size81; ++$_i85) |
3202
|
|
|
|
|
|
|
{ |
3203
|
0
|
|
|
|
|
|
my $elem86 = undef; |
3204
|
0
|
|
|
|
|
|
$elem86 = new Cassandra::CqlRow(); |
3205
|
0
|
|
|
|
|
|
$xfer += $elem86->read($input); |
3206
|
0
|
|
|
|
|
|
push(@{$self->{rows}},$elem86); |
|
0
|
|
|
|
|
|
|
3207
|
|
|
|
|
|
|
} |
3208
|
0
|
|
|
|
|
|
$xfer += $input->readListEnd(); |
3209
|
|
|
|
|
|
|
} |
3210
|
|
|
|
|
|
|
} else { |
3211
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3212
|
|
|
|
|
|
|
} |
3213
|
0
|
|
|
|
|
|
last; }; |
3214
|
0
|
0
|
|
|
|
|
/^3$/ && do{ if ($ftype == TType::I32) { |
|
0
|
0
|
|
|
|
|
|
3215
|
0
|
|
|
|
|
|
$xfer += $input->readI32(\$self->{num}); |
3216
|
|
|
|
|
|
|
} else { |
3217
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3218
|
|
|
|
|
|
|
} |
3219
|
0
|
|
|
|
|
|
last; }; |
3220
|
0
|
|
|
|
|
|
$xfer += $input->skip($ftype); |
3221
|
|
|
|
|
|
|
} |
3222
|
0
|
|
|
|
|
|
$xfer += $input->readFieldEnd(); |
3223
|
|
|
|
|
|
|
} |
3224
|
0
|
|
|
|
|
|
$xfer += $input->readStructEnd(); |
3225
|
0
|
|
|
|
|
|
return $xfer; |
3226
|
|
|
|
|
|
|
} |
3227
|
|
|
|
|
|
|
|
3228
|
|
|
|
|
|
|
sub write { |
3229
|
0
|
|
|
0
|
|
|
my ($self, $output) = @_; |
3230
|
0
|
|
|
|
|
|
my $xfer = 0; |
3231
|
0
|
|
|
|
|
|
$xfer += $output->writeStructBegin('CqlResult'); |
3232
|
0
|
0
|
|
|
|
|
if (defined $self->{type}) { |
3233
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('type', TType::I32, 1); |
3234
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{type}); |
3235
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3236
|
|
|
|
|
|
|
} |
3237
|
0
|
0
|
|
|
|
|
if (defined $self->{rows}) { |
3238
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('rows', TType::LIST, 2); |
3239
|
|
|
|
|
|
|
{ |
3240
|
0
|
|
|
|
|
|
$xfer += $output->writeListBegin(TType::STRUCT, scalar(@{$self->{rows}})); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3241
|
|
|
|
|
|
|
{ |
3242
|
0
|
|
|
|
|
|
foreach my $iter87 (@{$self->{rows}}) |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
3243
|
|
|
|
|
|
|
{ |
3244
|
0
|
|
|
|
|
|
$xfer += ${iter87}->write($output); |
3245
|
|
|
|
|
|
|
} |
3246
|
|
|
|
|
|
|
} |
3247
|
0
|
|
|
|
|
|
$xfer += $output->writeListEnd(); |
3248
|
|
|
|
|
|
|
} |
3249
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3250
|
|
|
|
|
|
|
} |
3251
|
0
|
0
|
|
|
|
|
if (defined $self->{num}) { |
3252
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldBegin('num', TType::I32, 3); |
3253
|
0
|
|
|
|
|
|
$xfer += $output->writeI32($self->{num}); |
3254
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldEnd(); |
3255
|
|
|
|
|
|
|
} |
3256
|
0
|
|
|
|
|
|
$xfer += $output->writeFieldStop(); |
3257
|
0
|
|
|
|
|
|
$xfer += $output->writeStructEnd(); |
3258
|
0
|
|
|
|
|
|
return $xfer; |
3259
|
|
|
|
|
|
|
} |
3260
|
|
|
|
|
|
|
|
3261
|
|
|
|
|
|
|
1; |