Class CompactionInfo
java.lang.Object
org.apache.cassandra.db.compaction.CompactionInfo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enum -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompactionInfo(TableMetadata metadata, OperationType tasktype, long completed, long total, CompactionInfo.Unit unit, TimeUUID compactionId, Collection<? extends SSTableReader> sstables, String targetDirectory) CompactionInfo(TableMetadata metadata, OperationType tasktype, long completed, long total, TimeUUID compactionId, Collection<? extends SSTableReader> sstables) CompactionInfo(TableMetadata metadata, OperationType tasktype, long completed, long total, TimeUUID compactionId, Collection<SSTableReader> sstables, String targetDirectory) -
Method Summary
Modifier and TypeMethodDescriptionasMap()longNote 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.forProgress(long complete, long total) longgetTable()Get the directories this compaction could possibly write to.longgetTotal()getUnit()toString()static CompactionInfowithoutSSTables(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 constructionstatic CompactionInfowithoutSSTables(TableMetadata metadata, OperationType tasktype, long completed, long total, CompactionInfo.Unit unit, TimeUUID compactionId, 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
-
Field Details
-
ID
- See Also:
-
KEYSPACE
- See Also:
-
COLUMNFAMILY
- See Also:
-
COMPLETED
- See Also:
-
TOTAL
- See Also:
-
TASK_TYPE
- See Also:
-
UNIT
- See Also:
-
COMPACTION_ID
- See Also:
-
SSTABLES
- See Also:
-
TARGET_DIRECTORY
- See Also:
-
-
Constructor Details
-
CompactionInfo
public CompactionInfo(TableMetadata metadata, OperationType tasktype, long completed, long total, CompactionInfo.Unit unit, TimeUUID compactionId, Collection<? extends SSTableReader> sstables, String targetDirectory) -
CompactionInfo
public CompactionInfo(TableMetadata metadata, OperationType tasktype, long completed, long total, TimeUUID compactionId, Collection<SSTableReader> sstables, String targetDirectory) -
CompactionInfo
public CompactionInfo(TableMetadata metadata, OperationType tasktype, long completed, long total, TimeUUID compactionId, Collection<? extends SSTableReader> sstables)
-
-
Method Details
-
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, 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
- Returns:
- A copy of this CompactionInfo with updated progress.
-
getKeyspace
-
getTable
-
getTableMetadata
-
getCompleted
public long getCompleted() -
getTotal
public long getTotal() -
getTaskType
-
getTaskId
-
getUnit
-
getSSTables
-
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
-
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
-
asMap
-