/* * Copyright (C) 2020-present ScyllaDB * */ /* * SPDX-License-Identifier: AGPL-3.0-or-later */ #pragma once #include #include #include #include #include "sstables/version.hh" #include "sstables/component_type.hh" #include "sstables/shareable_components.hh" #include namespace sstables { struct entry_descriptor { sstring sstdir; sstring ks; sstring cf; int64_t generation; sstable_version_types version; sstable_format_types format; component_type component; static entry_descriptor make_descriptor(sstring sstdir, sstring fname); // Use the given ks and cf and don't attempt to extract it from the dir path. // This allows loading sstables from any path, but the filename still has to be valid. static entry_descriptor make_descriptor(sstring sstdir, sstring fname, sstring ks, sstring cf); entry_descriptor(sstring sstdir, sstring ks, sstring cf, int64_t generation, sstable_version_types version, sstable_format_types format, component_type component) : sstdir(sstdir), ks(ks), cf(cf), generation(generation), version(version), format(format), component(component) {} }; // contains data for loading a sstable using components shared by a single shard; // can be moved across shards struct foreign_sstable_open_info { foreign_ptr> components; std::vector owners; seastar::file_handle data; seastar::file_handle index; uint64_t generation; sstable_version_types version; sstable_format_types format; uint64_t uncompressed_data_size; }; }