Skip to content

Instantly share code, notes, and snippets.

@kevsmith
Created September 2, 2010 19:15
Show Gist options
  • Select an option

  • Save kevsmith/562785 to your computer and use it in GitHub Desktop.

Select an option

Save kevsmith/562785 to your computer and use it in GitHub Desktop.
-module(bucket_inspector).
-export([inspect/2]).
inspect(Bucket, Server) ->
{ok, C} = riak:client_connect(Server),
{ok, Keys} = C:list_keys(Bucket),
inspect_objects(Bucket, Keys, C).
inspect_objects(_Bucket, [], _Client) ->
ok;
inspect_objects(Bucket, [H|T], Client) ->
Client:get(Bucket, H),
inspect_objects(Bucket, T, Client).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment