riak-client 1.4.5 → 2.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/Gemfile +0 -1
- data/{LICENSE → LICENSE.md} +0 -0
- data/README.markdown +211 -66
- data/RELEASE_NOTES.md +22 -47
- data/Rakefile +45 -0
- data/lib/riak.rb +1 -1
- data/lib/riak/bucket.rb +2 -2
- data/lib/riak/client.rb +22 -195
- data/lib/riak/client/beefcake/crdt_loader.rb +127 -0
- data/lib/riak/client/beefcake/crdt_operator.rb +222 -0
- data/lib/riak/client/beefcake/footer +4 -0
- data/lib/riak/client/beefcake/header +6 -0
- data/lib/riak/client/beefcake/message_codes.rb +29 -0
- data/lib/riak/client/beefcake/message_overlay.rb +61 -0
- data/lib/riak/client/beefcake/messages.rb +733 -371
- data/lib/riak/client/beefcake/object_methods.rb +1 -1
- data/lib/riak/client/beefcake/protocol.rb +105 -0
- data/lib/riak/client/beefcake/socket.rb +243 -0
- data/lib/riak/client/beefcake_protobuffs_backend.rb +262 -122
- data/lib/riak/client/node.rb +4 -75
- data/lib/riak/client/protobuffs_backend.rb +6 -14
- data/lib/riak/client/search.rb +0 -64
- data/lib/riak/client/yokozuna.rb +52 -0
- data/lib/riak/counter.rb +1 -1
- data/lib/riak/crdt.rb +21 -0
- data/lib/riak/crdt/base.rb +97 -0
- data/lib/riak/crdt/batch_counter.rb +19 -0
- data/lib/riak/crdt/batch_map.rb +41 -0
- data/lib/riak/crdt/counter.rb +71 -0
- data/lib/riak/crdt/inner_counter.rb +74 -0
- data/lib/riak/crdt/inner_flag.rb +42 -0
- data/lib/riak/crdt/inner_map.rb +53 -0
- data/lib/riak/crdt/inner_register.rb +26 -0
- data/lib/riak/crdt/inner_set.rb +95 -0
- data/lib/riak/crdt/map.rb +88 -0
- data/lib/riak/crdt/operation.rb +19 -0
- data/lib/riak/crdt/set.rb +156 -0
- data/lib/riak/crdt/typed_collection.rb +131 -0
- data/lib/riak/errors/base.rb +9 -0
- data/lib/riak/errors/connection_error.rb +44 -0
- data/lib/riak/errors/crdt_error.rb +18 -0
- data/lib/riak/errors/failed_request.rb +56 -0
- data/lib/riak/errors/protobuffs_error.rb +11 -0
- data/lib/riak/i18n.rb +2 -0
- data/lib/riak/json.rb +1 -1
- data/lib/riak/locale/en.yml +26 -1
- data/lib/riak/locale/fr.yml +0 -1
- data/lib/riak/map_reduce.rb +1 -1
- data/lib/riak/map_reduce/results.rb +1 -1
- data/lib/riak/multiget.rb +1 -2
- data/lib/riak/rcontent.rb +8 -3
- data/lib/riak/robject.rb +2 -8
- data/lib/riak/secondary_index.rb +4 -4
- data/lib/riak/serializers.rb +1 -1
- data/lib/riak/util/escape.rb +3 -5
- data/lib/riak/version.rb +1 -1
- data/lib/riak/walk_spec.rb +7 -3
- data/riak-client.gemspec +10 -8
- data/spec/fixtures/bitcask.txt +25 -0
- data/spec/integration/riak/bucket_types_spec.rb +61 -0
- data/spec/integration/riak/counters_spec.rb +17 -32
- data/spec/integration/riak/crdt_spec.rb +181 -0
- data/spec/integration/riak/crdt_validation/map_spec.rb +63 -0
- data/spec/integration/riak/crdt_validation/set_spec.rb +122 -0
- data/spec/integration/riak/protobuffs_backends_spec.rb +9 -26
- data/spec/integration/riak/security_spec.rb +94 -0
- data/spec/integration/riak/threading_spec.rb +24 -67
- data/spec/integration/yokozuna/index_spec.rb +61 -0
- data/spec/integration/yokozuna/queries_spec.rb +116 -0
- data/spec/integration/yokozuna/schema_spec.rb +49 -0
- data/spec/riak/beefcake_protobuffs_backend/crdt_operator_spec.rb +222 -0
- data/spec/riak/beefcake_protobuffs_backend/object_methods_spec.rb +4 -4
- data/spec/riak/beefcake_protobuffs_backend/protocol_spec.rb +189 -0
- data/spec/riak/beefcake_protobuffs_backend/socket_spec.rb +151 -0
- data/spec/riak/beefcake_protobuffs_backend_spec.rb +68 -106
- data/spec/riak/bucket_spec.rb +81 -77
- data/spec/riak/client_spec.rb +43 -340
- data/spec/riak/core_ext/to_param_spec.rb +2 -2
- data/spec/riak/counter_spec.rb +20 -20
- data/spec/riak/crdt/counter_spec.rb +52 -0
- data/spec/riak/crdt/inner_counter_spec.rb +21 -0
- data/spec/riak/crdt/inner_flag_spec.rb +39 -0
- data/spec/riak/crdt/inner_map_spec.rb +47 -0
- data/spec/riak/crdt/inner_register_spec.rb +40 -0
- data/spec/riak/crdt/inner_set_spec.rb +33 -0
- data/spec/riak/crdt/map_spec.rb +77 -0
- data/spec/riak/crdt/set_spec.rb +58 -0
- data/spec/riak/crdt/shared_examples.rb +74 -0
- data/spec/riak/crdt/typed_collection_spec.rb +231 -0
- data/spec/riak/escape_spec.rb +33 -37
- data/spec/riak/feature_detection_spec.rb +45 -45
- data/spec/riak/index_collection_spec.rb +12 -12
- data/spec/riak/link_spec.rb +34 -34
- data/spec/riak/list_buckets_spec.rb +7 -7
- data/spec/riak/map_reduce/filter_builder_spec.rb +6 -6
- data/spec/riak/map_reduce/phase_spec.rb +35 -35
- data/spec/riak/map_reduce_spec.rb +89 -87
- data/spec/riak/multiget_spec.rb +20 -15
- data/spec/riak/node_spec.rb +5 -152
- data/spec/riak/robject_spec.rb +95 -108
- data/spec/riak/search_spec.rb +17 -139
- data/spec/riak/secondary_index_spec.rb +49 -49
- data/spec/riak/serializers_spec.rb +9 -9
- data/spec/riak/stamp_spec.rb +9 -9
- data/spec/riak/walk_spec_spec.rb +46 -46
- data/spec/spec_helper.rb +14 -22
- data/spec/support/certs/README.md +13 -0
- data/spec/support/certs/ca.crt +22 -0
- data/spec/support/certs/client.crt +95 -0
- data/spec/support/certs/client.key +27 -0
- data/spec/support/certs/empty_ca.crt +21 -0
- data/spec/support/certs/server.crl +13 -0
- data/spec/support/certs/server.crt +95 -0
- data/spec/support/certs/server.key +27 -0
- data/spec/support/integration_setup.rb +1 -1
- data/spec/support/search_corpus_setup.rb +29 -8
- data/spec/support/test_client.rb +46 -0
- data/spec/support/test_client.yml.example +10 -0
- data/spec/support/unified_backend_examples.rb +104 -83
- data/spec/support/version_filter.rb +2 -2
- data/spec/support/wait_until.rb +14 -0
- metadata +134 -132
- data/erl_src/riak_kv_test014_backend.beam +0 -0
- data/erl_src/riak_kv_test014_backend.erl +0 -189
- data/erl_src/riak_kv_test_backend.beam +0 -0
- data/erl_src/riak_kv_test_backend.erl +0 -731
- data/erl_src/riak_search_test_backend.beam +0 -0
- data/erl_src/riak_search_test_backend.erl +0 -175
- data/lib/riak/client/excon_backend.rb +0 -172
- data/lib/riak/client/http_backend.rb +0 -413
- data/lib/riak/client/http_backend/bucket_streamer.rb +0 -15
- data/lib/riak/client/http_backend/chunked_json_streamer.rb +0 -42
- data/lib/riak/client/http_backend/configuration.rb +0 -227
- data/lib/riak/client/http_backend/key_streamer.rb +0 -15
- data/lib/riak/client/http_backend/object_methods.rb +0 -114
- data/lib/riak/client/http_backend/request_headers.rb +0 -34
- data/lib/riak/client/http_backend/transport_methods.rb +0 -201
- data/lib/riak/client/instrumentation.rb +0 -25
- data/lib/riak/client/net_http_backend.rb +0 -82
- data/lib/riak/cluster.rb +0 -151
- data/lib/riak/failed_request.rb +0 -81
- data/lib/riak/instrumentation.rb +0 -6
- data/lib/riak/node.rb +0 -40
- data/lib/riak/node/configuration.rb +0 -304
- data/lib/riak/node/console.rb +0 -133
- data/lib/riak/node/control.rb +0 -207
- data/lib/riak/node/defaults.rb +0 -85
- data/lib/riak/node/generation.rb +0 -127
- data/lib/riak/node/log.rb +0 -34
- data/lib/riak/node/version.rb +0 -29
- data/lib/riak/search.rb +0 -3
- data/lib/riak/test_server.rb +0 -89
- data/lib/riak/util/headers.rb +0 -32
- data/lib/riak/util/multipart.rb +0 -52
- data/lib/riak/util/multipart/stream_parser.rb +0 -62
- data/spec/fixtures/munchausen.txt +0 -1033
- data/spec/integration/riak/cluster_spec.rb +0 -88
- data/spec/integration/riak/http_backends_spec.rb +0 -180
- data/spec/integration/riak/node_spec.rb +0 -170
- data/spec/integration/riak/test_server_spec.rb +0 -57
- data/spec/riak/excon_backend_spec.rb +0 -102
- data/spec/riak/headers_spec.rb +0 -21
- data/spec/riak/http_backend/configuration_spec.rb +0 -273
- data/spec/riak/http_backend/object_methods_spec.rb +0 -243
- data/spec/riak/http_backend/transport_methods_spec.rb +0 -97
- data/spec/riak/http_backend_spec.rb +0 -367
- data/spec/riak/instrumentation_spec.rb +0 -167
- data/spec/riak/multipart_spec.rb +0 -23
- data/spec/riak/net_http_backend_spec.rb +0 -15
- data/spec/riak/stream_parser_spec.rb +0 -53
- data/spec/support/drb_mock_server.rb +0 -39
- data/spec/support/http_backend_implementation_examples.rb +0 -253
- data/spec/support/mock_server.rb +0 -81
- data/spec/support/mocks.rb +0 -4
- data/spec/support/riak_test.rb +0 -77
- data/spec/support/sometimes.rb +0 -46
- data/spec/support/test_server.rb +0 -61
- data/spec/support/test_server.yml.example +0 -14
@@ -0,0 +1,222 @@
|
|
1
|
+
require 'riak/errors/crdt_error'
|
2
|
+
|
3
|
+
module Riak
|
4
|
+
class Client
|
5
|
+
class BeefcakeProtobuffsBackend
|
6
|
+
|
7
|
+
# Returns a new {CrdtOperator} for serializing CRDT operations into
|
8
|
+
# protobuffs and sending them to a Riak cluster.
|
9
|
+
# @api private
|
10
|
+
def crdt_operator
|
11
|
+
return CrdtOperator.new self
|
12
|
+
end
|
13
|
+
|
14
|
+
# Serializes and writes CRDT operations from {Riak::Crdt::Operation} members
|
15
|
+
# into protobuffs, and writes them to a Riak cluster.
|
16
|
+
# @api private
|
17
|
+
class CrdtOperator
|
18
|
+
include Util::Translation
|
19
|
+
|
20
|
+
attr_reader :backend
|
21
|
+
|
22
|
+
def initialize(backend)
|
23
|
+
@backend = backend
|
24
|
+
end
|
25
|
+
|
26
|
+
# Serializes and writes CRDT operations.
|
27
|
+
def operate(bucket, key, bucket_type, operation, options={})
|
28
|
+
serialized = serialize(operation)
|
29
|
+
args = {
|
30
|
+
bucket: bucket,
|
31
|
+
key: key,
|
32
|
+
type: bucket_type,
|
33
|
+
op: serialized
|
34
|
+
}.merge options
|
35
|
+
request = DtUpdateReq.new args
|
36
|
+
begin
|
37
|
+
return backend.protocol do |p|
|
38
|
+
p.write :DtUpdateReq, request
|
39
|
+
p.expect :DtUpdateResp, DtUpdateResp, empty_body_acceptable: true
|
40
|
+
end
|
41
|
+
rescue ProtobuffsErrorResponse => e
|
42
|
+
raise unless e.message =~ /precondition/
|
43
|
+
raise CrdtError::PreconditionError.new e.message
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
# Serializes CRDT operations without writing them.
|
48
|
+
def serialize(operations)
|
49
|
+
return serialize [operations] unless operations.is_a? Enumerable
|
50
|
+
|
51
|
+
serialize_wrap operations
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
def serialize_wrap(operations)
|
56
|
+
raise ArgumentError, t('crdt.serialize_no_ops') if operations.empty?
|
57
|
+
ops = serialize_group operations
|
58
|
+
|
59
|
+
DtOp.new(wrap_field_for(operations) => ops)
|
60
|
+
end
|
61
|
+
|
62
|
+
def wrap_field_for(ops)
|
63
|
+
"#{ops.first.type.to_s}_op".to_sym
|
64
|
+
end
|
65
|
+
|
66
|
+
def serialize_group(operations)
|
67
|
+
case operations.first.type
|
68
|
+
when :counter
|
69
|
+
serialize_counter operations
|
70
|
+
when :set
|
71
|
+
serialize_set operations
|
72
|
+
when :map
|
73
|
+
serialize_map operations
|
74
|
+
else
|
75
|
+
raise ArgumentError, t('crdt.unknown_field', symbol: operation.type.inspect)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def inner_serialize_group(operations)
|
80
|
+
updates, deletes = operations.partition do |op|
|
81
|
+
op.value.is_a? Riak::Crdt::Operation::Update
|
82
|
+
end
|
83
|
+
serialized_updates = updates.map do |operation|
|
84
|
+
inner_serialize operation.value
|
85
|
+
end
|
86
|
+
serialized_deletes = deletes.map do |operation|
|
87
|
+
inner_serialize_delete operation.value
|
88
|
+
end
|
89
|
+
|
90
|
+
{ updates: serialized_updates,
|
91
|
+
removes: serialized_deletes
|
92
|
+
}
|
93
|
+
end
|
94
|
+
|
95
|
+
def inner_serialize(operation)
|
96
|
+
case operation.type
|
97
|
+
when :counter
|
98
|
+
serialize_inner_counter operation
|
99
|
+
when :flag
|
100
|
+
serialize_flag operation
|
101
|
+
when :register
|
102
|
+
serialize_register operation
|
103
|
+
when :set
|
104
|
+
serialize_inner_set operation
|
105
|
+
when :map
|
106
|
+
serialize_inner_map operation
|
107
|
+
else
|
108
|
+
raise ArgumentError, t('crdt.unknown_inner_field',
|
109
|
+
symbol: operation.type.inspect)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def inner_serialize_delete(operation)
|
114
|
+
MapField.new(
|
115
|
+
name: operation.name,
|
116
|
+
type: type_symbol_to_type_enum(operation.type)
|
117
|
+
)
|
118
|
+
end
|
119
|
+
|
120
|
+
def serialize_counter(counter_ops)
|
121
|
+
amount = counter_ops.inject(0){|m, o| m += o.value }
|
122
|
+
CounterOp.new(increment: amount)
|
123
|
+
end
|
124
|
+
|
125
|
+
def serialize_inner_counter(counter_op)
|
126
|
+
MapUpdate.new(
|
127
|
+
field: MapField.new(
|
128
|
+
name: counter_op.name,
|
129
|
+
type: MapField::MapFieldType::COUNTER
|
130
|
+
),
|
131
|
+
counter_op: CounterOp.new(
|
132
|
+
increment: counter_op.value
|
133
|
+
)
|
134
|
+
)
|
135
|
+
end
|
136
|
+
|
137
|
+
def serialize_flag(flag_op)
|
138
|
+
operation_value = flag_op.value ? MapUpdate::FlagOp::ENABLE : MapUpdate::FlagOp::DISABLE
|
139
|
+
MapUpdate.new(
|
140
|
+
field: MapField.new(
|
141
|
+
name: flag_op.name,
|
142
|
+
type: MapField::MapFieldType::FLAG
|
143
|
+
),
|
144
|
+
flag_op: operation_value
|
145
|
+
)
|
146
|
+
end
|
147
|
+
|
148
|
+
def serialize_register(register_op)
|
149
|
+
MapUpdate.new(
|
150
|
+
field: MapField.new(
|
151
|
+
name: register_op.name,
|
152
|
+
type: MapField::MapFieldType::REGISTER
|
153
|
+
),
|
154
|
+
register_op: register_op.value
|
155
|
+
)
|
156
|
+
end
|
157
|
+
|
158
|
+
def serialize_set(set_ops)
|
159
|
+
adds = ::Set.new
|
160
|
+
removes = ::Set.new
|
161
|
+
set_ops.each do |o|
|
162
|
+
adds.add [o.value[:add]] if o.value[:add]
|
163
|
+
removes.merge [o.value[:remove]] if o.value[:remove]
|
164
|
+
end
|
165
|
+
|
166
|
+
SetOp.new(
|
167
|
+
adds: adds.to_a.flatten,
|
168
|
+
removes: removes.to_a.flatten
|
169
|
+
)
|
170
|
+
end
|
171
|
+
|
172
|
+
def serialize_inner_set(set_op)
|
173
|
+
value = set_op.value or nil
|
174
|
+
|
175
|
+
MapUpdate.new(
|
176
|
+
field: MapField.new(
|
177
|
+
name: set_op.name,
|
178
|
+
type: MapField::MapFieldType::SET
|
179
|
+
),
|
180
|
+
set_op: SetOp.new(
|
181
|
+
adds: value[:add],
|
182
|
+
removes: value[:remove]
|
183
|
+
)
|
184
|
+
)
|
185
|
+
end
|
186
|
+
|
187
|
+
def serialize_map(map_ops)
|
188
|
+
inner_serialized = inner_serialize_group map_ops
|
189
|
+
|
190
|
+
MapOp.new(inner_serialized)
|
191
|
+
end
|
192
|
+
|
193
|
+
def serialize_inner_map(map_op)
|
194
|
+
inner_op = map_op.value
|
195
|
+
if inner_op.is_a? Riak::Crdt::Operation::Delete
|
196
|
+
return MapUpdate.new(field: MapField.new(
|
197
|
+
name: map_op.name,
|
198
|
+
type: MapField::MapFieldType::MAP
|
199
|
+
),
|
200
|
+
map_op: MapOp.new(
|
201
|
+
removes: inner_op.name)
|
202
|
+
)
|
203
|
+
end
|
204
|
+
inner_serialized = inner_serialize inner_op
|
205
|
+
|
206
|
+
MapUpdate.new(
|
207
|
+
field: MapField.new(
|
208
|
+
name: map_op.name,
|
209
|
+
type: MapField::MapFieldType::MAP
|
210
|
+
),
|
211
|
+
map_op: MapOp.new(
|
212
|
+
updates: [inner_serialized]
|
213
|
+
))
|
214
|
+
end
|
215
|
+
|
216
|
+
def type_symbol_to_type_enum(sym)
|
217
|
+
MapField::MapFieldType.const_get sym.to_s.upcase
|
218
|
+
end
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
@@ -33,12 +33,41 @@ module Riak
|
|
33
33
|
:SearchQueryResp => 28,
|
34
34
|
:ResetBucketReq => 29,
|
35
35
|
:ResetBucketResp => 30,
|
36
|
+
|
37
|
+
# bucket types
|
38
|
+
:GetBucketTypeReq => 31,
|
39
|
+
:SetBucketTypeReq => 32,
|
40
|
+
:ResetBucketTypeReq => 33,
|
41
|
+
|
42
|
+
# riak cs
|
36
43
|
:CSBucketReq => 40,
|
37
44
|
:CSBucketResp => 41,
|
45
|
+
|
46
|
+
# 1.4 counters
|
38
47
|
:CounterUpdateReq => 50,
|
39
48
|
:CounterUpdateResp => 51,
|
40
49
|
:CounterGetReq => 52,
|
41
50
|
:CounterGetResp => 53,
|
51
|
+
|
52
|
+
# yokozuna
|
53
|
+
:YokozunaIndexGetReq => 54,
|
54
|
+
:YokozunaIndexGetResp => 55,
|
55
|
+
:YokozunaIndexPutReq => 56,
|
56
|
+
:YokozunaIndexDeleteReq => 57,
|
57
|
+
:YokozunaSchemaGetReq => 58,
|
58
|
+
:YokozunaSchemaGetResp => 59,
|
59
|
+
:YokozunaSchemaPutReq => 60,
|
60
|
+
|
61
|
+
# riak 2 CRDT
|
62
|
+
:DtFetchReq => 80,
|
63
|
+
:DtFetchResp => 81,
|
64
|
+
:DtUpdateReq => 82,
|
65
|
+
:DtUpdateResp => 83,
|
66
|
+
|
67
|
+
# internal
|
68
|
+
:AuthReq => 253,
|
69
|
+
:AuthResp => 254,
|
70
|
+
:StartTls => 255
|
42
71
|
}
|
43
72
|
|
44
73
|
CODE_TO_MESSAGE = MESSAGE_TO_CODE.invert
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Riak
|
2
|
+
class Client
|
3
|
+
# @private
|
4
|
+
class BeefcakeProtobuffsBackend
|
5
|
+
class RpbIndexReq
|
6
|
+
module IndexQueryType
|
7
|
+
EQ = 0
|
8
|
+
RANGE = 1
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class RpbBucketProps
|
13
|
+
def clean_hook(newval)
|
14
|
+
if newval.is_a? Array
|
15
|
+
return newval.map{|v| clean_hook v}
|
16
|
+
end
|
17
|
+
|
18
|
+
newval = newval.symbolize_keys if newval.is_a? Hash
|
19
|
+
if newval.is_a?(Hash) && newval[:module] && newval[:function]
|
20
|
+
modfun = RpbModFun.new newval
|
21
|
+
hook = RpbCommitHook.new modfun: modfun
|
22
|
+
newval = hook
|
23
|
+
elsif newval.is_a?(Hash) && newval[:name]
|
24
|
+
hook = RpbCommitHook.new newval
|
25
|
+
newval = hook
|
26
|
+
elsif newval.is_a? String
|
27
|
+
hook = RpbCommitHook.new name: newval
|
28
|
+
newval = hook
|
29
|
+
end
|
30
|
+
|
31
|
+
return newval
|
32
|
+
end
|
33
|
+
|
34
|
+
# "repeated" elements with zero items are indistinguishable
|
35
|
+
# from a nil, so we have to manage has_precommit/has_postcommit
|
36
|
+
# flags.
|
37
|
+
def precommit=(newval)
|
38
|
+
newval = clean_hook newval
|
39
|
+
@precommit = newval
|
40
|
+
@has_precommit = !!newval
|
41
|
+
end
|
42
|
+
|
43
|
+
def has_precommit=(newval)
|
44
|
+
@has_precommit = newval
|
45
|
+
@precommit ||= [] if newval
|
46
|
+
end
|
47
|
+
|
48
|
+
def postcommit=(newval)
|
49
|
+
newval = clean_hook newval
|
50
|
+
@postcommit = newval
|
51
|
+
@has_postcommit = !!newval
|
52
|
+
end
|
53
|
+
|
54
|
+
def has_postcommit=(newval)
|
55
|
+
@has_postcommit = newval
|
56
|
+
@postcommit ||= [] if newval
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -4,377 +4,739 @@ module Riak
|
|
4
4
|
class Client
|
5
5
|
# @private
|
6
6
|
class BeefcakeProtobuffsBackend
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
7
|
+
## Generated from riak.proto for
|
8
|
+
require "beefcake"
|
9
|
+
|
10
|
+
|
11
|
+
class RpbErrorResp
|
12
|
+
include Beefcake::Message
|
13
|
+
end
|
14
|
+
|
15
|
+
class RpbGetServerInfoResp
|
16
|
+
include Beefcake::Message
|
17
|
+
end
|
18
|
+
|
19
|
+
class RpbPair
|
20
|
+
include Beefcake::Message
|
21
|
+
end
|
22
|
+
|
23
|
+
class RpbGetBucketReq
|
24
|
+
include Beefcake::Message
|
25
|
+
end
|
26
|
+
|
27
|
+
class RpbGetBucketResp
|
28
|
+
include Beefcake::Message
|
29
|
+
end
|
30
|
+
|
31
|
+
class RpbSetBucketReq
|
32
|
+
include Beefcake::Message
|
33
|
+
end
|
34
|
+
|
35
|
+
class RpbResetBucketReq
|
36
|
+
include Beefcake::Message
|
37
|
+
end
|
38
|
+
|
39
|
+
class RpbGetBucketTypeReq
|
40
|
+
include Beefcake::Message
|
41
|
+
end
|
42
|
+
|
43
|
+
class RpbSetBucketTypeReq
|
44
|
+
include Beefcake::Message
|
45
|
+
end
|
46
|
+
|
47
|
+
class RpbModFun
|
48
|
+
include Beefcake::Message
|
49
|
+
end
|
50
|
+
|
51
|
+
class RpbCommitHook
|
52
|
+
include Beefcake::Message
|
53
|
+
end
|
54
|
+
|
55
|
+
class RpbBucketProps
|
56
|
+
include Beefcake::Message
|
57
|
+
|
58
|
+
module RpbReplMode
|
59
|
+
FALSE = 0
|
60
|
+
REALTIME = 1
|
61
|
+
FULLSYNC = 2
|
62
|
+
TRUE = 3
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
class RpbAuthReq
|
67
|
+
include Beefcake::Message
|
68
|
+
end
|
69
|
+
|
70
|
+
class RpbErrorResp
|
71
|
+
required :errmsg, :bytes, 1
|
72
|
+
required :errcode, :uint32, 2
|
73
|
+
end
|
74
|
+
|
75
|
+
class RpbGetServerInfoResp
|
76
|
+
optional :node, :bytes, 1
|
77
|
+
optional :server_version, :bytes, 2
|
78
|
+
end
|
79
|
+
|
80
|
+
class RpbPair
|
81
|
+
required :key, :bytes, 1
|
82
|
+
optional :value, :bytes, 2
|
83
|
+
end
|
84
|
+
|
85
|
+
class RpbGetBucketReq
|
86
|
+
required :bucket, :bytes, 1
|
87
|
+
optional :type, :bytes, 2
|
88
|
+
end
|
89
|
+
|
90
|
+
class RpbGetBucketResp
|
91
|
+
required :props, RpbBucketProps, 1
|
92
|
+
end
|
93
|
+
|
94
|
+
class RpbSetBucketReq
|
95
|
+
required :bucket, :bytes, 1
|
96
|
+
required :props, RpbBucketProps, 2
|
97
|
+
optional :type, :bytes, 3
|
98
|
+
end
|
99
|
+
|
100
|
+
class RpbResetBucketReq
|
101
|
+
required :bucket, :bytes, 1
|
102
|
+
optional :type, :bytes, 2
|
103
|
+
end
|
104
|
+
|
105
|
+
class RpbGetBucketTypeReq
|
106
|
+
required :type, :bytes, 1
|
107
|
+
end
|
108
|
+
|
109
|
+
class RpbSetBucketTypeReq
|
110
|
+
required :type, :bytes, 1
|
111
|
+
required :props, RpbBucketProps, 2
|
112
|
+
end
|
113
|
+
|
114
|
+
class RpbModFun
|
115
|
+
required :module, :bytes, 1
|
116
|
+
required :function, :bytes, 2
|
117
|
+
end
|
118
|
+
|
119
|
+
class RpbCommitHook
|
120
|
+
optional :modfun, RpbModFun, 1
|
121
|
+
optional :name, :bytes, 2
|
122
|
+
end
|
123
|
+
|
124
|
+
class RpbBucketProps
|
125
|
+
optional :n_val, :uint32, 1
|
126
|
+
optional :allow_mult, :bool, 2
|
127
|
+
optional :last_write_wins, :bool, 3
|
128
|
+
repeated :precommit, RpbCommitHook, 4
|
129
|
+
optional :has_precommit, :bool, 5, :default => false
|
130
|
+
repeated :postcommit, RpbCommitHook, 6
|
131
|
+
optional :has_postcommit, :bool, 7, :default => false
|
132
|
+
optional :chash_keyfun, RpbModFun, 8
|
133
|
+
optional :linkfun, RpbModFun, 9
|
134
|
+
optional :old_vclock, :uint32, 10
|
135
|
+
optional :young_vclock, :uint32, 11
|
136
|
+
optional :big_vclock, :uint32, 12
|
137
|
+
optional :small_vclock, :uint32, 13
|
138
|
+
optional :pr, :uint32, 14
|
139
|
+
optional :r, :uint32, 15
|
140
|
+
optional :w, :uint32, 16
|
141
|
+
optional :pw, :uint32, 17
|
142
|
+
optional :dw, :uint32, 18
|
143
|
+
optional :rw, :uint32, 19
|
144
|
+
optional :basic_quorum, :bool, 20
|
145
|
+
optional :notfound_ok, :bool, 21
|
146
|
+
optional :backend, :bytes, 22
|
147
|
+
optional :search, :bool, 23
|
148
|
+
optional :repl, RpbBucketProps::RpbReplMode, 24
|
149
|
+
optional :search_index, :bytes, 25
|
150
|
+
optional :datatype, :bytes, 26
|
151
|
+
optional :consistent, :bool, 27
|
152
|
+
end
|
153
|
+
|
154
|
+
class RpbAuthReq
|
155
|
+
required :user, :bytes, 1
|
156
|
+
required :password, :bytes, 2
|
157
|
+
end
|
158
|
+
## Generated from riak_kv.proto for
|
159
|
+
require "beefcake"
|
160
|
+
|
161
|
+
|
162
|
+
class RpbGetClientIdResp
|
163
|
+
include Beefcake::Message
|
164
|
+
end
|
165
|
+
|
166
|
+
class RpbSetClientIdReq
|
167
|
+
include Beefcake::Message
|
168
|
+
end
|
169
|
+
|
170
|
+
class RpbGetReq
|
171
|
+
include Beefcake::Message
|
172
|
+
end
|
173
|
+
|
174
|
+
class RpbGetResp
|
175
|
+
include Beefcake::Message
|
176
|
+
end
|
177
|
+
|
178
|
+
class RpbPutReq
|
179
|
+
include Beefcake::Message
|
180
|
+
end
|
181
|
+
|
182
|
+
class RpbPutResp
|
183
|
+
include Beefcake::Message
|
184
|
+
end
|
185
|
+
|
186
|
+
class RpbDelReq
|
187
|
+
include Beefcake::Message
|
188
|
+
end
|
189
|
+
|
190
|
+
class RpbListBucketsReq
|
191
|
+
include Beefcake::Message
|
192
|
+
end
|
193
|
+
|
194
|
+
class RpbListBucketsResp
|
195
|
+
include Beefcake::Message
|
196
|
+
end
|
197
|
+
|
198
|
+
class RpbListKeysReq
|
199
|
+
include Beefcake::Message
|
200
|
+
end
|
201
|
+
|
202
|
+
class RpbListKeysResp
|
203
|
+
include Beefcake::Message
|
204
|
+
end
|
205
|
+
|
206
|
+
class RpbMapRedReq
|
207
|
+
include Beefcake::Message
|
208
|
+
end
|
209
|
+
|
210
|
+
class RpbMapRedResp
|
211
|
+
include Beefcake::Message
|
212
|
+
end
|
213
|
+
|
214
|
+
class RpbIndexReq
|
215
|
+
include Beefcake::Message
|
216
|
+
|
217
|
+
module IndexQueryType
|
218
|
+
eq = 0
|
219
|
+
range = 1
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
class RpbIndexResp
|
224
|
+
include Beefcake::Message
|
225
|
+
end
|
226
|
+
|
227
|
+
class RpbCSBucketReq
|
228
|
+
include Beefcake::Message
|
229
|
+
end
|
230
|
+
|
231
|
+
class RpbCSBucketResp
|
232
|
+
include Beefcake::Message
|
233
|
+
end
|
234
|
+
|
235
|
+
class RpbIndexObject
|
236
|
+
include Beefcake::Message
|
237
|
+
end
|
238
|
+
|
239
|
+
class RpbContent
|
240
|
+
include Beefcake::Message
|
241
|
+
end
|
242
|
+
|
243
|
+
class RpbLink
|
244
|
+
include Beefcake::Message
|
245
|
+
end
|
246
|
+
|
247
|
+
class RpbCounterUpdateReq
|
248
|
+
include Beefcake::Message
|
249
|
+
end
|
250
|
+
|
251
|
+
class RpbCounterUpdateResp
|
252
|
+
include Beefcake::Message
|
253
|
+
end
|
254
|
+
|
255
|
+
class RpbCounterGetReq
|
256
|
+
include Beefcake::Message
|
257
|
+
end
|
258
|
+
|
259
|
+
class RpbCounterGetResp
|
260
|
+
include Beefcake::Message
|
261
|
+
end
|
262
|
+
|
263
|
+
class RpbGetClientIdResp
|
264
|
+
required :client_id, :bytes, 1
|
265
|
+
end
|
266
|
+
|
267
|
+
class RpbSetClientIdReq
|
268
|
+
required :client_id, :bytes, 1
|
269
|
+
end
|
270
|
+
|
271
|
+
class RpbGetReq
|
272
|
+
required :bucket, :bytes, 1
|
273
|
+
required :key, :bytes, 2
|
274
|
+
optional :r, :uint32, 3
|
275
|
+
optional :pr, :uint32, 4
|
276
|
+
optional :basic_quorum, :bool, 5
|
277
|
+
optional :notfound_ok, :bool, 6
|
278
|
+
optional :if_modified, :bytes, 7
|
279
|
+
optional :head, :bool, 8
|
280
|
+
optional :deletedvclock, :bool, 9
|
281
|
+
optional :timeout, :uint32, 10
|
282
|
+
optional :sloppy_quorum, :bool, 11
|
283
|
+
optional :n_val, :uint32, 12
|
284
|
+
optional :type, :bytes, 13
|
285
|
+
end
|
286
|
+
|
287
|
+
class RpbGetResp
|
288
|
+
repeated :content, RpbContent, 1
|
289
|
+
optional :vclock, :bytes, 2
|
290
|
+
optional :unchanged, :bool, 3
|
291
|
+
end
|
292
|
+
|
293
|
+
class RpbPutReq
|
294
|
+
required :bucket, :bytes, 1
|
295
|
+
optional :key, :bytes, 2
|
296
|
+
optional :vclock, :bytes, 3
|
297
|
+
required :content, RpbContent, 4
|
298
|
+
optional :w, :uint32, 5
|
299
|
+
optional :dw, :uint32, 6
|
300
|
+
optional :return_body, :bool, 7
|
301
|
+
optional :pw, :uint32, 8
|
302
|
+
optional :if_not_modified, :bool, 9
|
303
|
+
optional :if_none_match, :bool, 10
|
304
|
+
optional :return_head, :bool, 11
|
305
|
+
optional :timeout, :uint32, 12
|
306
|
+
optional :asis, :bool, 13
|
307
|
+
optional :sloppy_quorum, :bool, 14
|
308
|
+
optional :n_val, :uint32, 15
|
309
|
+
optional :type, :bytes, 16
|
310
|
+
end
|
311
|
+
|
312
|
+
class RpbPutResp
|
313
|
+
repeated :content, RpbContent, 1
|
314
|
+
optional :vclock, :bytes, 2
|
315
|
+
optional :key, :bytes, 3
|
316
|
+
end
|
317
|
+
|
318
|
+
class RpbDelReq
|
319
|
+
required :bucket, :bytes, 1
|
320
|
+
required :key, :bytes, 2
|
321
|
+
optional :rw, :uint32, 3
|
322
|
+
optional :vclock, :bytes, 4
|
323
|
+
optional :r, :uint32, 5
|
324
|
+
optional :w, :uint32, 6
|
325
|
+
optional :pr, :uint32, 7
|
326
|
+
optional :pw, :uint32, 8
|
327
|
+
optional :dw, :uint32, 9
|
328
|
+
optional :timeout, :uint32, 10
|
329
|
+
optional :sloppy_quorum, :bool, 11
|
330
|
+
optional :n_val, :uint32, 12
|
331
|
+
optional :type, :bytes, 13
|
332
|
+
end
|
333
|
+
|
334
|
+
class RpbListBucketsReq
|
335
|
+
optional :timeout, :uint32, 1
|
336
|
+
optional :stream, :bool, 2
|
337
|
+
optional :type, :bytes, 3
|
338
|
+
end
|
339
|
+
|
340
|
+
class RpbListBucketsResp
|
341
|
+
repeated :buckets, :bytes, 1
|
342
|
+
optional :done, :bool, 2
|
343
|
+
end
|
344
|
+
|
345
|
+
class RpbListKeysReq
|
346
|
+
required :bucket, :bytes, 1
|
347
|
+
optional :timeout, :uint32, 2
|
348
|
+
optional :type, :bytes, 3
|
349
|
+
end
|
350
|
+
|
351
|
+
class RpbListKeysResp
|
352
|
+
repeated :keys, :bytes, 1
|
353
|
+
optional :done, :bool, 2
|
354
|
+
end
|
355
|
+
|
356
|
+
class RpbMapRedReq
|
357
|
+
required :request, :bytes, 1
|
358
|
+
required :content_type, :bytes, 2
|
359
|
+
end
|
360
|
+
|
361
|
+
class RpbMapRedResp
|
362
|
+
optional :phase, :uint32, 1
|
363
|
+
optional :response, :bytes, 2
|
364
|
+
optional :done, :bool, 3
|
365
|
+
end
|
366
|
+
|
367
|
+
class RpbIndexReq
|
368
|
+
required :bucket, :bytes, 1
|
369
|
+
required :index, :bytes, 2
|
370
|
+
required :qtype, RpbIndexReq::IndexQueryType, 3
|
371
|
+
optional :key, :bytes, 4
|
372
|
+
optional :range_min, :bytes, 5
|
373
|
+
optional :range_max, :bytes, 6
|
374
|
+
optional :return_terms, :bool, 7
|
375
|
+
optional :stream, :bool, 8
|
376
|
+
optional :max_results, :uint32, 9
|
377
|
+
optional :continuation, :bytes, 10
|
378
|
+
optional :timeout, :uint32, 11
|
379
|
+
optional :type, :bytes, 12
|
380
|
+
optional :term_regex, :bytes, 13
|
381
|
+
optional :pagination_sort, :bool, 14
|
382
|
+
end
|
383
|
+
|
384
|
+
class RpbIndexResp
|
385
|
+
repeated :keys, :bytes, 1
|
386
|
+
repeated :results, RpbPair, 2
|
387
|
+
optional :continuation, :bytes, 3
|
388
|
+
optional :done, :bool, 4
|
389
|
+
end
|
390
|
+
|
391
|
+
class RpbCSBucketReq
|
392
|
+
required :bucket, :bytes, 1
|
393
|
+
required :start_key, :bytes, 2
|
394
|
+
optional :end_key, :bytes, 3
|
395
|
+
optional :start_incl, :bool, 4, :default => true
|
396
|
+
optional :end_incl, :bool, 5, :default => false
|
397
|
+
optional :continuation, :bytes, 6
|
398
|
+
optional :max_results, :uint32, 7
|
399
|
+
optional :timeout, :uint32, 8
|
400
|
+
optional :type, :bytes, 9
|
401
|
+
end
|
402
|
+
|
403
|
+
class RpbCSBucketResp
|
404
|
+
repeated :objects, RpbIndexObject, 1
|
405
|
+
optional :continuation, :bytes, 2
|
406
|
+
optional :done, :bool, 3
|
407
|
+
end
|
408
|
+
|
409
|
+
class RpbIndexObject
|
410
|
+
required :key, :bytes, 1
|
411
|
+
required :object, RpbGetResp, 2
|
412
|
+
end
|
413
|
+
|
414
|
+
class RpbContent
|
415
|
+
required :value, :bytes, 1
|
416
|
+
optional :content_type, :bytes, 2
|
417
|
+
optional :charset, :bytes, 3
|
418
|
+
optional :content_encoding, :bytes, 4
|
419
|
+
optional :vtag, :bytes, 5
|
420
|
+
repeated :links, RpbLink, 6
|
421
|
+
optional :last_mod, :uint32, 7
|
422
|
+
optional :last_mod_usecs, :uint32, 8
|
423
|
+
repeated :usermeta, RpbPair, 9
|
424
|
+
repeated :indexes, RpbPair, 10
|
425
|
+
optional :deleted, :bool, 11
|
426
|
+
end
|
427
|
+
|
428
|
+
class RpbLink
|
429
|
+
optional :bucket, :bytes, 1
|
430
|
+
optional :key, :bytes, 2
|
431
|
+
optional :tag, :bytes, 3
|
432
|
+
end
|
433
|
+
|
434
|
+
class RpbCounterUpdateReq
|
435
|
+
required :bucket, :bytes, 1
|
436
|
+
required :key, :bytes, 2
|
437
|
+
required :amount, :sint64, 3
|
438
|
+
optional :w, :uint32, 4
|
439
|
+
optional :dw, :uint32, 5
|
440
|
+
optional :pw, :uint32, 6
|
441
|
+
optional :returnvalue, :bool, 7
|
442
|
+
end
|
443
|
+
|
444
|
+
class RpbCounterUpdateResp
|
445
|
+
optional :value, :sint64, 1
|
446
|
+
end
|
447
|
+
|
448
|
+
class RpbCounterGetReq
|
449
|
+
required :bucket, :bytes, 1
|
450
|
+
required :key, :bytes, 2
|
451
|
+
optional :r, :uint32, 3
|
452
|
+
optional :pr, :uint32, 4
|
453
|
+
optional :basic_quorum, :bool, 5
|
454
|
+
optional :notfound_ok, :bool, 6
|
455
|
+
end
|
456
|
+
|
457
|
+
class RpbCounterGetResp
|
458
|
+
optional :value, :sint64, 1
|
459
|
+
end
|
460
|
+
## Generated from riak_search.proto for
|
461
|
+
require "beefcake"
|
462
|
+
|
463
|
+
|
464
|
+
class RpbSearchDoc
|
465
|
+
include Beefcake::Message
|
466
|
+
end
|
467
|
+
|
468
|
+
class RpbSearchQueryReq
|
469
|
+
include Beefcake::Message
|
470
|
+
end
|
471
|
+
|
472
|
+
class RpbSearchQueryResp
|
473
|
+
include Beefcake::Message
|
474
|
+
end
|
475
|
+
|
476
|
+
class RpbSearchDoc
|
477
|
+
repeated :fields, RpbPair, 1
|
478
|
+
end
|
479
|
+
|
480
|
+
class RpbSearchQueryReq
|
481
|
+
required :q, :bytes, 1
|
482
|
+
required :index, :bytes, 2
|
483
|
+
optional :rows, :uint32, 3
|
484
|
+
optional :start, :uint32, 4
|
485
|
+
optional :sort, :bytes, 5
|
486
|
+
optional :filter, :bytes, 6
|
487
|
+
optional :df, :bytes, 7
|
488
|
+
optional :op, :bytes, 8
|
489
|
+
repeated :fl, :bytes, 9
|
490
|
+
optional :presort, :bytes, 10
|
491
|
+
end
|
492
|
+
|
493
|
+
class RpbSearchQueryResp
|
494
|
+
repeated :docs, RpbSearchDoc, 1
|
495
|
+
optional :max_score, :float, 2
|
496
|
+
optional :num_found, :uint32, 3
|
497
|
+
end
|
498
|
+
## Generated from riak_yokozuna.proto for
|
499
|
+
require "beefcake"
|
500
|
+
|
501
|
+
|
502
|
+
class RpbYokozunaIndex
|
503
|
+
include Beefcake::Message
|
504
|
+
end
|
505
|
+
|
506
|
+
class RpbYokozunaIndexGetReq
|
507
|
+
include Beefcake::Message
|
508
|
+
end
|
509
|
+
|
510
|
+
class RpbYokozunaIndexGetResp
|
511
|
+
include Beefcake::Message
|
512
|
+
end
|
513
|
+
|
514
|
+
class RpbYokozunaIndexPutReq
|
515
|
+
include Beefcake::Message
|
516
|
+
end
|
517
|
+
|
518
|
+
class RpbYokozunaIndexDeleteReq
|
519
|
+
include Beefcake::Message
|
520
|
+
end
|
521
|
+
|
522
|
+
class RpbYokozunaSchema
|
523
|
+
include Beefcake::Message
|
524
|
+
end
|
525
|
+
|
526
|
+
class RpbYokozunaSchemaPutReq
|
527
|
+
include Beefcake::Message
|
528
|
+
end
|
529
|
+
|
530
|
+
class RpbYokozunaSchemaGetReq
|
531
|
+
include Beefcake::Message
|
532
|
+
end
|
533
|
+
|
534
|
+
class RpbYokozunaSchemaGetResp
|
535
|
+
include Beefcake::Message
|
536
|
+
end
|
537
|
+
|
538
|
+
class RpbYokozunaIndex
|
539
|
+
required :name, :bytes, 1
|
540
|
+
optional :schema, :bytes, 2
|
541
|
+
optional :n_val, :uint32, 3
|
542
|
+
end
|
543
|
+
|
544
|
+
class RpbYokozunaIndexGetReq
|
545
|
+
optional :name, :bytes, 1
|
546
|
+
end
|
547
|
+
|
548
|
+
class RpbYokozunaIndexGetResp
|
549
|
+
repeated :index, RpbYokozunaIndex, 1
|
550
|
+
end
|
551
|
+
|
552
|
+
class RpbYokozunaIndexPutReq
|
553
|
+
required :index, RpbYokozunaIndex, 1
|
554
|
+
end
|
555
|
+
|
556
|
+
class RpbYokozunaIndexDeleteReq
|
557
|
+
required :name, :bytes, 1
|
558
|
+
end
|
559
|
+
|
560
|
+
class RpbYokozunaSchema
|
561
|
+
required :name, :bytes, 1
|
562
|
+
optional :content, :bytes, 2
|
563
|
+
end
|
564
|
+
|
565
|
+
class RpbYokozunaSchemaPutReq
|
566
|
+
required :schema, RpbYokozunaSchema, 1
|
567
|
+
end
|
568
|
+
|
569
|
+
class RpbYokozunaSchemaGetReq
|
570
|
+
required :name, :bytes, 1
|
571
|
+
end
|
572
|
+
|
573
|
+
class RpbYokozunaSchemaGetResp
|
574
|
+
required :schema, RpbYokozunaSchema, 1
|
575
|
+
end
|
576
|
+
## Generated from riak_dt.proto for
|
577
|
+
require "beefcake"
|
578
|
+
|
579
|
+
|
580
|
+
class MapField
|
581
|
+
include Beefcake::Message
|
582
|
+
|
583
|
+
module MapFieldType
|
584
|
+
COUNTER = 1
|
585
|
+
SET = 2
|
586
|
+
REGISTER = 3
|
587
|
+
FLAG = 4
|
588
|
+
MAP = 5
|
589
|
+
end
|
590
|
+
end
|
591
|
+
|
592
|
+
class MapEntry
|
593
|
+
include Beefcake::Message
|
594
|
+
end
|
595
|
+
|
596
|
+
class DtFetchReq
|
597
|
+
include Beefcake::Message
|
598
|
+
end
|
599
|
+
|
600
|
+
class DtValue
|
601
|
+
include Beefcake::Message
|
602
|
+
end
|
603
|
+
|
604
|
+
class DtFetchResp
|
605
|
+
include Beefcake::Message
|
606
|
+
|
607
|
+
module DataType
|
608
|
+
COUNTER = 1
|
609
|
+
SET = 2
|
610
|
+
MAP = 3
|
611
|
+
end
|
612
|
+
end
|
613
|
+
|
614
|
+
class CounterOp
|
615
|
+
include Beefcake::Message
|
616
|
+
end
|
617
|
+
|
618
|
+
class SetOp
|
619
|
+
include Beefcake::Message
|
620
|
+
end
|
621
|
+
|
622
|
+
class MapUpdate
|
623
|
+
include Beefcake::Message
|
624
|
+
|
625
|
+
module FlagOp
|
626
|
+
ENABLE = 1
|
627
|
+
DISABLE = 2
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
class MapOp
|
632
|
+
include Beefcake::Message
|
633
|
+
end
|
634
|
+
|
635
|
+
class DtOp
|
636
|
+
include Beefcake::Message
|
637
|
+
end
|
638
|
+
|
639
|
+
class DtUpdateReq
|
640
|
+
include Beefcake::Message
|
641
|
+
end
|
642
|
+
|
643
|
+
class DtUpdateResp
|
644
|
+
include Beefcake::Message
|
645
|
+
end
|
646
|
+
|
647
|
+
class MapField
|
648
|
+
required :name, :bytes, 1
|
649
|
+
required :type, MapField::MapFieldType, 2
|
650
|
+
end
|
651
|
+
|
652
|
+
class MapEntry
|
653
|
+
required :field, MapField, 1
|
654
|
+
optional :counter_value, :sint64, 2
|
655
|
+
repeated :set_value, :bytes, 3
|
656
|
+
optional :register_value, :bytes, 4
|
657
|
+
optional :flag_value, :bool, 5
|
658
|
+
repeated :map_value, MapEntry, 6
|
659
|
+
end
|
660
|
+
|
661
|
+
class DtFetchReq
|
662
|
+
required :bucket, :bytes, 1
|
663
|
+
required :key, :bytes, 2
|
664
|
+
required :type, :bytes, 3
|
665
|
+
optional :r, :uint32, 4
|
666
|
+
optional :pr, :uint32, 5
|
667
|
+
optional :basic_quorum, :bool, 6
|
668
|
+
optional :notfound_ok, :bool, 7
|
669
|
+
optional :timeout, :uint32, 8
|
670
|
+
optional :sloppy_quorum, :bool, 9
|
671
|
+
optional :n_val, :uint32, 10
|
672
|
+
optional :include_context, :bool, 11, :default => true
|
673
|
+
end
|
674
|
+
|
675
|
+
class DtValue
|
676
|
+
optional :counter_value, :sint64, 1
|
677
|
+
repeated :set_value, :bytes, 2
|
678
|
+
repeated :map_value, MapEntry, 3
|
679
|
+
end
|
680
|
+
|
681
|
+
class DtFetchResp
|
682
|
+
optional :context, :bytes, 1
|
683
|
+
required :type, DtFetchResp::DataType, 2
|
684
|
+
optional :value, DtValue, 3
|
685
|
+
end
|
686
|
+
|
687
|
+
class CounterOp
|
688
|
+
optional :increment, :sint64, 1
|
689
|
+
end
|
690
|
+
|
691
|
+
class SetOp
|
692
|
+
repeated :adds, :bytes, 1
|
693
|
+
repeated :removes, :bytes, 2
|
694
|
+
end
|
695
|
+
|
696
|
+
class MapUpdate
|
697
|
+
required :field, MapField, 1
|
698
|
+
optional :counter_op, CounterOp, 2
|
699
|
+
optional :set_op, SetOp, 3
|
700
|
+
optional :register_op, :bytes, 4
|
701
|
+
optional :flag_op, MapUpdate::FlagOp, 5
|
702
|
+
optional :map_op, MapOp, 6
|
703
|
+
end
|
704
|
+
|
705
|
+
class MapOp
|
706
|
+
repeated :removes, MapField, 1
|
707
|
+
repeated :updates, MapUpdate, 2
|
708
|
+
end
|
709
|
+
|
710
|
+
class DtOp
|
711
|
+
optional :counter_op, CounterOp, 1
|
712
|
+
optional :set_op, SetOp, 2
|
713
|
+
optional :map_op, MapOp, 3
|
714
|
+
end
|
715
|
+
|
716
|
+
class DtUpdateReq
|
717
|
+
required :bucket, :bytes, 1
|
718
|
+
optional :key, :bytes, 2
|
719
|
+
required :type, :bytes, 3
|
720
|
+
optional :context, :bytes, 4
|
721
|
+
required :op, DtOp, 5
|
722
|
+
optional :w, :uint32, 6
|
723
|
+
optional :dw, :uint32, 7
|
724
|
+
optional :pw, :uint32, 8
|
725
|
+
optional :return_body, :bool, 9, :default => false
|
726
|
+
optional :timeout, :uint32, 10
|
727
|
+
optional :sloppy_quorum, :bool, 11
|
728
|
+
optional :n_val, :uint32, 12
|
729
|
+
optional :include_context, :bool, 13, :default => true
|
730
|
+
end
|
731
|
+
|
732
|
+
class DtUpdateResp
|
733
|
+
optional :key, :bytes, 1
|
734
|
+
optional :context, :bytes, 2
|
735
|
+
optional :counter_value, :sint64, 3
|
736
|
+
repeated :set_value, :bytes, 4
|
737
|
+
repeated :map_value, MapEntry, 5
|
738
|
+
end
|
739
|
+
|
378
740
|
end
|
379
741
|
end
|
380
742
|
end
|