Class BaseAppenderatorDriver

    • Method Detail

      • startJob

        @Nullable
        public abstract Object startJob​(AppenderatorDriverSegmentLockHelper lockHelper)
        Perform any initial setup and return currently persisted commit metadata.

        Note that this method returns the same metadata you've passed in with your Committers, even though this class stores extra metadata on disk.

        Returns:
        currently persisted commit metadata
      • append

        protected AppenderatorDriverAddResult append​(org.apache.druid.data.input.InputRow row,
                                                     String sequenceName,
                                                     @Nullable
                                                     com.google.common.base.Supplier<org.apache.druid.data.input.Committer> committerSupplier,
                                                     boolean skipSegmentLineageCheck,
                                                     boolean allowIncrementalPersists)
                                              throws IOException
        Add a row. Must not be called concurrently from multiple threads.
        Parameters:
        row - the row to add
        sequenceName - sequenceName for this row's segment
        committerSupplier - supplier of a committer associated with all data that has been added, including this row if {@param allowIncrementalPersists} is set to false then this will not be used
        skipSegmentLineageCheck - if false, perform lineage validation using previousSegmentId for this sequence. Should be set to false if replica tasks would index events in same order
        allowIncrementalPersists - whether to allow persist to happen when maxRowsInMemory or intermediate persist period threshold is hit
        Returns:
        AppenderatorDriverAddResult
        Throws:
        IOException - if there is an I/O error while allocating or writing to a segment
      • close

        public void close()
        Closes this driver. Does not close the underlying Appenderator; you should do that yourself.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable