forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce interface changes to support read/write blob with object me…
…tadata (opensearch-project#13023) * Introduce interface changes to read/write blob with object metadata --------- Signed-off-by: Sandeep Kumawat <skumwt@amazon.com> Co-authored-by: Sandeep Kumawat <skumwt@amazon.com>
- Loading branch information
1 parent
8d9e12d
commit 9b0f578
Showing
13 changed files
with
406 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
server/src/main/java/org/opensearch/common/blobstore/BlobDownloadResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
package org.opensearch.common.blobstore; | ||
|
||
import java.io.InputStream; | ||
import java.util.Map; | ||
|
||
/** | ||
* Represents the response from a blob download operation, containing both the | ||
* input stream of the blob content and the associated metadata. | ||
* | ||
* @opensearch.experimental | ||
*/ | ||
public class BlobDownloadResponse { | ||
|
||
/** | ||
* Downloaded blob InputStream | ||
*/ | ||
private final InputStream inputStream; | ||
|
||
/** | ||
* Metadata of the downloaded blob | ||
*/ | ||
private final Map<String, String> metadata; | ||
|
||
public InputStream getInputStream() { | ||
return inputStream; | ||
} | ||
|
||
public Map<String, String> getMetadata() { | ||
return metadata; | ||
} | ||
|
||
public BlobDownloadResponse(InputStream inputStream, Map<String, String> metadata) { | ||
this.inputStream = inputStream; | ||
this.metadata = metadata; | ||
} | ||
|
||
} |
Oops, something went wrong.