public class HoodieLogFileReader extends Object implements HoodieLogFormat.Reader
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BUFFER_SIZE |
| Constructor and Description |
|---|
HoodieLogFileReader(HoodieStorage storage,
HoodieLogFile logFile,
org.apache.avro.Schema readerSchema,
int bufferSize) |
HoodieLogFileReader(HoodieStorage storage,
HoodieLogFile logFile,
org.apache.avro.Schema readerSchema,
int bufferSize,
boolean reverseReader) |
HoodieLogFileReader(HoodieStorage storage,
HoodieLogFile logFile,
org.apache.avro.Schema readerSchema,
int bufferSize,
boolean reverseReader,
boolean enableRecordLookups,
String keyField) |
HoodieLogFileReader(HoodieStorage storage,
HoodieLogFile logFile,
org.apache.avro.Schema readerSchema,
int bufferSize,
boolean reverseReader,
boolean enableRecordLookups,
String keyField,
InternalSchema internalSchema) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static SeekableDataInputStream |
getDataInputStream(HoodieStorage storage,
HoodieLogFile logFile,
int bufferSize)
Fetch the right
SeekableDataInputStream to be used by wrapping with required input streams. |
HoodieLogFile |
getLogFile() |
boolean |
hasNext() |
boolean |
hasPrev()
hasPrev is not idempotent.
|
long |
moveToPrev()
Reverse pointer, does not read the block.
|
HoodieLogBlock |
next() |
HoodieLogBlock |
prev()
This is a reverse iterator Note: At any point, an instance of HoodieLogFileReader should either iterate reverse
(prev) or forward (next).
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic static final int DEFAULT_BUFFER_SIZE
public HoodieLogFileReader(HoodieStorage storage, HoodieLogFile logFile, org.apache.avro.Schema readerSchema, int bufferSize) throws IOException
IOExceptionpublic HoodieLogFileReader(HoodieStorage storage, HoodieLogFile logFile, org.apache.avro.Schema readerSchema, int bufferSize, boolean reverseReader) throws IOException
IOExceptionpublic HoodieLogFileReader(HoodieStorage storage, HoodieLogFile logFile, org.apache.avro.Schema readerSchema, int bufferSize, boolean reverseReader, boolean enableRecordLookups, String keyField) throws IOException
IOExceptionpublic HoodieLogFileReader(HoodieStorage storage, HoodieLogFile logFile, org.apache.avro.Schema readerSchema, int bufferSize, boolean reverseReader, boolean enableRecordLookups, String keyField, InternalSchema internalSchema) throws IOException
IOExceptionpublic HoodieLogFile getLogFile()
getLogFile in interface HoodieLogFormat.ReaderHoodieLogFormatpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean hasNext()
hasNext in interface Iterator<HoodieLogBlock>public HoodieLogBlock next()
next in interface Iterator<HoodieLogBlock>public boolean hasPrev()
hasPrev in interface HoodieLogFormat.Readerpublic HoodieLogBlock prev() throws IOException
prev in interface HoodieLogFormat.ReaderIOExceptionpublic long moveToPrev()
throws IOException
IOExceptionpublic void remove()
remove in interface Iterator<HoodieLogBlock>public static SeekableDataInputStream getDataInputStream(HoodieStorage storage, HoodieLogFile logFile, int bufferSize)
SeekableDataInputStream to be used by wrapping with required input streams.storage - instance of HoodieStorage in use.logFile - the log file to read.bufferSize - buffer size to be used.SeekableDataInputStream as required.Copyright © 2024 The Apache Software Foundation. All rights reserved.