You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/03/22 09:35:21 UTC
[GitHub] [hudi] cuibo01 commented on a change in pull request #5004: [HUDI-1180] Upgrade HBase to 2.4.9
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org