You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ekaterina Dimitrova (Jira)" <ji...@apache.org> on 2020/08/18 23:04:00 UTC
[jira] [Comment Edited] (CASSANDRA-15876) Accessors for
SystemProperties
[ https://issues.apache.org/jira/browse/CASSANDRA-15876?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180152#comment-17180152 ]
Ekaterina Dimitrova edited comment on CASSANDRA-15876 at 8/18/20, 11:03 PM:
----------------------------------------------------------------------------
I implemented the requested suggestions [here |https://github.com/ekaterinadimitrova2/cassandra/commit/a269216be895995de36de765e22cc0fd53b20115] (only I have to get rid of the sets in a new commit plus a couple of nits(like code format and correct
{code:java}
getBoolean() {code}
method to consider also user provided default values)) but on a further discussion with [~mck] today, we thought that it would be good to add also all options which
{code:java}
name.startsWith(Config.PROPERTY_PREFIX)
{code}
to
{code:java}
CassandraRelevantProperties
{code}
. Then when the virtual table is listed we can log a warning if there are options which
{code:java}
name.startsWith(Config.PROPERTY_PREFIX)
{code}
if they are not found in
{code:java}
CassandraRelevantProperties{code}
. Also, I think to add maybe a unit test which checks for options which are not in the enum and breaks if we find options,
{code:java}
name.startsWith(Config.PROPERTY_PREFIX){code}
which are not included in SystemPropertiesTable. [~dcapwell], WDYT? If you agree with that I will proceed adding the rest of the properties, warning and tests mentioned.
I think that will be a good way to enforce the C* developers to use this framework so we have everything at one place, easier to maintain.
was (Author: e.dimitrova):
I implemented the requested suggestions [here |https://github.com/ekaterinadimitrova2/cassandra/commit/a269216be895995de36de765e22cc0fd53b20115] (only I have to get rid of the sets in a new commit plus a couple of nits) but on a further discussion with [~mck] today, we thought that it would be good to add also all options which
{code:java}
name.startsWith(Config.PROPERTY_PREFIX)
{code}
to
{code:java}
CassandraRelevantProperties
{code}
. Then when the virtual table is listed we can log a warning if there are options which
{code:java}
name.startsWith(Config.PROPERTY_PREFIX)
{code}
if they are not found in
{code:java}
CassandraRelevantProperties{code}
. Also, I think to add maybe a unit test which checks for options which are not in the enum and breaks if we find options,
{code:java}
name.startsWith(Config.PROPERTY_PREFIX){code}
which are not included in SystemPropertiesTable. [~dcapwell], WDYT? If you agree with that I will proceed adding the rest of the properties, warning and tests mentioned.
I think that will be a good way to enforce the C* developers to use this framework so we have everything at one place, easier to maintain.
> Accessors for SystemProperties
> ------------------------------
>
> Key: CASSANDRA-15876
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15876
> Project: Cassandra
> Issue Type: Improvement
> Components: Local/Config
> Reporter: Ekaterina Dimitrova
> Assignee: Ekaterina Dimitrova
> Priority: Low
> Fix For: 4.0, 4.0-beta
>
>
> As part of CASSANDRA-15234, it was suggested a class of accessors for System properties to be created for better clarity and maintainability.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org