[okfn-discuss] [okfn-coord] question from the Twitter gallery about Open Data Grid
Graham Higgins
gjh at bel-epa.com
Mon Oct 4 01:52:29 UTC 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 3 Oct 2010, at 14:22, Benjamin O'Steen wrote:
> It is worth pointing out that until I can get a functioning python
> client to a riak instance (eg known version of a client that works
> with
> a known version of the server) then the riak functionality is totally
> broken :)
>
> Anyone know (or can point to) a set of replicable install steps to
> achieve this?
I used the latest riak 0.12 binary (osx-i386).
I didn't have any success with the PyPi version of protobuf, despite
it being spec'd in riak-python-client's setup.py, it kept failing to
import google.protobuf.
Compile and install the full protobuf-2.3.0 library [1] (a vanilla "./
configure" worked fine for me) and then install the protobuf Python
library from the code in the "python" subdirectory with a standard
"python setup.py install".
Set RIAK_TEST_HOST so that it matches that of the IP address setting
of one of the nodes in the cluster (for the Hudson build below, I'm
using a node hosted on a rackspace cloud server).
Hudson checkout, build and nosetests of riak-python-client:
http://bel-epa.com/hudson/job/riak-python-client/lastBuild/console
Caveat: 43 tests, 2x2 failures, one pair for each transport type. They
may be critical failures as they involve map-reduce and sibling-count
tests. But it's a start.
I'm as yet unfamiliar with the workings of riak but basic stuff works:
> >>> from riak import *
> >>> client = RiakClient(host='192.168.0.2')
> >>> bucket = client.bucket("foo")
> >>> obj = bucket.new("some_key", {"key":"value"})
> >>> obj.store()
> <riak.riak_object.RiakObject object at 0x7c9330>
> >>> objval = bucket.get("some_key")
> >>> objval.get_data()
> {u'key': u'value'}
[1] http://protobuf.googlecode.com/files/protobuf-2.3.0.tar.bz2
- --
Cheers,
Graham
http://www.linkedin.com/in/ghiggins
-----BEGIN PGP SIGNATURE-----
iEYEARECAAYFAkypM10ACgkQOsmLt1NhivzGPACfVn5J5mcTO4jK61WD59Bru4Yk
d1oAnAo4UI11S+LLljedLRXhWGEMzcO6iQCVAgUBTKkzXVnrWVZ7aXD1AQJU1QP/
Q7ePNbFLh+Fya5DoiTcSp2q1wPEuDvV01yE1MZvxZE4TStn+GNQLrlut5CU5OHjh
EoF2cid+fl3OLVrFZL9Dqt2rR69rjy/sHZhjJZbJxFdhrlMkE6Iww8JkmINz77Jk
rJ8mHcAQvGFhYJqpzkrF224ZrI+L2691K7fPG0cHuEk=
=nNlW
-----END PGP SIGNATURE-----
More information about the okfn-discuss
mailing list