[
https://issues.apache.org/jira/browse/CASSANDRA-18534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17745103#comment-17745103
]
Branimir Lambov commented on CASSANDRA-18534:
---------------------------------------------
bq. what about just call the sstable format : BigFormat and BtiFormat ?
The short name of the format is defined by the class itself (see
CASSANDRA-18441). That ticket also permits the configuration of options for
each format / short name. In addition to that, for the objectives of this
ticket it is important to permit multiple configurations per format, and the
idea is to do this by permitting a {{<short-name>-<variation>}} moniker where
{{<short-name>}} is {{bti}} or {{big}} and {{<variation>}} is an arbitrary
alphanumeric.
To permit modification of individual options in the schema, it would be best to
support something like:
{code}
CREATE TABLE ... WITH sstable_format = { "type" : "bti-fast",
"bloom_filter_fp_chance": 0.001};
{code}
in addition to
{code}
CREATE TABLE ... WITH sstable_format = "bti-fast";
{code}
but I don't know if our parsing can support a field to be either a string or
map.
To solve potential problems with undefined formats and monikers in the yaml,
the code should treat {{ALTER/CREATE}} statements from the current node
differently from schema changes coming from other nodes. When the current node
initiates a change, missing monikers or any problems with the definition should
cause an error. On the other hand, if a schema change is propagated to this
node, the node should fall back to something it can support: if a moniker is
not defined in the yaml, the default config for the format should be used; if
the format cannot be found/instantiated, the default format should be used
(note that in this case any further options may be unknown and need to be
ignored). See CASSANDRA-18040 on how this can be implemented (the instantiation
in {{createTableParamsFromRow}} should use the fallbacks).
> Make sstable format configurable per table
> ------------------------------------------
>
> Key: CASSANDRA-18534
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18534
> Project: Cassandra
> Issue Type: Improvement
> Components: Cluster/Schema, Local/SSTable
> Reporter: Branimir Lambov
> Assignee: Maxwell Guo
> Priority: Normal
> Fix For: 5.x
>
>
> Some SSTable format settings need to be configurable per table for better
> efficiency. This includes:
> - {{row_index_granularity}}
> - {{bloom_filter_fp_chance}}
> - {{crc_check_chance}}
> - {{min/max_index_interval}}
> Some of these are currently configurable using direct properties of tables.
> Having them as format properties makes better sense and should also support
> specifying useable combinations of settings, e.g.
> {code:java}
> CREATE TABLE ... WITH sstable_format = "bti-fast";
> CREATE TABLE ... WITH sstable_format = "bti-small";
> {code}
> where {{bti-fast}} and {{bti-small}} can be defined in {{cassandra.yaml}}
> e.g. as
> {code:java}
> sstable.format.options:
> - bti-fast:
> row_index_granularity: 1kiB
> bloom_filter_fp_chance: 0.01
> - bti-small:
> row_index_granularity: 32kiB
> bloom_filter_fp_chance: 0.1
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]