-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 read/write blob with object metadata
Signed-off-by: Sandeep Kumawat <skumwt@amazon.com>
- Loading branch information
Sandeep Kumawat
committed
Apr 2, 2024
1 parent
a103b84
commit 04aa874
Showing
4 changed files
with
118 additions
and
0 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
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; | ||
|
||
/** | ||
* A class for blob download response | ||
* | ||
* @opensearch.internal | ||
*/ | ||
public class BlobDownloadResponse { | ||
|
||
/** | ||
* Downloaded blob InputStream | ||
*/ | ||
private InputStream inputStream; | ||
|
||
/** | ||
* Metadata of the downloaded blob | ||
*/ | ||
private 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; | ||
} | ||
|
||
|
||
} |
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