public class HoodieLogFormatWriter extends Object implements HoodieLogFormat.Writer
| Constructor and Description |
|---|
HoodieLogFormatWriter(HoodieStorage storage,
HoodieLogFile logFile,
Integer bufferSize,
Short replication,
Long sizeThreshold,
String rolloverLogWriteToken,
LogFileCreationCallback fileCreationHook) |
| Modifier and Type | Method and Description |
|---|---|
AppendResult |
appendBlock(HoodieLogBlock block) |
AppendResult |
appendBlocks(List<HoodieLogBlock> blocks) |
void |
close() |
long |
getCurrentSize() |
HoodieLogFile |
getLogFile() |
long |
getSizeThreshold() |
void |
withOutputStream(org.apache.hadoop.fs.FSDataOutputStream output)
Overrides the output stream, only for test purpose.
|
public HoodieLogFormatWriter(HoodieStorage storage, HoodieLogFile logFile, Integer bufferSize, Short replication, Long sizeThreshold, String rolloverLogWriteToken, LogFileCreationCallback fileCreationHook)
public HoodieLogFile getLogFile()
getLogFile in interface HoodieLogFormat.Writerpublic long getSizeThreshold()
public void withOutputStream(org.apache.hadoop.fs.FSDataOutputStream output)
public AppendResult appendBlock(HoodieLogBlock block) throws IOException, InterruptedException
appendBlock in interface HoodieLogFormat.WriterIOExceptionInterruptedExceptionpublic AppendResult appendBlocks(List<HoodieLogBlock> blocks) throws IOException
appendBlocks in interface HoodieLogFormat.WriterIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic long getCurrentSize()
throws IOException
getCurrentSize in interface HoodieLogFormat.WriterIOExceptionCopyright © 2025 The Apache Software Foundation. All rights reserved.