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 2414e66 commit f8f5b22
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);
}

/**
* 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 f8f5b22

Please sign in to comment.