Class SSTableLister

  • All Implemented Interfaces:
    SSTableCollector

    public class SSTableLister
    extends java.lang.Object
    implements SSTableCollector
    SSTableLister lists the directories containing SSTables. Internally, the listed SSTables are sorted by the insertion order of the directories, and by the first and end token of the SSTables. Therefore, it is expected that the SSTables are sorted when consuming from the lister.
    • Constructor Detail

      • SSTableLister

        public SSTableLister​(org.apache.cassandra.spark.data.QualifiedTableName qualifiedTableName,
                             org.apache.cassandra.bridge.CassandraBridge bridge)
    • Method Detail

      • includeDirectory

        public void includeDirectory​(java.nio.file.Path dir)
        Description copied from interface: SSTableCollector
        Include sstables under the directory
        Specified by:
        includeDirectory in interface SSTableCollector
        Parameters:
        dir - directory that contains sstables
      • includeSSTable

        public void includeSSTable​(java.util.List<java.nio.file.Path> sstableComponents)
        Description copied from interface: SSTableCollector
        Include the sstable components of an individual SSTable
        Specified by:
        includeSSTable in interface SSTableCollector
        Parameters:
        sstableComponents - sstable components
      • includeFileDigests

        public void includeFileDigests​(java.util.Map<java.nio.file.Path,​Digest> fileDigests)
        Description copied from interface: SSTableCollector
        Include the digests of the files
        Specified by:
        includeFileDigests in interface SSTableCollector
        Parameters:
        fileDigests - digest of the files
      • fileDigests

        public java.util.Map<java.nio.file.Path,​Digest> fileDigests​(java.util.Set<java.nio.file.Path> files)
        Description copied from interface: SSTableCollector
        Get the file digests of the input files
        Specified by:
        fileDigests in interface SSTableCollector
        Parameters:
        files - files to gather the digests
        Returns:
        file digests of the input files
      • totalSize

        public long totalSize()
        Specified by:
        totalSize in interface SSTableCollector
        Returns:
        total size of all sstables included
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface SSTableCollector
        Returns:
        true if the collector is empty; otherwise, false