Source

riak / README

Diff from to
    Assuming you have a working Erlang (R13B03 or later) installation,
    building Riak should be as simple as:
 
+
   $ cd $RIAK
   $ make all rel
 
-
 2.2 Starting Riak 
 ==================
 
    Once you have successfully built Riak, you can start the server with the
    following commands:
 
+
   $ cd $RIAK/rel/riak
   $ bin/riak start
 
-
    Now, verify that the server started up cleanly and is working:
 
    $ bin/riak-admin test
    Now that you have a functional server, let's try storing some data in
    it. First, start up a erlang node using our embedded version of erlang:
 
+
   $ erts-<vsn>/bin/erl -name riaktest -setcookie riak
   
   Eshell V5.7.4  (abort with ^G)
   (riaktest@example.com)1>
 
+   Now construct the node name of Riak server and make sure we can talk to it:
 
-   Now construct the node name of Riak server and make sure we can talk to it:
 
   (riaktest@example.com)4> RiakNode = riak_util:str_to_node(riak).
   
   (riaktest@example.com)2> net_adm:ping(RiakNode).
   pong
   (riaktest@example.com)2>
-
    
    We are now ready to start the Riak client:
 
+
   (riaktest@example.com)2> {ok, C} = riak:client_connect(RiakNode).
   {ok,{riak_client,'riak@example.com',<<4,136,81,151>>}}
 
+   Let's create a shopping list for bread at /groceries/mine:
 
-   Let's create a shopping list for bread at /groceries/mine:
 
   (riaktest@example.com)6> O0 = riak_object:new(<<"groceries">>, <<"mine">>, ["bread"]).
   O0 = riak_object:new(<<"groceries">>, <<"mine">>, ["bread"]).
          undefined}
   
    (riaktest@example.com)3> C:put(O0, 1).
-
     
     Now, read the list back from the Riak server and extract the value
 
+
   (riaktest@example.com)4> {ok, O1} = C:get(<<"groceries">>, <<"mine">>, 1).
   {ok,{r_object,<<"groceries">>,<<"mine">>,
             [{r_content,{dict,2,16,16,8,80,48,
    (riaktest@example.com)5> V = riak_object:get_value(O1).
    ["bread"]
 
+     Add milk to our list of groceries and write the new value to Riak:
 
-     Add milk to our list of groceries and write the new value to Riak:
 
   (riaktest@example.com)6> %% add milk to the list
   (riaktest@example.com)6> O2 = riak_object:update_value(O1, ["milk" | V]).
   (riaktest@example.com)7> C:put(O2, 1).
   ok
 
+     Finally, see what other keys are available in groceries bucket:
 
-     Finally, see what other keys are available in groceries bucket:
 
   (riaktest@example.com)8> C:list_keys(<<"groceries">>).
   {ok,[<<"mine">>]}
 
 
-
 3 Server Management 
 ~~~~~~~~~~~~~~~~~~~~
 
 
     To join a new Riak node to an existing cluster:
 
+
   $ bin/riak start # If a local server is not already running
   $ bin/riak-admin join <node in cluster>
 
-
     (Note that you must have a local node already running for this to work)
     
     To verify that the local Riak node is able to read/write data:
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.