Re: Attempts at using PyDAOS
Pittman, Ashley M
The easiest way, assuming you want a single KV per container is to do the following:
import pydaos cont = pydaos.cont(‘<pool_uuid>’, ‘<container_uuid>’) kv = cont.root_kv() kv[‘key’] = value
If you want multiple kvs per container then you have to do something like daos_named_kv and store the name ó object_id translation in the root kv, or you can call cont.newkv() to create a new key-value store, and save kv.oid.lo and kv.oid.hi out-of-band, reopening the kv later on with kv = cont.kv(pydaos.OjbID(lo, hi).
The issues with the socket come from non-default install paths, but this is OK, you need to set DAOS_AGENT_DRPC_DIR to the directory that your agent was started with, as documented here https://daos-stack.github.io/admin/deployment/ I assume you have the agent and server already running?
Ashley.
From:
<daos@daos.groups.io> on behalf of "Alex Barcelo via groups.io" <alex@...>
Ok, regarding KVObj, my naive attempt was:
And that obviously fails due to missing positional arguments. I didn't realize on the factory-like mechanisms through the
Even if I get the KV interface to work, wouldn't I have the same issues with the broken socket which I am already having while trying pydaos.raw? Or are there some key differences between both of them? Should I configure the /var/run/daos_agent path somewhere? Why can I do things like pool creation through CLI but the Python pydaos.raw break? On the "what I am trying to achieve": I want to "validate" (for lack of a better word) that the installation of DAOS I have in our development machine is correct and is using properly its OptaneDC PMM --that is the only deviation from the single-server defaults I have consciously introduced in my installation so far. For now, I have been able to build DAOS in the machine and start all the DAOS services, but I haven't managed to use it from application space yet. And PyDAOS seemed a good way to proceed, is it? --------------------------------------------------------------------- This e-mail and any attachments may contain confidential material for |
|