@Deprecated public abstract class StreamWriterBase<T> extends Object implements Writer<T>
Writers
that write to a FSDataOutputStream
.Modifier | Constructor and Description |
---|---|
|
StreamWriterBase()
Deprecated.
|
protected |
StreamWriterBase(StreamWriterBase<T> other)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the
Writer . |
long |
flush()
Deprecated.
Flushes out any internally held data, and returns the offset that the file must be truncated
to at recovery.
|
long |
getPos()
Deprecated.
Retrieves the current position, and thus size, of the output file.
|
protected org.apache.hadoop.fs.FSDataOutputStream |
getStream()
Deprecated.
Returns the current output stream, if the stream is open.
|
boolean |
isSyncOnFlush()
Deprecated.
|
void |
open(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path)
Deprecated.
Initializes the
Writer for a newly opened bucket file. |
void |
setSyncOnFlush(boolean syncOnFlush)
Deprecated.
Controls whether to sync
FSDataOutputStream on flush. |
public StreamWriterBase()
protected StreamWriterBase(StreamWriterBase<T> other)
public void setSyncOnFlush(boolean syncOnFlush)
FSDataOutputStream
on flush.protected org.apache.hadoop.fs.FSDataOutputStream getStream()
public void open(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
Writer
Writer
for a newly opened bucket file. Any internal per-bucket
initialization should be performed here.open
in interface Writer<T>
fs
- The FileSystem
containing the newly opened file.path
- The Path
of the newly opened file.IOException
public long flush() throws IOException
Writer
flush
in interface Writer<T>
IOException
public long getPos() throws IOException
Writer
getPos
in interface Writer<T>
IOException
public void close() throws IOException
Writer
Writer
. If the writer is already closed, no action will be taken. The call
should close all state related to the current output file, including the output stream opened
in open
.close
in interface Writer<T>
IOException
public boolean isSyncOnFlush()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.