script erlang contrib function
greg at clipboard.com
Mon Oct 3 13:21:55 EDT 2011
If what you're looking to do is connect to Riak in Erlang without having to run 'riak attach', try this little bit of magic.
The value for "cookie" will be "riak" unless you've changed it.
On Monday, October 3, 2011 at 6:20 AM, francisco treacy wrote:
> Please? at least a pointer!
> 2011/9/29 francisco treacy <francisco.treacy at gmail.com (mailto:francisco.treacy at gmail.com)>
> > I'm wanting to use the `bucket_inspector` contrib function (but have zero Erlang experience).
> > Following the "usage" page, I do the following:
> > $ /opt/riak/erts-5.7.5/bin/erlc -o /tmp /tmp/bucket_inspector.erl $ riak attach (riak at 127.0.0.1 (mailto:riak at 127.0.0.1))1> code:add_path("/tmp"). (riak at 127.0.0.1 (mailto:riak at 127.0.0.1))2> m(bucket_inspector). (riak at 127.0.0.1 (mailto:riak at 127.0.0.1))3> bucket_inspector:inspect(<<"bucket">>, 'riaksearch at 127.0.0.1 (mailto:riaksearch at 127.0.0.1)').
> > And it works.
> > Now, if I want to run that non-interactively, as a script, how should I proceed?
> > I played around with escript but I can't seem to load the Riak path (so the script will fail at `code` et al)
> > Thanks,
> > Francisco
> riak-users mailing list
> riak-users at lists.basho.com (mailto:riak-users at lists.basho.com)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the riak-users