public interface GuardrailsMBean
cassandra.yaml
.
This is different to just exposing GuardrailsConfig
in that the methods here should be JMX-friendly.
For consistency, guardrails based on a simple numeric threshold should use the naming scheme
<whatIsGuarded>WarnThreshold
for soft limits and <whatIsGuarded>FailThreshold
for hard
ones, and if the value has a unit, that unit should be added at the end (for instance,
<whatIsGuarded>FailThresholdInKb
). For "boolean" guardrails that disable a feature, use
<whatIsGuardedEnabled
. Other type of guardrails can use appropriate suffixes but should start with
<whatIsGuarded>
.
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowFilteringEnabled()
Returns whether ALLOW FILTERING property is allowed.
|
java.lang.String |
getCollectionSizeFailThreshold() |
java.lang.String |
getCollectionSizeWarnThreshold() |
int |
getColumnsPerTableFailThreshold() |
int |
getColumnsPerTableWarnThreshold() |
boolean |
getCompactTablesEnabled()
Returns whether users can create new COMPACT STORAGE tables
|
java.lang.String |
getDataDiskUsageMaxDiskSize() |
int |
getDataDiskUsagePercentageFailThreshold() |
int |
getDataDiskUsagePercentageWarnThreshold() |
boolean |
getDropTruncateTableEnabled()
Returns whether users can TRUNCATE or DROP TABLE
|
int |
getFieldsPerUDTFailThreshold() |
int |
getFieldsPerUDTWarnThreshold() |
boolean |
getGroupByEnabled()
Returns whether GROUP BY queries are allowed.
|
int |
getInSelectCartesianProductFailThreshold() |
int |
getInSelectCartesianProductWarnThreshold() |
int |
getItemsPerCollectionFailThreshold() |
int |
getItemsPerCollectionWarnThreshold() |
int |
getKeyspacesFailThreshold() |
int |
getKeyspacesWarnThreshold() |
int |
getMaterializedViewsPerTableFailThreshold() |
int |
getMaterializedViewsPerTableWarnThreshold() |
int |
getMinimumReplicationFactorFailThreshold() |
int |
getMinimumReplicationFactorWarnThreshold() |
int |
getPageSizeFailThreshold() |
int |
getPageSizeWarnThreshold() |
int |
getPartitionKeysInSelectFailThreshold() |
int |
getPartitionKeysInSelectWarnThreshold() |
boolean |
getReadBeforeWriteListOperationsEnabled()
Returns whether list operations that require read before write are allowed.
|
java.util.Set<java.lang.String> |
getReadConsistencyLevelsDisallowed() |
java.lang.String |
getReadConsistencyLevelsDisallowedCSV() |
java.util.Set<java.lang.String> |
getReadConsistencyLevelsWarned() |
java.lang.String |
getReadConsistencyLevelsWarnedCSV() |
boolean |
getSecondaryIndexesEnabled() |
int |
getSecondaryIndexesPerTableFailThreshold() |
int |
getSecondaryIndexesPerTableWarnThreshold() |
java.util.Set<java.lang.String> |
getTablePropertiesDisallowed() |
java.lang.String |
getTablePropertiesDisallowedCSV() |
java.util.Set<java.lang.String> |
getTablePropertiesIgnored() |
java.lang.String |
getTablePropertiesIgnoredCSV() |
java.util.Set<java.lang.String> |
getTablePropertiesWarned() |
java.lang.String |
getTablePropertiesWarnedCSV() |
int |
getTablesFailThreshold() |
int |
getTablesWarnThreshold() |
boolean |
getUncompressedTablesEnabled()
Returns whether users can disable compression on tables
|
boolean |
getUserTimestampsEnabled()
Returns whether user-provided timestamps are allowed.
|
java.util.Set<java.lang.String> |
getWriteConsistencyLevelsDisallowed() |
java.lang.String |
getWriteConsistencyLevelsDisallowedCSV() |
java.util.Set<java.lang.String> |
getWriteConsistencyLevelsWarned() |
java.lang.String |
getWriteConsistencyLevelsWarnedCSV() |
void |
setAllowFilteringEnabled(boolean enabled)
Sets whether ALLOW FILTERING is allowed.
|
void |
setCollectionSizeThreshold(java.lang.String warnSize,
java.lang.String failSize) |
void |
setColumnsPerTableThreshold(int warn,
int fail) |
void |
setCompactTablesEnabled(boolean enabled)
Sets whether users can create new COMPACT STORAGE tables
|
void |
setDataDiskUsageMaxDiskSize(java.lang.String size) |
void |
setDataDiskUsagePercentageThreshold(int warn,
int fail) |
void |
setDropTruncateTableEnabled(boolean enabled)
Sets whether users can TRUNCATE or DROP TABLE
|
void |
setFieldsPerUDTThreshold(int warn,
int fail) |
void |
setGroupByEnabled(boolean enabled)
Sets whether GROUP BY queries are allowed.
|
void |
setInSelectCartesianProductThreshold(int warn,
int fail) |
void |
setItemsPerCollectionThreshold(int warn,
int fail) |
void |
setKeyspacesThreshold(int warn,
int fail) |
void |
setMaterializedViewsPerTableThreshold(int warn,
int fail) |
void |
setMinimumReplicationFactorThreshold(int warn,
int fail) |
void |
setPageSizeThreshold(int warn,
int fail) |
void |
setPartitionKeysInSelectThreshold(int warn,
int fail) |
void |
setReadBeforeWriteListOperationsEnabled(boolean enabled)
Sets whether list operations that require read before write are allowed.
|
void |
setReadConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels) |
void |
setReadConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels) |
void |
setReadConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels) |
void |
setReadConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels) |
void |
setSecondaryIndexesEnabled(boolean enabled)
Enables or disables the ability to create secondary indexes
|
void |
setSecondaryIndexesPerTableThreshold(int warn,
int fail) |
void |
setTablePropertiesDisallowed(java.util.Set<java.lang.String> properties) |
void |
setTablePropertiesDisallowedCSV(java.lang.String properties) |
void |
setTablePropertiesIgnored(java.util.Set<java.lang.String> properties) |
void |
setTablePropertiesIgnoredCSV(java.lang.String properties) |
void |
setTablePropertiesWarned(java.util.Set<java.lang.String> properties) |
void |
setTablePropertiesWarnedCSV(java.lang.String properties) |
void |
setTablesThreshold(int warn,
int fail) |
void |
setUncompressedTablesEnabled(boolean enabled)
Sets whether users can disable compression on tables
|
void |
setUserTimestampsEnabled(boolean enabled)
Sets whether user-provided timestamps are allowed.
|
void |
setWriteConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels) |
void |
setWriteConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels) |
void |
setWriteConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels) |
void |
setWriteConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels) |
int getKeyspacesWarnThreshold()
int getKeyspacesFailThreshold()
void setKeyspacesThreshold(int warn, int fail)
warn
- The threshold to warn when creating more user keyspaces than threshold. -1 means disabled.fail
- The threshold to prevent creating more user keyspaces than threshold. -1 means disabled.int getTablesWarnThreshold()
int getTablesFailThreshold()
void setTablesThreshold(int warn, int fail)
warn
- The threshold to warn when creating more tables than threshold. -1 means disabled.fail
- The threshold to prevent creating more tables than threshold. -1 means disabled.int getColumnsPerTableWarnThreshold()
int getColumnsPerTableFailThreshold()
void setColumnsPerTableThreshold(int warn, int fail)
warn
- The threshold to warn when having more columns per table than threshold. -1 means disabled.fail
- The threshold to prevent having more columns per table than threshold. -1 means disabled.int getSecondaryIndexesPerTableWarnThreshold()
int getSecondaryIndexesPerTableFailThreshold()
void setSecondaryIndexesPerTableThreshold(int warn, int fail)
warn
- The threshold to warn when creating more secondary indexes per table than threshold. -1 means disabled.fail
- The threshold to prevent creating more secondary indexes per table than threshold. -1 means disabled.boolean getSecondaryIndexesEnabled()
void setSecondaryIndexesEnabled(boolean enabled)
enabled
- int getMaterializedViewsPerTableWarnThreshold()
int getMaterializedViewsPerTableFailThreshold()
void setMaterializedViewsPerTableThreshold(int warn, int fail)
warn
- The threshold to warn when creating more materialized views per table than threshold. -1 means disabled.fail
- The threshold to prevent creating more materialized views per table than threshold. -1 means disabled.java.util.Set<java.lang.String> getTablePropertiesWarned()
java.lang.String getTablePropertiesWarnedCSV()
void setTablePropertiesWarned(java.util.Set<java.lang.String> properties)
properties
- properties that are warned about when creating or altering a table.void setTablePropertiesWarnedCSV(java.lang.String properties)
properties
- Comma-separated list of properties that are warned about when creating or altering a table.java.util.Set<java.lang.String> getTablePropertiesDisallowed()
java.lang.String getTablePropertiesDisallowedCSV()
void setTablePropertiesDisallowed(java.util.Set<java.lang.String> properties)
properties
- properties that are not allowed when creating or altering a table.void setTablePropertiesDisallowedCSV(java.lang.String properties)
properties
- Comma-separated list of properties that are not allowed when creating or altering a table.java.util.Set<java.lang.String> getTablePropertiesIgnored()
java.lang.String getTablePropertiesIgnoredCSV()
void setTablePropertiesIgnored(java.util.Set<java.lang.String> properties)
properties
- properties that are ignored when creating or altering a table.void setTablePropertiesIgnoredCSV(java.lang.String properties)
properties
- Comma-separated list of properties that are ignored when creating or altering a table.boolean getUserTimestampsEnabled()
true
if user-provided timestamps are allowed, false
otherwise.void setUserTimestampsEnabled(boolean enabled)
enabled
- true
if user-provided timestamps are allowed, false
otherwise.boolean getAllowFilteringEnabled()
true
if ALLOW FILTERING is allowed, false
otherwise.void setAllowFilteringEnabled(boolean enabled)
enabled
- true
if ALLOW FILTERING is allowed, false
otherwise.boolean getUncompressedTablesEnabled()
true
if users can disable compression on a table, false
otherwise.void setUncompressedTablesEnabled(boolean enabled)
enabled
- true
if users can disable compression on a table, false
otherwise.boolean getCompactTablesEnabled()
true
if allowed, false
otherwise.void setCompactTablesEnabled(boolean enabled)
enabled
- true
if allowed, false
otherwise.boolean getGroupByEnabled()
true
if allowed, false
otherwise.void setGroupByEnabled(boolean enabled)
enabled
- true
if allowed, false
otherwise.boolean getDropTruncateTableEnabled()
true
if allowed, false
otherwise.void setDropTruncateTableEnabled(boolean enabled)
int getPageSizeWarnThreshold()
int getPageSizeFailThreshold()
void setPageSizeThreshold(int warn, int fail)
warn
- The threshold to warn when the requested page size is greater than threshold. -1 means disabled.fail
- The threshold to prevent requesting pages with more elements than threshold. -1 means disabled.boolean getReadBeforeWriteListOperationsEnabled()
true
if list operations that require read before write are allowed, false
otherwise.void setReadBeforeWriteListOperationsEnabled(boolean enabled)
enabled
- true
if list operations that require read before write are allowed, false
otherwise.int getPartitionKeysInSelectWarnThreshold()
int getPartitionKeysInSelectFailThreshold()
void setPartitionKeysInSelectThreshold(int warn, int fail)
warn
- The threshold to warn when the number of partition keys in a select statement is greater than
threshold -1 means disabled.fail
- The threshold to prevent when the number of partition keys in a select statement is more than
threshold -1 means disabled.int getInSelectCartesianProductWarnThreshold()
int getInSelectCartesianProductFailThreshold()
void setInSelectCartesianProductThreshold(int warn, int fail)
warn
- The threshold to warn when an IN query creates a cartesian product with a size exceeding threshold.
-1 means disabled.fail
- The threshold to prevent IN queries creating a cartesian product with a size exceeding threshold.
-1 means disabled.java.util.Set<java.lang.String> getReadConsistencyLevelsWarned()
java.lang.String getReadConsistencyLevelsWarnedCSV()
void setReadConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels)
consistencyLevels
- consistency levels that are warned about when reading.void setReadConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
consistencyLevels
- Comma-separated list of consistency levels that are warned about when reading.java.util.Set<java.lang.String> getReadConsistencyLevelsDisallowed()
java.lang.String getReadConsistencyLevelsDisallowedCSV()
void setReadConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels)
consistencyLevels
- consistency levels that are not allowed when reading.void setReadConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)
consistencyLevels
- Comma-separated list of consistency levels that are not allowed when reading.java.util.Set<java.lang.String> getWriteConsistencyLevelsWarned()
java.lang.String getWriteConsistencyLevelsWarnedCSV()
void setWriteConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels)
consistencyLevels
- consistency levels that are warned about when writing.void setWriteConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
consistencyLevels
- Comma-separated list of consistency levels that are warned about when writing.java.util.Set<java.lang.String> getWriteConsistencyLevelsDisallowed()
java.lang.String getWriteConsistencyLevelsDisallowedCSV()
void setWriteConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels)
consistencyLevels
- consistency levels that are not allowed when writing.void setWriteConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)
consistencyLevels
- Comma-separated list of consistency levels that are not allowed when writing.@Nullable java.lang.String getCollectionSizeWarnThreshold()
10GiB
, 20MiB
, 30KiB
or 40B
. A null
value
means that the threshold is disabled.@Nullable java.lang.String getCollectionSizeFailThreshold()
10GiB
, 20MiB
, 30KiB
or 40B
. A null
value means that the
threshold is disabled.void setCollectionSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
warnSize
- The threshold to warn when encountering larger size of collection data than threshold, as a
string formatted as in, for example, 10GiB
, 20MiB
, 30KiB
or 40B
.
A null
value means disabled.failSize
- The threshold to prevent collections with larger data size than threshold, as a string formatted
as in, for example, 10GiB
, 20MiB
, 30KiB
or 40B
. A null
value means disabled.int getItemsPerCollectionWarnThreshold()
int getItemsPerCollectionFailThreshold()
void setItemsPerCollectionThreshold(int warn, int fail)
warn
- The threshold to warn when encountering more elements in a collection than threshold.fail
- The threshold to prevent collectiosn with more elements than threshold.int getFieldsPerUDTWarnThreshold()
int getFieldsPerUDTFailThreshold()
void setFieldsPerUDTThreshold(int warn, int fail)
warn
- The threshold to warn when creating a UDT with more fields than threshold. -1 means disabled.fail
- The threshold to prevent creating a UDT with more fields than threshold. -1 means disabled.int getDataDiskUsagePercentageWarnThreshold()
[1, 100]
, and -1 means disabled.int getDataDiskUsagePercentageFailThreshold()
[1, 100]
, and -1 means disabled.void setDataDiskUsagePercentageThreshold(int warn, int fail)
warn
- The threshold to warn when local disk usage percentage exceeds that threshold.
Allowed values are in the range [1, 100]
, and -1 means disabled.fail
- The threshold to fail when local disk usage percentage exceeds that threshold.
Allowed values are in the range [1, 100]
, and -1 means disabled.@Nullable java.lang.String getDataDiskUsageMaxDiskSize()
10GiB
, 20MiB
, 30KiB
or 40B
. A null
value means
disabled.void setDataDiskUsageMaxDiskSize(@Nullable java.lang.String size)
size
- The max disk size of the data directories when calculating disk usage thresholds, as a string
formatted as in, for example, 10GiB
, 20MiB
, 30KiB
or 40B
.
A null
value means disabled.int getMinimumReplicationFactorWarnThreshold()
int getMinimumReplicationFactorFailThreshold()
void setMinimumReplicationFactorThreshold(int warn, int fail)
warn
- the threshold to warn when the minimum replication factor is lesser than
threshold -1 means disabled.fail
- the threshold to fail when the minimum replication factor is lesser than
threshold -1 means disabled.Copyright © 2009-2022 The Apache Software Foundation