简体   繁体   English

用于列出具有部分 uuid 的对象的 S3 前缀

[英]S3 prefix for listing objects with paritial uuids

I was curious if it was possible to create an S3 prefix which can scope the object listening to a particular folder depending on having just partial data.我很好奇是否可以创建一个 S3 前缀,它可以 scope 和 object 根据只有部分数据来监听特定文件夹。

basically the structure is like below, where I can only provide the uuid for uuid1 and uuid2.基本上结构如下,我只能提供uuid1和uuid2的uuid。 I can't retrieve the ignoreUuid in order to build up the prefix.我无法检索 ignoreUuid 以建立前缀。

Is it possible for me to filter by only providing uuid1 and uuid2?我是否可以仅通过提供 uuid1 和 uuid2 进行过滤?

I can only do by uuid1 at the moment but the listening can be in the thousands and is quite time intensive.我现在只能通过 uuid1 来做,但收听可能有数千个,而且非常耗时。

prefer:  S3_SCAN_RESULT_PREFIX = "{uuid1}/files/{ignoreUuid}/{uuid2}";

currently: S3_SCAN_RESULT_PREFIX = "{uuid1}/files/"; (not optional as this can be quite a huge and expensive object listing) 

   objectListing objects = amazonS3Client().listObjects(bucket, format(S3_RESULT_PREFIX, uuid1, uuid2));

No, it's not possible to natively list objects that match known1/known2/unknown/known3 .不,不可能本地列出与known1/known2/unknown/known3匹配的对象。

You would need to rearrange the prefix to bring all known parts to the front, or maintain an index elsewhere (in DynamoDB or an RDBMS, for example).您需要重新排列前缀以将所有已知部分置于最前面,或在其他位置维护索引(例如,在 DynamoDB 或 RDBMS 中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM