private class OrcFlowFileWriter.BufferedStream extends Object
| Modifier and Type | Field and Description |
|---|---|
private List<ByteBuffer> |
output |
private org.apache.hadoop.hive.ql.io.orc.OutStream |
outStream |
| Constructor and Description |
|---|
BufferedStream(String name,
int bufferSize,
org.apache.hadoop.hive.ql.io.orc.CompressionCodec codec) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clear all of the buffers.
|
void |
flush()
Flush the stream to the codec.
|
long |
getBufferSize()
Get the number of bytes in buffers that are allocated to this stream.
|
long |
getOutputSize()
Get the number of bytes that will be written to the output.
|
boolean |
isSuppressed()
Check the state of suppress flag in output stream
|
void |
output(ByteBuffer buffer)
Receive a buffer from the compression codec.
|
(package private) void |
spillTo(OutputStream out)
Write the saved compressed buffers to the OutputStream.
|
String |
toString() |
private final org.apache.hadoop.hive.ql.io.orc.OutStream outStream
private final List<ByteBuffer> output
BufferedStream(String name, int bufferSize, org.apache.hadoop.hive.ql.io.orc.CompressionCodec codec) throws IOException
IOExceptionpublic void output(ByteBuffer buffer)
buffer - the buffer to saveIOException - if an error occurs while receiving a bufferpublic long getBufferSize()
public void flush()
throws IOException
IOException - if an error occurs while flushing the streampublic void clear()
throws IOException
IOException - if an error occurs while clearing the bufferspublic boolean isSuppressed()
public long getOutputSize()
void spillTo(OutputStream out) throws IOException
out - the stream to write toIOException - if an error occurs during writeCopyright © 2023 Apache NiFi Project. All rights reserved.