Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aqni committed Apr 18, 2024
1 parent 9a03840 commit 2c02235
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -307,17 +307,16 @@ public void deleteFiles(List<File> files, TagFilter filter) throws IOException {

public void trimFilesContent(List<File> files, TagFilter tagFilter, long startKey, long endKey)
throws IOException {
files =
files.stream()
.map(f -> FilePathUtils.normalize(f, FileAccessType.WRITE))
.collect(Collectors.toList());

for (File file : files) {
List<File> fileList = getFilesWithTagFilter(file, tagFilter, false);
if (fileList.isEmpty()) {
LOGGER.warn("cant trim the file that not exist!");
continue;
}
fileList =
fileList.stream()
.map(f -> FilePathUtils.normalize(f, FileAccessType.WRITE))
.collect(Collectors.toList());
for (File f : fileList) {
fileOperator.trimFile(f, startKey, endKey);
}
Expand Down

0 comments on commit 2c02235

Please sign in to comment.