Skip to content

Commit

Permalink
Added support of copying remote directory without specifying whether …
Browse files Browse the repository at this point in the history
…its a low priority upload

Signed-off-by: vikasvb90 <[email protected]>
  • Loading branch information
vikasvb90 committed May 15, 2024
1 parent d0f4937 commit 0351e49
Showing 1 changed file with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,21 @@ public IndexInput openInput(String name, IOContext context) throws IOException {
}
}

/**
* Copies a file from the source directory to a remote based on multi-stream upload support.
* If vendor plugin supports uploading multiple parts in parallel, <code>BlobContainer#writeBlobByStreams</code>
* will be used, else, the legacy {@link RemoteSegmentStoreDirectory#copyFrom(Directory, String, String, IOContext)}
* will be called.
*
* @param from The directory for the file to be uploaded
* @param src File to be uploaded
* @param context IOContext to be used to open IndexInput of file during remote upload
* @param listener Listener to handle upload callback events
*/
public void copyFrom(Directory from, String src, IOContext context, ActionListener<Void> listener) {
copyFrom(from, src, context, listener, false);
}

Check warning on line 458 in server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/index/store/RemoteSegmentStoreDirectory.java#L457-L458

Added lines #L457 - L458 were not covered by tests

/**
* Copies a file from the source directory to a remote based on multi-stream upload support.
* If vendor plugin supports uploading multiple parts in parallel, <code>BlobContainer#writeBlobByStreams</code>
Expand Down

0 comments on commit 0351e49

Please sign in to comment.