我刚刚发现了plasma 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))