@Experimental(value=FILESYSTEM) public abstract static class FileBasedSink.FilenamePolicy extends java.lang.Object implements java.io.Serializable
Constructor and Description |
---|
FilenamePolicy() |
Modifier and Type | Method and Description |
---|---|
void |
populateDisplayData(DisplayData.Builder builder)
Populates the display data.
|
abstract @Nullable ResourceId |
unwindowedFilename(int shardNumber,
int numShards,
FileBasedSink.OutputFileHints outputFileHints)
When a sink has not requested windowed or triggered output, this method will be invoked to
return the file
resource to be created given the base output directory and
a FileBasedSink.OutputFileHints containing information about the file, including a suggested (e.g. |
abstract ResourceId |
windowedFilename(int shardNumber,
int numShards,
BoundedWindow window,
PaneInfo paneInfo,
FileBasedSink.OutputFileHints outputFileHints)
When a sink has requested windowed or triggered output, this method will be invoked to return
the file
resource to be created given the base output directory and a
FileBasedSink.OutputFileHints containing information about the file, including a suggested
extension (e.g. |
@Experimental(value=FILESYSTEM) public abstract ResourceId windowedFilename(int shardNumber, int numShards, BoundedWindow window, PaneInfo paneInfo, FileBasedSink.OutputFileHints outputFileHints)
resource
to be created given the base output directory and a
FileBasedSink.OutputFileHints
containing information about the file, including a suggested
extension (e.g. coming from Compression
).
The policy must return unique and consistent filenames for different windows and panes.
@Experimental(value=FILESYSTEM) public abstract @Nullable ResourceId unwindowedFilename(int shardNumber, int numShards, FileBasedSink.OutputFileHints outputFileHints)
resource
to be created given the base output directory and
a FileBasedSink.OutputFileHints
containing information about the file, including a suggested (e.g.
coming from Compression
).
The shardNumber and numShards parameters, should be used by the policy to generate unique and consistent filenames.
public void populateDisplayData(DisplayData.Builder builder)