jonvex commented on code in PR #13508:
URL: https://github.com/apache/hudi/pull/13508#discussion_r2183175917
##########
hudi-cli/src/main/java/org/apache/hudi/cli/commands/HoodieLogFileCommand.java:
##########
@@ -222,36 +226,36 @@ storage, new StoragePath(logFilePathPattern)).stream()
}
Objects.requireNonNull(readerSchema);
List<IndexedRecord> allRecords = new ArrayList<>();
-
if (shouldMerge) {
System.out.println("===========================> MERGING RECORDS
<===================");
- HoodieMergedLogRecordScanner scanner =
- HoodieMergedLogRecordScanner.newBuilder()
- .withStorage(storage)
- .withBasePath(client.getBasePath())
- .withLogFilePaths(logFilePaths)
- .withReaderSchema(readerSchema)
- .withLatestInstantTime(
- client.getActiveTimeline()
-
.getCommitAndReplaceTimeline().lastInstant().get().requestedTime())
- .withReverseReader(
- Boolean.parseBoolean(
-
HoodieReaderConfig.COMPACTION_REVERSE_LOG_READ_ENABLE.defaultValue()))
-
.withBufferSize(HoodieMemoryConfig.MAX_DFS_STREAM_BUFFER_SIZE.defaultValue())
- .withMaxMemorySizeInBytes(
-
HoodieMemoryConfig.DEFAULT_MAX_MEMORY_FOR_SPILLABLE_MAP_IN_BYTES)
-
.withSpillableMapBasePath(FileIOUtils.getDefaultSpillableMapBasePath())
-
.withDiskMapType(HoodieCommonConfig.SPILLABLE_DISK_MAP_TYPE.defaultValue())
-
.withBitCaskDiskMapCompressionEnabled(HoodieCommonConfig.DISK_MAP_BITCASK_COMPRESSION_ENABLED.defaultValue())
-
.withOptimizedLogBlocksScan(Boolean.parseBoolean(HoodieReaderConfig.ENABLE_OPTIMIZED_LOG_BLOCKS_SCAN.defaultValue()))
- .build();
- for (HoodieRecord hoodieRecord : scanner) {
- Option<HoodieAvroIndexedRecord> record =
hoodieRecord.toIndexedRecord(readerSchema, new Properties());
- if (allRecords.size() < limit) {
- allRecords.add(record.get().getData());
- }
+ HoodieReaderContext<IndexedRecord> readerContext = new
HoodieAvroReaderContext(
+ HoodieCLI.getTableMetaClient().getStorage().getConf(),
+ HoodieCLI.getTableMetaClient().getTableConfig(),
+ Option.empty(),
+ Option.empty());
+ FileSlice fileSlice = new FileSlice(new HoodieFileGroupId("", ""), "",
null, logFilePaths.stream()
Review Comment:
If you think that is a fair assumption to make I can do that. I am not
understanding the use case for this, so I am hesitant to assume almost anything
--
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]