Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Move setting bucket properties to riak_api, see basho/riak_api#31 bas…

  • Loading branch information...
commit b1ad1790fa4a75536b3f78cef00c5878416aba9d 1 parent 13d5089
@seancribbs seancribbs authored
Showing with 2 additions and 24 deletions.
  1. +1 −1  src/riak_kv_app.erl
  2. +1 −23 src/riak_kv_pb_bucket.erl
View
2  src/riak_kv_app.erl
@@ -28,7 +28,7 @@
-define(SERVICES, [{riak_kv_pb_object, 3, 6}, %% ClientID stuff
{riak_kv_pb_object, 9, 14}, %% Object requests
- {riak_kv_pb_bucket, 15, 22}, %% Bucket requests
+ {riak_kv_pb_bucket, 15, 18}, %% Bucket requests
{riak_kv_pb_mapred, 23, 24}, %% MapReduce requests
{riak_kv_pb_index, 25, 26} %% Secondary index requests
]).
View
24 src/riak_kv_pb_bucket.erl
@@ -26,8 +26,6 @@
%% <pre>
%% 15 - RpbListBucketsReq
%% 17 - RpbListKeysReq
-%% 19 - RpbGetBucketReq
-%% 21 - RpbSetBucketReq
%% </pre>
%%
%% <p>This service produces the following responses:</p>
@@ -35,8 +33,6 @@
%% <pre>
%% 16 - RpbListBucketsResp
%% 18 - RpbListKeysResp{1,}
-%% 20 - RpbGetBucketResp
-%% 22 - RpbSetBucketResp
%% </pre>
%%
%% <p>The semantics are unchanged from their original
@@ -88,25 +84,7 @@ process(rpblistbucketsreq,
process(#rpblistkeysreq{bucket=B}=Req, #state{client=C} = State) ->
%% stream_list_keys results will be processed by process_stream/3
{ok, ReqId} = C:stream_list_keys(B),
- {reply, {stream, ReqId}, State#state{req = Req, req_ctx = ReqId}};
-
-%% Get bucket properties
-process(#rpbgetbucketreq{bucket=B},
- #state{client=C} = State) ->
- Props = C:get_bucket(B),
- PbProps = riak_pb_kv_codec:encode_bucket_props(Props),
- {reply, #rpbgetbucketresp{props = PbProps}, State};
-
-%% Set bucket properties
-process(#rpbsetbucketreq{bucket=B, props = PbProps},
- #state{client=C} = State) ->
- Props = riak_pb_kv_codec:decode_bucket_props(PbProps),
- case C:set_bucket(B, Props) of
- ok ->
- {reply, rpbsetbucketresp, State};
- {error, Details} ->
- {error, {format, "Invalid bucket properties: ~p", [Details]}, State}
- end.
+ {reply, {stream, ReqId}, State#state{req = Req, req_ctx = ReqId}}.
%% @doc process_stream/3 callback. Handles streaming keys messages.
process_stream({ReqId, done}, ReqId,
Please sign in to comment.
Something went wrong with that request. Please try again.