-
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.
Add interface changes for async repository downloads
Signed-off-by: Kunal Kotwani <kkotwani@amazon.com>
- Loading branch information
1 parent
ccf0b9a
commit 7508d6f
Showing
7 changed files
with
125 additions
and
1 deletion.
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
47 changes: 47 additions & 0 deletions
47
server/src/main/java/org/opensearch/common/blobstore/stream/read/ReadContext.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,47 @@ | ||
/* | ||
* 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.stream.read; | ||
|
||
import java.io.InputStream; | ||
import java.util.List; | ||
|
||
/** | ||
* ReadContext is used to encapsulate all data needed by <code>VerifyingMultiStreamBlobContainer#asyncBlobDownload</code> | ||
* | ||
* @opensearch.experimental | ||
*/ | ||
public class ReadContext { | ||
private final List<InputStream> blobInputStreams; | ||
private final String blobChecksum; | ||
private final int numStreams; | ||
private final long blobSize; | ||
|
||
public ReadContext(List<InputStream> blobInputStreams, String blobChecksum, int numStreams, long blobSize) { | ||
this.blobInputStreams = blobInputStreams; | ||
this.blobChecksum = blobChecksum; | ||
this.numStreams = numStreams; | ||
this.blobSize = blobSize; | ||
} | ||
|
||
public List<InputStream> getBlobInputStreams() { | ||
return blobInputStreams; | ||
} | ||
|
||
public String getBlobChecksum() { | ||
return blobChecksum; | ||
} | ||
|
||
public int getNumStreams() { | ||
return numStreams; | ||
} | ||
|
||
public long getBlobSize() { | ||
return blobSize; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
server/src/main/java/org/opensearch/common/blobstore/stream/read/package-info.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,10 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
/** Abstractions for stream based file reads */ | ||
package org.opensearch.common.blobstore.stream.read; |