[英]Temporal Data Management in Google Cloud Datastore
Is there an api (like hibernate, etc) to manage temporal data in Google Cloud Datastore? 是否有api(如hibernate等)来管理Google Cloud Datastore中的时态数据? Basically i need to maintain bi-temporal data in my datastore.
基本上我需要在我的数据存储中维护双时态数据。 Is there an api that i can use to easily manage this?
有没有我可以用来轻松管理这个的api?
I'm not 100% sure what you mean by "bi-temporal data". 我不是100%肯定你的“双时态数据”是什么意思。
If you mean different data classes that are have different pricing and access times, there are different storage classes (standard and nearline). 如果您指的是具有不同定价和访问时间的不同数据类,则存在不同的存储类(标准和近线)。 https://cloud.google.com/storage/docs/storage-classes .
https://cloud.google.com/storage/docs/storage-classes 。 These are set at the bucket level at creation time.
这些在创建时设置在桶级别。 For example:
gsutil mb -c nearline -l region bucket-url
. 例如:
gsutil mb -c nearline -l region bucket-url
。
You can also set a time-to-live at the bucket level. 您还可以在桶级别设置生存时间。 https://cloud.google.com/storage/docs/lifecycle
https://cloud.google.com/storage/docs/lifecycle
Using gsutil
you can set this policy by uploading a JSON file like this example from the docs: 使用
gsutil
您可以通过从文档中上传此示例的JSON文件来设置此策略:
{
"lifecycle": {
"rule":
[
{
"action": {"type": "Delete"},
"condition": {"age": 365}
}
]
}
}
Save to a file and then gsutil set json-file-name bucket-url
. 保存到文件然后
gsutil set json-file-name bucket-url
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.