Skip to content

Commit

Permalink
Add to upload list method during individual file upload
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Singh <[email protected]>
  • Loading branch information
ashking94 committed Apr 18, 2023
1 parent 2348e3a commit 71cf169
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,6 @@ public void updateLatestLocalFileNameLengthMap(Map<String, Long> latestLocalFile
this.latestLocalFileNameLengthMap = latestLocalFileNameLengthMap;
}

public Set<String> getLatestUploadFiles() {
return latestUploadFiles;
}

public void updateLatestUploadFiles(Set<String> latestUploadFiles) {
this.latestUploadFiles = latestUploadFiles;
}
Expand Down Expand Up @@ -325,4 +321,8 @@ public void updateUploadBytesPerSecMovingAverageWindowSize(int updatedSize) {
public void updateUploadTimeMovingAverageWindowSize(int updatedSize) {
this.uploadTimeMovingAverageReference.set(new MovingAverage(updatedSize));
}

public void addToLatestUploadFiles(String file) {
this.latestUploadFiles.add(file);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ UploadStatus uploadNewSegments(
remoteDirectory.copyFrom(storeDirectory, file, file, IOContext.DEFAULT);
// Upload succeeded
statsTracker.incrementUploadBytesSucceeded(fileSize);
statsTracker.addToLatestUploadFiles(file);
success = true;
} catch (IOException e) {
// ToDO: Handle transient and permanent un-availability of the remote store (GitHub #3397)
Expand Down

0 comments on commit 71cf169

Please sign in to comment.