Class FileBasedSegmentWriter

    • Constructor Detail

      • FileBasedSegmentWriter

        public FileBasedSegmentWriter()
    • Method Detail

      • flush

        public URI flush()
                  throws IOException
        Creates one Pinot segment using the GenericRows collected in the AVRO file buffer, at the outputDirUri as specified in the tableConfig->batchConfigs. Successful invocation of this method means that the GenericRows collected so far, are now available in the Pinot segment and not available in the buffer anymore. Successful completion of segment will return the segment URI. The buffer will be reset and ready to accept further records via collect() If an exception is thrown, the buffer will not be reset and so, flush() can be invoked repeatedly in a retry loop. If a successful invocation is not achieved,close() followed by init will have to be called in order to reset the buffer and resume record writing.
        Specified by:
        flush in interface SegmentWriter
        Returns:
        URI of the generated segment
        Throws:
        IOException