Skip to content

Commit

Permalink
Addressing PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Raghuvansh Raj <[email protected]>
  • Loading branch information
raghuvanshraj committed Jun 7, 2023
1 parent 3e7a447 commit 3d7f987
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

import org.opensearch.common.Nullable;
import org.opensearch.common.StreamContext;
import org.opensearch.common.blobstore.transfer.UploadFinalizer;

import java.util.function.Consumer;

/**
* WriteContext is used to encapsulate all data needed by <code>BlobContainer#writeStreams</code>
Expand All @@ -24,7 +25,7 @@ public class WriteContext {
private final long fileSize;
private final boolean failIfAlreadyExists;
private final WritePriority writePriority;
private final UploadFinalizer uploadFinalizer;
private final Consumer<Boolean> uploadFinalizer;
private final boolean doRemoteDataIntegrityCheck;
private final Long expectedChecksum;

Expand All @@ -45,7 +46,7 @@ public WriteContext(
long fileSize,
boolean failIfAlreadyExists,
WritePriority writePriority,
UploadFinalizer uploadFinalizer,
Consumer<Boolean> uploadFinalizer,
boolean doRemoteDataIntegrityCheck,
@Nullable Long expectedChecksum
) {
Expand Down Expand Up @@ -98,7 +99,7 @@ public WritePriority getWritePriority() {
/**
* @return The <code>UploadFinalizer</code> for this upload
*/
public UploadFinalizer getUploadFinalizer() {
public Consumer<Boolean> getUploadFinalizer() {
return uploadFinalizer;
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ public long getChecksum() {
return checksum.getValue();
}

@Override
public boolean markSupported() {
return true;
}

@Override
public synchronized void mark(int readlimit) {
markedChecksum.reset(checksum.getValue());
Expand Down

0 comments on commit 3d7f987

Please sign in to comment.