Interface FileFormat

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    JsonFormat, ParquetFileFormat

    public interface FileFormat
    extends java.io.Serializable
    A specific format of data stored in bulk storage.
    • Method Detail

      • blob

        static FileFormat blob​(boolean writeGzip)
        Create blob file format with specified FileSystem as root.
        Parameters:
        writeGzip - whether produced files should be compressed using gzip
        Returns:
        BinaryBlobFormat as FileFormat.
      • json

        static FileFormat json​(boolean gzip)
        Create json file format.
        Parameters:
        gzip - read/write gzipped data
        Returns:
        JsonFormat
      • openReader

        Reader openReader​(Path path,
                          EntityDescriptor entity)
                   throws java.io.IOException
        Open reader for data stored at given Path
        Parameters:
        path - Path on associated FileSystem
        entity - descriptor of entity whose data we are going to read
        Returns:
        reader of the data
        Throws:
        java.io.IOException - on errors
      • openWriter

        Writer openWriter​(Path path,
                          EntityDescriptor entity)
                   throws java.io.IOException
        Open writer for data on given Path.
        Parameters:
        path - Path on associated FileSystem
        entity - descriptor of entity whose data we are going to write
        Returns:
        writer for the data
        Throws:
        java.io.IOException - on errors
      • fileSuffix

        java.lang.String fileSuffix()
        Retrieve suffix of file names.
        Returns:
        String suffix