public class HoodieMetadataMergedLogRecordScanner extends HoodieMergedLogRecordScanner
HoodieMergedLogRecordScanner implementation which only merged records matching providing keys. This is
useful in limiting memory usage when only a small subset of updates records are to be read.HoodieMergedLogRecordScanner.Builderrecords, timerlogFilePaths, readerSchema| Constructor and Description |
|---|
HoodieMetadataMergedLogRecordScanner(org.apache.hadoop.fs.FileSystem fs,
String basePath,
List<String> logFilePaths,
org.apache.avro.Schema readerSchema,
String latestInstantTime,
Long maxMemorySizeInBytes,
int bufferSize,
String spillableMapBasePath,
Set<String> mergeKeyFilter) |
| Modifier and Type | Method and Description |
|---|---|
Option<HoodieRecord<HoodieMetadataPayload>> |
getRecordByKey(String key)
Retrieve a record given its key.
|
protected void |
processNextDeletedKey(HoodieKey hoodieKey)
Process next deleted key.
|
protected void |
processNextRecord(HoodieRecord<? extends HoodieRecordPayload> hoodieRecord)
Process next record.
|
close, getNumMergedRecordsInLog, getRecords, getTotalTimeTakenToReadAndMergeBlocks, iterator, newBuilder, performScancreateHoodieRecord, getPayloadClassFQN, getProgress, getTotalCorruptBlocks, getTotalLogBlocks, getTotalLogFiles, getTotalLogRecords, getTotalRollbacks, scanclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic HoodieMetadataMergedLogRecordScanner(org.apache.hadoop.fs.FileSystem fs,
String basePath,
List<String> logFilePaths,
org.apache.avro.Schema readerSchema,
String latestInstantTime,
Long maxMemorySizeInBytes,
int bufferSize,
String spillableMapBasePath,
Set<String> mergeKeyFilter)
protected void processNextRecord(HoodieRecord<? extends HoodieRecordPayload> hoodieRecord) throws IOException
AbstractHoodieLogRecordScannerprocessNextRecord in class HoodieMergedLogRecordScannerhoodieRecord - Hoodie Record to processIOExceptionprotected void processNextDeletedKey(HoodieKey hoodieKey)
AbstractHoodieLogRecordScannerprocessNextDeletedKey in class HoodieMergedLogRecordScannerhoodieKey - Deleted record keypublic Option<HoodieRecord<HoodieMetadataPayload>> getRecordByKey(String key)
key - Key of the record to retrieveHoodieRecord if key was found else Option.empty()Copyright © 2021 The Apache Software Foundation. All rights reserved.