Anonymous avatar Anonymous committed dd08f39

license header for new handoff modules

Comments (0)

Files changed (4)

apps/riak/src/riak_fs_backend.erl

 
 -module(riak_fs_backend).
 -export([start/2,stop/1,get/2,put/3,list/1,list_bucket/2,delete/2]).
+-export([fold/3, drop/1, is_empty/1]).
+
 -include_lib("eunit/include/eunit.hrl").
 % @type state() = term().
 -record(state, {dir}).
     [location_to_bkey(X) || X <- filelib:wildcard("*/*/*/*/*",
                                                   State#state.dir)].
 
+is_empty(State) ->
+    
+
 %% @spec list_bucket(state(), riak_object:bucket()) ->
 %%           [riak_object:key()]
 %% @doc Get a list of the keys in a bucket

apps/riak/src/riak_handoff_listener.erl

+%% This file is provided to you under the Apache License,
+%% Version 2.0 (the "License"); you may not use this file
+%% except in compliance with the License.  You may obtain
+%% a copy of the License at
+
+%%   http://www.apache.org/licenses/LICENSE-2.0
+
+%% Unless required by applicable law or agreed to in writing,
+%% software distributed under the License is distributed on an
+%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+%% KIND, either express or implied.  See the License for the
+%% specific language governing permissions and limitations
+%% under the License.    
+
 -module(riak_handoff_listener).
-
 -behavior(gen_nb_server).
-
 -export([start_link/0]).
 -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
          terminate/2, code_change/3]).

apps/riak/src/riak_handoff_receiver.erl

+%% This file is provided to you under the Apache License,
+%% Version 2.0 (the "License"); you may not use this file
+%% except in compliance with the License.  You may obtain
+%% a copy of the License at
+
+%%   http://www.apache.org/licenses/LICENSE-2.0
+
+%% Unless required by applicable law or agreed to in writing,
+%% software distributed under the License is distributed on an
+%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+%% KIND, either express or implied.  See the License for the
+%% specific language governing permissions and limitations
+%% under the License.    
+
 -module(riak_handoff_receiver).
-
 -include("riakserver_pb.hrl").
 -behaviour(gen_server2).
 
     % header of 1 is a riakobject_pb
     RO_PB = riakserver_pb:decode_riakobject_pb(zlib:unzip(MsgData)),
     BKey = {RO_PB#riakobject_pb.bucket,RO_PB#riakobject_pb.key},
-    ok = gen_fsm:sync_send_all_state_event(VNode, {diffobj, {BKey, RO_PB#riakobject_pb.val}}, 60000),
+    Msg = {diffobj, {BKey, RO_PB#riakobject_pb.val}}
+    ok = gen_fsm:sync_send_all_state_event(VNode, Msg, 60000),
     State;
 process_message(2, _MsgData, State=#state{sock=Socket}) ->
     ok = gen_tcp:send(Socket, <<2:8,"sync">>),

apps/riak/src/riak_handoff_sender.erl

+%% This file is provided to you under the Apache License,
+%% Version 2.0 (the "License"); you may not use this file
+%% except in compliance with the License.  You may obtain
+%% a copy of the License at
+
+%%   http://www.apache.org/licenses/LICENSE-2.0
+
+%% Unless required by applicable law or agreed to in writing,
+%% software distributed under the License is distributed on an
+%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+%% KIND, either express or implied.  See the License for the
+%% specific language governing permissions and limitations
+%% under the License.    
+
 -module(riak_handoff_sender).
 -export([start_link/3]).
 -include("riakserver_pb.hrl").
     case global:set_lock({handoff_token, {node(), Partition}}, [node()], 0) of
         true ->
             Self = self(),
-            {ok, spawn_link(fun() -> start_fold(TargetNode, Partition, BKeyList, Self) end)};
+            {ok, spawn_link(fun()->start_fold(TargetNode, Partition, BKeyList, Self) end)};
         false ->
             {error, locked}
     end.
             
 
 start_fold(TargetNode, Partition, BKeyList, ParentPid) ->
-
     [_Name,Host] = string:tokens(atom_to_list(TargetNode), "@"),
     {ok, Port} = get_handoff_port(TargetNode),
     {ok, Socket} = gen_tcp:connect(Host, Port, 
-                                   [binary, {packet, 4}, {header,1}, {active, once}], 15000),
+                                   [binary, 
+                                    {packet, 4}, 
+                                    {header,1}, 
+                                    {active, once}], 15000),
     M = <<0:8,Partition:160/integer>>,
     ok = gen_tcp:send(Socket, M),
     case BKeyList of
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.