nsivabalan commented on a change in pull request #3762:
URL: https://github.com/apache/hudi/pull/3762#discussion_r733026340
##########
File path:
hudi-common/src/main/java/org/apache/hudi/common/table/log/block/HoodieHFileDataBlock.java
##########
@@ -141,6 +148,50 @@ public HoodieLogBlockType getBlockType() {
return baos.toByteArray();
}
+ @Override
+ protected void createRecordsFromContentBytes() throws IOException {
+ if (enableInlineReading) {
+ getRecords(Collections.emptyList());
+ } else {
+ super.createRecordsFromContentBytes();
+ }
+ }
+
+ @Override
+ public List<IndexedRecord> getRecords(List<String> keys) throws IOException {
+ readWithInlineFS(keys);
+ return records;
+ }
+
+ private void readWithInlineFS(List<String> keys) throws IOException {
+ boolean enableFullScan = keys.isEmpty();
+ // Get schema from the header
+ Schema writerSchema = new
Schema.Parser().parse(super.getLogBlockHeader().get(HeaderMetadataType.SCHEMA));
+ // If readerSchema was not present, use writerSchema
+ if (schema == null) {
+ schema = writerSchema;
+ }
+ Configuration conf = new Configuration();
Review comment:
yeah. I checked whats in master. we don't really pass in the
configuration and just instantiate a new one inline when needed. and hence
followed the same. I did infact thought of passing it from upper layers, but
already DataBlock constructor has 10+ args. since this is not a must have,
didn't fix it.
--
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]