Blob from BlobInfo
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2021 01:16 PM
I'm getting a result set from ElasticSearch, and then for each object in the result set, I need to get a Blob
(or a Binary
) from S3 using only the BlobInfo
elements from ES (digest, filename, etc.) Best I have come up with so far is:
BlobProvider provider = Framework.getService(BlobManager.class).getBlobProviders().values()
.stream().findFirst().orElse(null);
// then use the provider to get the blob:
Blob blob = provider.readBlob(new BlobInfo(... from ElasticSearch result elements ...)
In my testing, there appears to only ever be one provider - that's true even in the unit test environment. Is there a better / more reliable way to get the one and only one "active" BlobProvider
?
0 REPLIES 0
