Class SSTablesBundler
- java.lang.Object
-
- org.apache.cassandra.spark.bulkwriter.cloudstorage.SSTablesBundler
-
- All Implemented Interfaces:
java.util.Iterator<Bundle>
public class SSTablesBundler extends java.lang.Object implements java.util.Iterator<Bundle>
SSTablesBundlerbundles SSTables in the output directory provided bySSTableWriter. With output fromSSTableLister, we get sorted list ofSSTableCollector.SSTableFilesAndRange. According to sorted order, we move all component files related to a SSTable into bundle folder. When a bundle's size exceeds configured, a new bundle is created and SSTable components are moved into new bundle folder.
When a bundle is being closed,Bundlegenerated for that bundle gets written to manifest.json file and added to bundle folder. The entire folder is then zipped and added to zipped_bundles folder
Under output directory ofSSTableWriter, sample folders created look like bundle0, bundle1, bundle2, zipped_bundles
-
-
Constructor Summary
Constructors Constructor Description SSTablesBundler(java.nio.file.Path bundleStagingDir, SSTableCollector collector, BundleNameGenerator bundleNameGenerator, long maxSizePerBundleInBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupBundle(java.lang.String sessionID)voidfinish()booleanhasNext()voidincludeDirectory(java.nio.file.Path dir)voidincludeFileDigests(java.util.Map<java.nio.file.Path,Digest> fileDigests)voidincludeSSTable(java.util.List<java.nio.file.Path> sstableComponents)Bundlenext()
-
-
-
Constructor Detail
-
SSTablesBundler
public SSTablesBundler(java.nio.file.Path bundleStagingDir, SSTableCollector collector, BundleNameGenerator bundleNameGenerator, long maxSizePerBundleInBytes)
-
-
Method Detail
-
hasNext
public boolean hasNext()
- Specified by:
hasNextin interfacejava.util.Iterator<Bundle>
-
includeDirectory
public void includeDirectory(java.nio.file.Path dir)
-
includeSSTable
public void includeSSTable(java.util.List<java.nio.file.Path> sstableComponents)
-
includeFileDigests
public void includeFileDigests(java.util.Map<java.nio.file.Path,Digest> fileDigests)
-
finish
public void finish()
-
cleanupBundle
public void cleanupBundle(java.lang.String sessionID)
-
-