cuibo01 commented on a change in pull request #5004:
URL: https://github.com/apache/hudi/pull/5004#discussion_r828713594
##########
File path:
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/testutils/HoodieClientTestUtils.java
##########
@@ -241,9 +243,9 @@ public static long
countRecordsOptionallySince(JavaSparkContext jsc, String base
Schema schema = null;
for (String path : paths) {
try {
- HFile.Reader reader = HFile.createReader(fs, new Path(path),
cacheConfig, fs.getConf());
+ HFile.Reader reader = HFile.createReader(fs, new Path(path),
cacheConfig, true, fs.getConf());
if (schema == null) {
- schema = new Schema.Parser().parse(new
String(reader.loadFileInfo().get("schema".getBytes())));
+ schema = new Schema.Parser().parse(new
String(reader.getHFileInfo().get(KEY_SCHEMA.getBytes())));
}
HFileScanner scanner = reader.getScanner(false, false);
Review comment:
>@cuibo01 Thanks for raising this. Do you mean that we should use the
close() method to properly close the reader when done reading?
yes, we should close scanner
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]