Class SSTableHeaderFix.Builder

  • Enclosing class:
    SSTableHeaderFix

    public static class SSTableHeaderFix.Builder
    extends java.lang.Object
    Builder to configure and construct an instance of SSTableHeaderFix. Default settings:
    • log via the slf4j logger of SSTableHeaderFix
    • no dry-run (i.e. validate and fix, if no serious errors are detected)
    • no schema callback
    If neither withDescriptor(Descriptor) nor withPath(Path) are used, all "live" sstables in all data directories will be scanned.
    • Method Detail

      • dryRun

        public SSTableHeaderFix.Builder dryRun()
        Only validate and prepare fix, but do not write updated (fixed) sstable serialization-headers.
      • withPath

        public SSTableHeaderFix.Builder withPath​(java.nio.file.Path path)
        Manually provide an individual sstable or directory containing sstables. Implementation note: procesing "live" sstables in their data directories as well as sstables in snapshots and backups in the data directories works. But processing sstables that reside somewhere else (i.e. verifying sstables before import) requires the use of withDescriptor(Descriptor).
      • schemaCallback

        public SSTableHeaderFix.Builder schemaCallback​(java.util.function.Supplier<java.util.function.Function<Descriptor,​TableMetadata>> schemaCallback)
        Schema callback to retrieve the schema of a table. Production code always delegates to the live schema (Schema.instance). Unit tests use this method to feed a custom schema.