Re: Attempts at using PyDAOS

Pittman, Ashley M


That looks much better.  You should be aware that daos will be using a byte-array for the values, so in this case 42 will be a string, not a integer.  It’s likely that you’d want to use pickle/unpickle complex values before storing them.




From: <> on behalf of "Alex Barcelo via" <alex@...>
Reply to: "" <>
Date: Wednesday, 6 May 2020 at 09:37
To: "" <>
Subject: Re: [daos] Attempts at using PyDAOS


Thanks, I didn't know about pydaos.Cont and was a bit lost.

I completely missed that section on the deployment documentation, shame on me. I was definetely looking at the wrong places, thanks for pointing that out! I have both the server and the agent running, and thanks to your pointers I have been able to create a key-value from Python and use it.

My success full steps:

$ dmg pool create -i --scm-size=40G --nvme-size=0G
localhost:10001: connected
Pool-create command SUCCEEDED: UUID: 7d8d7aeb-3157-41dd-84cc-286d08a9b8d5, Service replicas: 0
$ daos cont create --pool=7d8d7aeb-3157-41dd-84cc-286d08a9b8d5 --svc=0
Successfully created container 967ce7a8-87c2-4982-a771-d1cc88e490da
$ daos pool list-cont --svc=0 --pool=7d8d7aeb-3157-41dd-84cc-286d08a9b8d5
 05/06-10:33:55.66 Apass 967ce7a8-87c2-4982-a771-d1cc88e490da
$ python
>>> import pydaos
>>> pydaos.Cont('7d8d7aeb-3157-41dd-84cc-286d08a9b8d5', '967ce7a8-87c2-4982-a771-d1cc88e490da')
<pydaos.pydaos_core.Cont object at 0x7f2eeff8f0b8>
>>> kv = cont.rootkv()
>>> kv['answer'] = '42'


Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Join { to automatically receive all group messages.