public abstract class BaseHoodieMergedLogRecordScanner<K extends Serializable> extends AbstractHoodieLogRecordReader implements Iterable<HoodieRecord>, Closeable
AbstractHoodieLogRecordReader.Builder, AbstractHoodieLogRecordReader.KeySpec| Modifier and Type | Field and Description |
|---|---|
protected ExternalSpillableMap<K,HoodieRecord> |
records |
HoodieTimer |
timer |
forceFullScan, hoodieTableMetaClient, logFilePaths, preCombineField, readerSchema, recordMerger, recordType| Modifier | Constructor and Description |
|---|---|
protected |
BaseHoodieMergedLogRecordScanner(HoodieStorage storage,
String basePath,
List<String> logFilePaths,
org.apache.avro.Schema readerSchema,
String latestInstantTime,
Long maxMemorySizeInBytes,
boolean reverseReader,
int bufferSize,
String spillableMapBasePath,
Option<InstantRange> instantRange,
ExternalSpillableMap.DiskMapType diskMapType,
boolean isBitCaskDiskMapCompressionEnabled,
boolean withOperationField,
boolean forceFullScan,
Option<String> partitionName,
InternalSchema internalSchema,
Option<String> keyFieldOverride,
boolean enableOptimizedLogBlocksScan,
HoodieRecordMerger recordMerger,
Option<HoodieTableMetaClient> hoodieTableMetaClientOption) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected static <T> HoodieRecord |
getLatestHoodieRecord(HoodieRecord<T> newRecord,
HoodieRecord<T> combinedRecord,
String key) |
long |
getNumMergedRecordsInLog() |
abstract Map<K,HoodieRecord> |
getRecords() |
HoodieRecord.HoodieRecordType |
getRecordType() |
long |
getTotalTimeTakenToReadAndMergeBlocks() |
Iterator<HoodieRecord> |
iterator() |
protected void |
processNextDeletedRecord(DeleteRecord deleteRecord)
Process next deleted record.
|
void |
scan()
Scans delta-log files processing blocks
|
void |
scan(boolean skipProcessingBlocks) |
void |
scanByFullKeys(List<String> keys)
Provides incremental scanning capability where only provided keys will be looked
up in the delta-log files, scanned and subsequently materialized into the internal
cache
|
void |
scanByKeyPrefixes(List<String> keyPrefixes)
Provides incremental scanning capability where only keys matching provided key-prefixes
will be looked up in the delta-log files, scanned and subsequently materialized into
the internal cache
|
getCurrentInstantLogBlocks, getPartitionNameOverride, getPayloadClassFQN, getPayloadProps, getProgress, getTotalCorruptBlocks, getTotalLogBlocks, getTotalLogFiles, getTotalLogRecords, getTotalRollbacks, getValidBlockInstants, isWithOperationField, processNextRecord, scanInternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic final HoodieTimer timer
protected final ExternalSpillableMap<K extends Serializable,HoodieRecord> records
protected BaseHoodieMergedLogRecordScanner(HoodieStorage storage, String basePath, List<String> logFilePaths, org.apache.avro.Schema readerSchema, String latestInstantTime, Long maxMemorySizeInBytes, boolean reverseReader, int bufferSize, String spillableMapBasePath, Option<InstantRange> instantRange, ExternalSpillableMap.DiskMapType diskMapType, boolean isBitCaskDiskMapCompressionEnabled, boolean withOperationField, boolean forceFullScan, Option<String> partitionName, InternalSchema internalSchema, Option<String> keyFieldOverride, boolean enableOptimizedLogBlocksScan, HoodieRecordMerger recordMerger, Option<HoodieTableMetaClient> hoodieTableMetaClientOption)
public final void scan()
public final void scan(boolean skipProcessingBlocks)
public void scanByFullKeys(List<String> keys)
keys - to be looked uppublic void scanByKeyPrefixes(List<String> keyPrefixes)
keyPrefixes - to be looked uppublic Iterator<HoodieRecord> iterator()
iterator in interface Iterable<HoodieRecord>protected void processNextDeletedRecord(DeleteRecord deleteRecord)
AbstractHoodieLogRecordReaderprocessNextDeletedRecord in class AbstractHoodieLogRecordReaderdeleteRecord - Deleted record(hoodie key and ordering value)public abstract Map<K,HoodieRecord> getRecords()
public HoodieRecord.HoodieRecordType getRecordType()
public long getNumMergedRecordsInLog()
protected static <T> HoodieRecord getLatestHoodieRecord(HoodieRecord<T> newRecord, HoodieRecord<T> combinedRecord, String key)
public long getTotalTimeTakenToReadAndMergeBlocks()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2024 The Apache Software Foundation. All rights reserved.