Class CompactionInfo


  • public final class CompactionInfo
    extends java.lang.Object
    • Method Detail

      • withoutSSTables

        public static CompactionInfo withoutSSTables​(TableMetadata metadata,
                                                     OperationType tasktype,
                                                     long completed,
                                                     long total,
                                                     CompactionInfo.Unit unit,
                                                     TimeUUID compactionId)
        Special compaction info where we always need to cancel the compaction - for example ViewBuilderTask where we don't know the sstables at construction
      • withoutSSTables

        public static CompactionInfo withoutSSTables​(TableMetadata metadata,
                                                     OperationType tasktype,
                                                     long completed,
                                                     long total,
                                                     CompactionInfo.Unit unit,
                                                     TimeUUID compactionId,
                                                     java.lang.String targetDirectory)
        Special compaction info where we always need to cancel the compaction - for example AutoSavingCache where we don't know the sstables at construction
      • forProgress

        public CompactionInfo forProgress​(long complete,
                                          long total)
        Returns:
        A copy of this CompactionInfo with updated progress.
      • getKeyspace

        public java.util.Optional<java.lang.String> getKeyspace()
      • getTable

        public java.util.Optional<java.lang.String> getTable()
      • getCompleted

        public long getCompleted()
      • getTotal

        public long getTotal()
      • getTaskId

        public TimeUUID getTaskId()
      • getSSTables

        public java.util.Set<SSTableReader> getSSTables()
      • getTargetDirectories

        public java.util.List<File> getTargetDirectories()
        Get the directories this compaction could possibly write to.
        Returns:
        the directories that we might write to, or empty list if we don't know the metadata (like for index summary redistribution), or null if we don't have any disk boundaries
      • targetDirectory

        public java.lang.String targetDirectory()
      • estimatedRemainingWriteBytes

        public long estimatedRemainingWriteBytes()
        Note that this estimate is based on the amount of data we have left to read - it assumes input size == output size for a compaction, which is not really true, but should most often provide a worst case remaining write size.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asMap

        public java.util.Map<java.lang.String,​java.lang.String> asMap()