yihua commented on code in PR #13927:
URL: https://github.com/apache/hudi/pull/13927#discussion_r2386872013
##########
hudi-common/src/main/java/org/apache/hudi/common/config/HoodieReaderConfig.java:
##########
@@ -29,6 +29,12 @@
groupName = ConfigGroups.Names.READER,
description = "Configurations that control file group reading.")
public class HoodieReaderConfig extends HoodieConfig {
+
+ /**
+ * This configuration was used to indicate if HFile's native reader should
be used.
+ * Since 1.1.0, Hudi has its own reader for reading HFiles and is no longer
dependent on HFile's native reader.
+ */
+ @Deprecated
Review Comment:
We can remove this config and variable directly.
##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroReaderContext.java:
##########
@@ -138,8 +153,8 @@ public ClosableIterator<IndexedRecord>
getFileRecordIterator(
HoodieAvroFileReader reader =
getOrCreateFileReader(storagePathInfo.getPath(), isLogFile, format -> {
try {
return (HoodieAvroFileReader) HoodieIOFactory.getIOFactory(storage)
-
.getReaderFactory(HoodieRecord.HoodieRecordType.AVRO).getFileReader(new
HoodieConfig(),
- storagePathInfo, format, Option.empty());
+
.getReaderFactory(HoodieRecord.HoodieRecordType.AVRO).getFileReader(hoodieReaderConfig,
+ storagePathInfo.getPath(), format, Option.empty());
Review Comment:
Use `storagePathInfo` directly to avoid fetching file size with an
additional FS call.
##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroReaderContext.java:
##########
@@ -138,8 +153,8 @@ public ClosableIterator<IndexedRecord>
getFileRecordIterator(
HoodieAvroFileReader reader =
getOrCreateFileReader(storagePathInfo.getPath(), isLogFile, format -> {
try {
return (HoodieAvroFileReader) HoodieIOFactory.getIOFactory(storage)
-
.getReaderFactory(HoodieRecord.HoodieRecordType.AVRO).getFileReader(new
HoodieConfig(),
- storagePathInfo, format, Option.empty());
+
.getReaderFactory(HoodieRecord.HoodieRecordType.AVRO).getFileReader(hoodieReaderConfig,
+ storagePathInfo.getPath(), format, Option.empty());
Review Comment:
Fixed
--
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]