你可以追加内容到存储在Minio中的文件吗?

huangapple go评论70阅读模式
英文:

How can i append to a file stored in minio?

问题

现在,我正在编写一个从Elasticsearch滚动数据并将其存储到Minio的服务;为此,我想要将每个滚动结果追加到Minio中上次存储的最后一个文件中。我想要将新数据追加到Minio中存储的文件。

英文:

Right now, I'm writing a service that scroll data from elasticsearch and store them into minio

; for this i want to append each scrolled result to last file stored in minio before.

I want to append new data to a file that stored in minio

答案1

得分: 0

S3 API minio 实现了将对象视为不可变的。一旦写入,修改对象的唯一方法是创建一个具有相同名称但不同内容的新对象。

可以通过创建多个不同的对象并使用 compose API 来构建“复合对象”。这样可以看起来像是就地追加,但如果从大量部分构建复合对象,性能可能不会很好,因为对象存储系统倾向于将复合对象的部分保持分开(甚至可能有一个系统允许您将多少部分合并为复合对象的限制)。

英文:

The S3 API that minio implements treats objects as immutable: once written, the only way to modify an object is to create a new object with the same name and different contents.

It is possible to build "composite objects" by creating multiple different objects and using a compose API to make a new object made from the concatenation of its components: this can look like an in-place append, but probably won't perform well if you build a composite object from a very large number of parts because object storage systems tend to keep the parts of composite objects separate (and there may even be a limit to how many parts the system will allow you to combine into a composite object).

huangapple
  • 本文由 发表于 2023年3月1日 14:16:17
  • 转载请务必保留本文链接:https://go.coder-hub.com/75600156.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定