Class WriteOneFilePerWindow.PerWindowFiles

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    WriteOneFilePerWindow

    public static class WriteOneFilePerWindow.PerWindowFiles
    extends org.apache.beam.sdk.io.FileBasedSink.FilenamePolicy
    A FileBasedSink.FilenamePolicy produces a base file name for a write based on metadata about the data being written. This always includes the shard number and the total number of shards. For windowed writes, it also includes the window and pane index (a sequence number assigned to each trigger firing).
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      PerWindowFiles​(org.apache.beam.sdk.io.fs.ResourceId baseFilename)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String filenamePrefixForWindow​(org.apache.beam.sdk.transforms.windowing.IntervalWindow window)  
      org.apache.beam.sdk.io.fs.ResourceId unwindowedFilename​(int shardNumber, int numShards, org.apache.beam.sdk.io.FileBasedSink.OutputFileHints outputFileHints)  
      org.apache.beam.sdk.io.fs.ResourceId windowedFilename​(int shardNumber, int numShards, org.apache.beam.sdk.transforms.windowing.BoundedWindow window, org.apache.beam.sdk.transforms.windowing.PaneInfo paneInfo, org.apache.beam.sdk.io.FileBasedSink.OutputFileHints outputFileHints)  
      • Methods inherited from class org.apache.beam.sdk.io.FileBasedSink.FilenamePolicy

        populateDisplayData
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PerWindowFiles

        public PerWindowFiles​(org.apache.beam.sdk.io.fs.ResourceId baseFilename)
    • Method Detail

      • filenamePrefixForWindow

        public java.lang.String filenamePrefixForWindow​(org.apache.beam.sdk.transforms.windowing.IntervalWindow window)
      • windowedFilename

        public org.apache.beam.sdk.io.fs.ResourceId windowedFilename​(int shardNumber,
                                                                     int numShards,
                                                                     org.apache.beam.sdk.transforms.windowing.BoundedWindow window,
                                                                     org.apache.beam.sdk.transforms.windowing.PaneInfo paneInfo,
                                                                     org.apache.beam.sdk.io.FileBasedSink.OutputFileHints outputFileHints)
        Specified by:
        windowedFilename in class org.apache.beam.sdk.io.FileBasedSink.FilenamePolicy
      • unwindowedFilename

        public org.apache.beam.sdk.io.fs.ResourceId unwindowedFilename​(int shardNumber,
                                                                       int numShards,
                                                                       org.apache.beam.sdk.io.FileBasedSink.OutputFileHints outputFileHints)
        Specified by:
        unwindowedFilename in class org.apache.beam.sdk.io.FileBasedSink.FilenamePolicy