我刚刚发现了血浆https://arrow.apache.org/docs/python/plasma.html#putting-and-getting-python-objects 并希望存储一个对象,获取它,更新并写回存储。 有可能吗? 我失败的审判现在看来如下:
import pyarrow.plasma as plasma
client = plasma.connect("/tmp/plasma")
obj={'val1':1, 'val2':2,'a':[1,2,3]}
obj_id = client.put(obj)
pobj=client.get(obj_id)
pobj['yyy']=999
#now how to write it back??
client.put(pobj, obj_id) #throws an error: pyarrow.lib.PlasmaObjectExists: object already exists in the plasma store
print("object id: "+str(obj_id))
pobj2=client.get(obj_id)
print("object id2: "+str(pobj2))
目前没有回答
相关问题 更多 >
编程相关推荐