T
- The type of the elements that are being written by the sink.@Deprecated public interface Writer<T> extends Serializable
Writer
is used in conjunction with a
BucketingSink
to perform the actual
writing to the bucket files.Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
Closes the
Writer . |
Writer<T> |
duplicate()
Deprecated.
Duplicates 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.
|
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 |
write(T element)
Deprecated.
Writes one element to the bucket file.
|
void open(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
Writer
for a newly opened bucket file.
Any internal per-bucket initialization should be performed here.fs
- The FileSystem
containing the newly opened file.path
- The Path
of the newly opened file.IOException
long flush() throws IOException
IOException
long getPos() throws IOException
IOException
void close() throws IOException
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
.IOException
void write(T element) throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.