Class Sink

    • Constructor Detail

      • Sink

        public Sink​(org.joda.time.Interval interval,
                    DataSchema schema,
                    org.apache.druid.timeline.partition.ShardSpec shardSpec,
                    String version,
                    org.apache.druid.segment.incremental.AppendableIndexSpec appendableIndexSpec,
                    int maxRowsInMemory,
                    long maxBytesInMemory,
                    boolean useMaxMemoryEstimates,
                    String dedupColumn)
      • Sink

        public Sink​(org.joda.time.Interval interval,
                    DataSchema schema,
                    org.apache.druid.timeline.partition.ShardSpec shardSpec,
                    String version,
                    org.apache.druid.segment.incremental.AppendableIndexSpec appendableIndexSpec,
                    int maxRowsInMemory,
                    long maxBytesInMemory,
                    boolean useMaxMemoryEstimates,
                    String dedupColumn,
                    List<FireHydrant> hydrants)
    • Method Detail

      • clearDedupCache

        public void clearDedupCache()
      • getInterval

        public org.joda.time.Interval getInterval()
      • add

        public org.apache.druid.segment.incremental.IncrementalIndexAddResult add​(org.apache.druid.data.input.InputRow row,
                                                                                  boolean skipMaxRowsInMemoryCheck)
                                                                           throws org.apache.druid.segment.incremental.IndexSizeExceededException
        Throws:
        org.apache.druid.segment.incremental.IndexSizeExceededException
      • canAppendRow

        public boolean canAppendRow()
      • isEmpty

        public boolean isEmpty()
      • isWritable

        public boolean isWritable()
      • swap

        public FireHydrant swap()
        If currHydrant is A, creates a new index B, sets currHydrant to B and returns A.
        Returns:
        the current index after swapping in a new one
      • swappable

        public boolean swappable()
      • finished

        public boolean finished()
      • finishWriting

        public boolean finishWriting()
        Marks sink as 'finished', preventing further writes.
        Returns:
        'true' if sink was sucessfully finished, 'false' if sink was already finished
      • getSegment

        public org.apache.druid.timeline.DataSegment getSegment()
      • getNumRows

        public int getNumRows()
      • getNumRowsInMemory

        public int getNumRowsInMemory()
      • getBytesInMemory

        public long getBytesInMemory()
      • overshadows

        public boolean overshadows​(Sink other)
        Specified by:
        overshadows in interface org.apache.druid.timeline.Overshadowable<Sink>
      • getStartRootPartitionId

        public int getStartRootPartitionId()
        Specified by:
        getStartRootPartitionId in interface org.apache.druid.timeline.Overshadowable<Sink>
      • getEndRootPartitionId

        public int getEndRootPartitionId()
        Specified by:
        getEndRootPartitionId in interface org.apache.druid.timeline.Overshadowable<Sink>
      • getVersion

        public String getVersion()
        Specified by:
        getVersion in interface org.apache.druid.timeline.Overshadowable<Sink>
      • getMinorVersion

        public short getMinorVersion()
        Specified by:
        getMinorVersion in interface org.apache.druid.timeline.Overshadowable<Sink>
      • getAtomicUpdateGroupSize

        public short getAtomicUpdateGroupSize()
        Specified by:
        getAtomicUpdateGroupSize in interface org.apache.druid.timeline.Overshadowable<Sink>