-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
database,cql3: add STORAGE option to keyspaces
The STORAGE option is designed to hold a map of options used for customizing storage for given keyspace. The option is kept in a system_schema.scylla_keyspaces table. The option is only available if the whole cluster is aware of it - guarded by a cluster feature. Example of the table contents: ``` cassandra@cqlsh> select * from system_schema.scylla_keyspaces; keyspace_name | storage_options | storage_type ---------------+------------------------------------------------+-------------- ksx | {'bucket': '/tmp/xx', 'endpoint': 'localhost'} | S3 ```
- Loading branch information
Showing
12 changed files
with
253 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright (C) 2021-present ScyllaDB | ||
*/ | ||
|
||
/* | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <string> | ||
#include <map> | ||
#include <seastar/core/sstring.hh> | ||
|
||
namespace data_dictionary { | ||
|
||
struct storage_options { | ||
struct local { | ||
friend auto operator<=>(const local&, const local&) = default; | ||
}; | ||
struct s3 { | ||
sstring bucket; | ||
sstring endpoint; | ||
|
||
friend auto operator<=>(const s3&, const s3&) = default; | ||
}; | ||
using value_type = std::variant<local, s3>; | ||
value_type value = local{}; | ||
|
||
storage_options() = default; | ||
|
||
std::string_view type_string() const; | ||
std::map<sstring, sstring> to_map() const; | ||
|
||
bool can_update_to(const storage_options& new_options); | ||
|
||
static value_type from_map(std::string_view type, std::map<sstring, sstring> values); | ||
}; | ||
|
||
} // namespace data_dictionary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.