1
0

Explicitly release resources in LogFileReader and TestHoodieClientBase

This commit is contained in:
Balaji Varadarajan
2018-09-19 13:13:04 -07:00
committed by vinoth chandar
parent 2728f96505
commit 5cb28e7b1f
15 changed files with 119 additions and 7 deletions

View File

@@ -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")

View File

@@ -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;
}