Permalink
Browse files

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

  • Loading branch information...
1 parent 1c13bee commit cb06b698ceb0d12ddf26aa040dcaa96662e3b280 @seancribbs seancribbs committed with Feb 15, 2013
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
@@ -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
@@ -26,17 +26,13 @@
%% <pre>
%% 15 - RpbListBucketsReq
%% 17 - RpbListKeysReq
-%% 19 - RpbGetBucketReq
-%% 21 - RpbSetBucketReq
%% </pre>
%%
%% <p>This service produces the following responses:</p>
%%
%% <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,

0 comments on commit cb06b69

Please sign in to comment.