Explicitly release resources in LogFileReader and TestHoodieClientBase
This commit is contained in:
committed by
vinoth chandar
parent
2728f96505
commit
5cb28e7b1f
@@ -77,6 +77,7 @@ public class ArchivedCommitsCommand implements CommandMarker {
|
||||
List<Comparable[]> readCommits = readRecords.stream().map(r -> (GenericRecord) r).map(r -> readCommit(r))
|
||||
.collect(Collectors.toList());
|
||||
allCommits.addAll(readCommits);
|
||||
reader.close();
|
||||
}
|
||||
|
||||
TableHeader header = new TableHeader().addTableHeaderField("CommitTime")
|
||||
|
||||
@@ -131,6 +131,7 @@ public class HoodieLogFileCommand implements CommandMarker {
|
||||
totalEntries++;
|
||||
}
|
||||
}
|
||||
reader.close();
|
||||
}
|
||||
List<Comparable[]> rows = new ArrayList<>();
|
||||
int i = 0;
|
||||
@@ -221,6 +222,7 @@ public class HoodieLogFileCommand implements CommandMarker {
|
||||
}
|
||||
}
|
||||
}
|
||||
reader.close();
|
||||
if (allRecords.size() >= limit) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user