-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 (#13023) (#13757) * Introduce interface changes to read/write blob with object metadata --------- Signed-off-by: Sandeep Kumawat <skumwt@amazon.com>
- Loading branch information
1 parent
215ffc8
commit fe89133
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.