我有一个存储在cassandra中的对象列表,
[
{
deviceId: [xxxx],
status: On,
metric: Metric(Watts=10,Current=10),
resources: Resources(cpu=u'2', memory=u'512Mi'),
deviceName: ['test'],
deviceUsageParams : "Not able to save this param since it is a list of UDT (object)"
}
]
父对象是
Public static class Device{
private int deviceId,
private boolean status,
private Metric metric,
private Resources resources,
private string deviceName,
Private List<DeviceUsageParameter> deviceUsageParams
}
我有另一个属性deviceUsageParams,它是另一个UDT对象列表,
我正在尝试使用Kundera包装器将Device对象列表存储到cassandra中,但是如果UDT(即DeviceUsageParameter列表)
它不允许我存储List是否可以使用kundera包装器为cassandra将列表对象存储为列表中另一个对象的属性之一?
TIA ..
答案 0 :(得分:0)
是的,可以使用Kundera在Cassandra中存储自定义对象列表。
如果您尚未添加@ElementCollection
注释,则应该添加cb_done <- function(resp) {
filename <- basename(urltools::path(resp$url))
writeBin(resp$content, filename)
}
pool <- curl::new_pool()
for (u in urls) curl::curl_fetch_multi(u, pool = pool, done = cb_done)
curl::multi_run(pool = pool)
注释。
HTH!