[
https://issues.apache.org/jira/browse/CASSANDRA-20827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18021323#comment-18021323
]
Paulo Motta commented on CASSANDRA-20827:
-----------------------------------------
Looks good! A few minor nits in the trunk patch, feel free to fix before commit
if tests look good:
1) Update {{testComplexSettingsFormatProperty}} to not set the property that is
enabled by default and add a variation of {{testComplexSettingsFormatProperty}}
with the property set to false to ensure the old behavior is retained
2) Add NEWS.txt upgrading entry to trunk: settings virtual table output changed
to json, set property to false to disable
3) nit update comment "Controls output format for Map-type settings in
system_views.settings table" to "Controls output format for Collection-type
settings in system_views.settings table"
I noticed that memtable configurations output is a bit different from old to
new format because old format emit nulls but not a big deal, I think we can
live with that.
{noformat}
cqlsh> select * from system_views.settings WHERE name =
'memtable.configurations'; name | value
-------------------------+-------------------------------------------------------------------
memtable.configurations | {default=skiplist+, skiplist=SkipListMemtable,
trie=TrieMemtable}(1 rows){noformat}
{noformat}
cqlsh> select * from system_views.settings WHERE name =
'memtable.configurations'; name | value
-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
memtable.configurations |
{"default":{"class_name":null,"parameters":null,"inherits":"skiplist"},"skiplist":{"class_name":"SkipListMemtable","parameters":null,"inherits":null},"trie":{"class_name":"TrieMemtable","parameters":null,"inherits":null}}
{noformat}
> Represent complex settings as JSON on system_views.settings table
> -----------------------------------------------------------------
>
> Key: CASSANDRA-20827
> URL: https://issues.apache.org/jira/browse/CASSANDRA-20827
> Project: Apache Cassandra
> Issue Type: Improvement
> Components: Local/Config
> Reporter: Paulo Motta
> Assignee: Marko Tsymbaliuk
> Priority: Normal
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Complex configuration (maps/sets/lists) are represented as
> Collections.toString() on {{system.settings}} virtual table:
> {code:java}
> cqlsh> select * from system_views.settings where name='seed_provider' ;
> name | value
> ------+-------
> (0 rows)
> cqlsh> select * from system_views.settings where
> name='seed_provider.parameters' ;
> name | value
> --------------------------+------------------------
> seed_provider.parameters | {seeds=127.0.0.1:7000}
> {code}
> While this is fine for human consumption, it's not ideal for programmatic
> access, since it requires custom parsing.
> This ticket is to add ability of representing complex types as JSON on
> {{system.settings}} and potentially making it default in trunk, so the above
> would return:
> {code:java}
> cqlsh> select * from system_views.settings where name='seed_provider' ;
> name | value
> ------+-------
> (0 rows)
> cqlsh> select * from system_views.settings where
> name='seed_provider.parameters' ;
> name | value
> --------------------------+------------------------
> seed_provider.parameters | {"seeds": "127.0.0.1:7000"}{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]