Class Guardrails
- java.lang.Object
-
- org.apache.cassandra.db.guardrails.Guardrails
-
- All Implemented Interfaces:
GuardrailsMBean
public final class Guardrails extends java.lang.Object implements GuardrailsMBean
Entry point for Guardrails, storing the defined guardrails and providing a few global methods over them.
-
-
Field Summary
Fields Modifier and Type Field Description static EnableFlag
allowFilteringEnabled
Guardrail disabling ALLOW FILTERING statement within a querystatic EnableFlag
alterTableEnabled
Guardrail disabling ALTER TABLE column mutation access.static MaxThreshold
collectionSize
Guardrail on the size of a collection.static MaxThreshold
columnsPerTable
Guardrail on the number of columns per table.static MaxThreshold
columnValueSize
Guardrail on the size of a collection.static EnableFlag
compactTablesEnabled
Guardrail disabling the creation of new COMPACT STORAGE tablesstatic GuardrailsConfigProvider
CONFIG_PROVIDER
static EnableFlag
createSecondaryIndexesEnabled
Guardrail disabling user's ability to create secondary indexesstatic EnableFlag
dropKeyspaceEnabled
Guardrail disabling DROP KEYSPACE behaviorstatic EnableFlag
dropTruncateTableEnabled
Guardrail disabling DROP / TRUNCATE TABLE behaviorstatic MaxThreshold
fieldsPerUDT
Guardrail on the number of fields on each UDT.static EnableFlag
groupByEnabled
static MaxThreshold
inSelectCartesianProduct
Guardrail on the number of restrictions created by a cartesian product of a CQL'sIN
query.static Guardrails
instance
static EnableFlag
intersectFilteringQueryEnabled
Guardrail to warn on or fail filtering queries that contain intersections on mutable columns at consistency levels that require coordinator reconciliation.static MaxThreshold
itemsPerCollection
Guardrail on the number of items of a collection.static MaxThreshold
keyspaces
Guardrail on the total number of user keyspaces.static PercentageThreshold
localDataDiskUsage
Guardrail on the data disk usage on the local node, used by a periodic task to calculate and propagate that status.static MaxThreshold
materializedViewsPerTable
Guardrail on the number of materialized views per table.static MaxThreshold
maximumAllowableTimestamp
static MaxThreshold
maximumReplicationFactor
Guardrail on the maximum replication factor.static java.lang.String
MBEAN_NAME
static MinThreshold
minimumAllowableTimestamp
static MinThreshold
minimumReplicationFactor
Guardrail on the minimum replication factor.static EnableFlag
nonPartitionRestrictedIndexQueryEnabled
static MaxThreshold
pageSize
Guardrail on the number of elements returned within page.static MaxThreshold
partitionKeysInSelect
Guardrail on the number of partition keys in the IN clause.static MaxThreshold
partitionSize
Guardrail on the size of a partition.static MaxThreshold
partitionTombstones
Guardrail on the number of rows of a partition.static EnableFlag
readBeforeWriteListOperationsEnabled
Guardrail disabling operations on lists that require read before write.static Values<ConsistencyLevel>
readConsistencyLevels
Guardrail on read consistency levels.static Predicates<InetAddressAndPort>
replicaDiskUsage
Guardrail on the data disk usage on replicas, used at write time to verify the status of the involved replicas.static MaxThreshold
saiFrozenTermSize
Guardrail on the size of a frozen term written to SAI index.static MaxThreshold
saiSSTableIndexesPerQuery
static MaxThreshold
saiStringTermSize
Guardrail on the size of a string term written to SAI index.static MaxThreshold
saiVectorTermSize
Guardrail on the size of a vector term written to SAI index.static MaxThreshold
secondaryIndexesPerTable
static EnableFlag
simpleStrategyEnabled
Guardrail disabling setting SimpleStrategy via keyspace creation or alterationstatic Values<java.lang.String>
tableProperties
Guardrail warning about, ignoring or rejecting the usage of certain table properties.static MaxThreshold
tables
Guardrail on the total number of tables on user keyspaces.static EnableFlag
uncompressedTablesEnabled
Guardrail disabling user's ability to turn off compressionstatic EnableFlag
userTimestampsEnabled
Guardrail disabling user-provided timestamps.static MaxThreshold
vectorDimensions
Guardrail on the number of dimensions of vector columns.static EnableFlag
vectorTypeEnabled
Guardrail on the usage of vector type.static Values<ConsistencyLevel>
writeConsistencyLevels
Guardrail on write consistency levels.static EnableFlag
zeroTTLOnTWCSEnabled
Guardrail to warn or fail a CREATE or ALTER TABLE statement when default_time_to_live is set to 0 and the table is using TimeWindowCompactionStrategy compaction or a subclass of it.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getAllowFilteringEnabled()
Returns whether ALLOW FILTERING property is allowed.boolean
getAlterTableEnabled()
Gets whether users can use the ALTER TABLE statement to change columnsjava.lang.String
getCollectionSizeFailThreshold()
java.lang.String
getCollectionSizeWarnThreshold()
int
getColumnsPerTableFailThreshold()
int
getColumnsPerTableWarnThreshold()
java.lang.String
getColumnValueSizeFailThreshold()
java.lang.String
getColumnValueSizeWarnThreshold()
boolean
getCompactTablesEnabled()
Returns whether users can create new COMPACT STORAGE tablesjava.lang.String
getDataDiskUsageMaxDiskSize()
int
getDataDiskUsagePercentageFailThreshold()
int
getDataDiskUsagePercentageWarnThreshold()
boolean
getDropKeyspaceEnabled()
Returns whether users can DROP a keyspaceboolean
getDropTruncateTableEnabled()
Returns whether users can TRUNCATE or DROP TABLEint
getFieldsPerUDTFailThreshold()
int
getFieldsPerUDTWarnThreshold()
boolean
getGroupByEnabled()
Returns whether GROUP BY queries are allowed.int
getInSelectCartesianProductFailThreshold()
int
getInSelectCartesianProductWarnThreshold()
boolean
getIntersectFilteringQueryEnabled()
boolean
getIntersectFilteringQueryWarned()
int
getItemsPerCollectionFailThreshold()
int
getItemsPerCollectionWarnThreshold()
int
getKeyspacesFailThreshold()
int
getKeyspacesWarnThreshold()
int
getMaterializedViewsPerTableFailThreshold()
int
getMaterializedViewsPerTableWarnThreshold()
int
getMaximumReplicationFactorFailThreshold()
int
getMaximumReplicationFactorWarnThreshold()
java.lang.String
getMaximumTimestampFailThreshold()
java.lang.String
getMaximumTimestampWarnThreshold()
int
getMinimumReplicationFactorFailThreshold()
int
getMinimumReplicationFactorWarnThreshold()
java.lang.String
getMinimumTimestampFailThreshold()
java.lang.String
getMinimumTimestampWarnThreshold()
boolean
getNonPartitionRestrictedQueryEnabled()
Returns whether it is possible to execute a query against secondary indexes without specifying any partition key restrictions.int
getPageSizeFailThreshold()
int
getPageSizeWarnThreshold()
int
getPartitionKeysInSelectFailThreshold()
int
getPartitionKeysInSelectWarnThreshold()
java.lang.String
getPartitionSizeFailThreshold()
java.lang.String
getPartitionSizeWarnThreshold()
long
getPartitionTombstonesFailThreshold()
long
getPartitionTombstonesWarnThreshold()
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()
java.lang.String
getSaiFrozenTermSizeFailThreshold()
java.lang.String
getSaiFrozenTermSizeWarnThreshold()
int
getSaiSSTableIndexesPerQueryFailThreshold()
int
getSaiSSTableIndexesPerQueryWarnThreshold()
java.lang.String
getSaiStringTermSizeFailThreshold()
java.lang.String
getSaiStringTermSizeWarnThreshold()
java.lang.String
getSaiVectorTermSizeFailThreshold()
java.lang.String
getSaiVectorTermSizeWarnThreshold()
boolean
getSecondaryIndexesEnabled()
int
getSecondaryIndexesPerTableFailThreshold()
int
getSecondaryIndexesPerTableWarnThreshold()
boolean
getSimpleStrategyEnabled()
Returns whether SimpleStrategy is allowed on keyspace creation or alterationjava.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 tablesboolean
getUserTimestampsEnabled()
Returns whether user-provided timestamps are allowed.int
getVectorDimensionsFailThreshold()
int
getVectorDimensionsWarnThreshold()
boolean
getVectorTypeEnabled()
java.util.Set<java.lang.String>
getWriteConsistencyLevelsDisallowed()
java.lang.String
getWriteConsistencyLevelsDisallowedCSV()
java.util.Set<java.lang.String>
getWriteConsistencyLevelsWarned()
java.lang.String
getWriteConsistencyLevelsWarnedCSV()
boolean
getZeroTTLOnTWCSEnabled()
Returns whether it is allowed to create or alter table to use 0 default TTL with TimeWindowCompactionStrategy.boolean
getZeroTTLOnTWCSWarned()
Returns whether warnings will be emitted when usage of 0 default TTL on a table with TimeWindowCompactionStrategy is detected.void
setAllowFilteringEnabled(boolean enabled)
Sets whether ALLOW FILTERING is allowed.void
setAlterTableEnabled(boolean enabled)
Sets whether users can use the ALTER TABLE statement to change columnsvoid
setCollectionSizeThreshold(java.lang.String warnSize, java.lang.String failSize)
void
setColumnsPerTableThreshold(int warn, int fail)
void
setColumnValueSizeThreshold(java.lang.String warnSize, java.lang.String failSize)
void
setCompactTablesEnabled(boolean enabled)
Sets whether users can create new COMPACT STORAGE tablesvoid
setDataDiskUsageMaxDiskSize(java.lang.String size)
void
setDataDiskUsagePercentageThreshold(int warn, int fail)
void
setDropKeyspaceEnabled(boolean enabled)
Sets whether users can DROP a keyspacevoid
setDropTruncateTableEnabled(boolean enabled)
Sets whether users can TRUNCATE or DROP TABLEvoid
setFieldsPerUDTThreshold(int warn, int fail)
void
setGroupByEnabled(boolean enabled)
Sets whether GROUP BY queries are allowed.void
setInSelectCartesianProductThreshold(int warn, int fail)
void
setIntersectFilteringQueryEnabled(boolean value)
void
setIntersectFilteringQueryWarned(boolean value)
void
setItemsPerCollectionThreshold(int warn, int fail)
void
setKeyspacesThreshold(int warn, int fail)
void
setMaterializedViewsPerTableThreshold(int warn, int fail)
void
setMaximumReplicationFactorThreshold(int warn, int fail)
void
setMaximumTimestampThreshold(java.lang.String warnSeconds, java.lang.String failSeconds)
Sets the warning upper bound for user supplied timestamps.void
setMinimumReplicationFactorThreshold(int warn, int fail)
void
setMinimumTimestampThreshold(java.lang.String warnSeconds, java.lang.String failSeconds)
Sets the warning lower bound for user supplied timestamps.void
setNonPartitionRestrictedQueryEnabled(boolean enabled)
Sets whether it is possible to execute a query against indexes (secondary or SAI) without specifying any partition key restrictions.void
setPageSizeThreshold(int warn, int fail)
void
setPartitionKeysInSelectThreshold(int warn, int fail)
void
setPartitionSizeThreshold(java.lang.String warnSize, java.lang.String failSize)
void
setPartitionTombstonesThreshold(long warn, long 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
setSaiFrozenTermSizeThreshold(java.lang.String warnSize, java.lang.String failSize)
void
setSaiSSTableIndexesPerQueryThreshold(int warn, int fail)
Sets warning and failure thresholds for the number of SAI SSTable indexes searched by a queryvoid
setSaiStringTermSizeThreshold(java.lang.String warnSize, java.lang.String failSize)
void
setSaiVectorTermSizeThreshold(java.lang.String warnSize, java.lang.String failSize)
void
setSecondaryIndexesEnabled(boolean enabled)
Enables or disables the ability to create secondary indexesvoid
setSecondaryIndexesPerTableThreshold(int warn, int fail)
void
setSimpleStrategyEnabled(boolean enabled)
Sets whether SimpleStrategy is allowed on keyspace creation or alterationvoid
setTablePropertiesDisallowed(java.lang.String... properties)
void
setTablePropertiesDisallowed(java.util.Set<java.lang.String> properties)
void
setTablePropertiesDisallowedCSV(java.lang.String properties)
void
setTablePropertiesIgnored(java.lang.String... properties)
void
setTablePropertiesIgnored(java.util.Set<java.lang.String> properties)
void
setTablePropertiesIgnoredCSV(java.lang.String properties)
void
setTablePropertiesWarned(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 tablesvoid
setUserTimestampsEnabled(boolean enabled)
Sets whether user-provided timestamps are allowed.void
setVectorDimensionsThreshold(int warn, int fail)
void
setVectorTypeEnabled(boolean enabled)
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)
void
setZeroTTLOnTWCSEnabled(boolean value)
Sets whether users can use 0 default TTL on a table with TimeWindowCompactionStrategy.void
setZeroTTLOnTWCSWarned(boolean value)
Sets whether warnings will be emitted when usage of 0 default TTL on a table with TimeWindowCompactionStrategy is detected.
-
-
-
Field Detail
-
MBEAN_NAME
public static final java.lang.String MBEAN_NAME
- See Also:
- Constant Field Values
-
CONFIG_PROVIDER
public static final GuardrailsConfigProvider CONFIG_PROVIDER
-
instance
public static final Guardrails instance
-
keyspaces
public static final MaxThreshold keyspaces
Guardrail on the total number of user keyspaces.
-
tables
public static final MaxThreshold tables
Guardrail on the total number of tables on user keyspaces.
-
columnsPerTable
public static final MaxThreshold columnsPerTable
Guardrail on the number of columns per table.
-
secondaryIndexesPerTable
public static final MaxThreshold secondaryIndexesPerTable
-
createSecondaryIndexesEnabled
public static final EnableFlag createSecondaryIndexesEnabled
Guardrail disabling user's ability to create secondary indexes
-
materializedViewsPerTable
public static final MaxThreshold materializedViewsPerTable
Guardrail on the number of materialized views per table.
-
tableProperties
public static final Values<java.lang.String> tableProperties
Guardrail warning about, ignoring or rejecting the usage of certain table properties.
-
userTimestampsEnabled
public static final EnableFlag userTimestampsEnabled
Guardrail disabling user-provided timestamps.
-
groupByEnabled
public static final EnableFlag groupByEnabled
-
alterTableEnabled
public static final EnableFlag alterTableEnabled
Guardrail disabling ALTER TABLE column mutation access.
-
dropTruncateTableEnabled
public static final EnableFlag dropTruncateTableEnabled
Guardrail disabling DROP / TRUNCATE TABLE behavior
-
dropKeyspaceEnabled
public static final EnableFlag dropKeyspaceEnabled
Guardrail disabling DROP KEYSPACE behavior
-
uncompressedTablesEnabled
public static final EnableFlag uncompressedTablesEnabled
Guardrail disabling user's ability to turn off compression
-
compactTablesEnabled
public static final EnableFlag compactTablesEnabled
Guardrail disabling the creation of new COMPACT STORAGE tables
-
zeroTTLOnTWCSEnabled
public static final EnableFlag zeroTTLOnTWCSEnabled
Guardrail to warn or fail a CREATE or ALTER TABLE statement when default_time_to_live is set to 0 and the table is using TimeWindowCompactionStrategy compaction or a subclass of it.
-
intersectFilteringQueryEnabled
public static final EnableFlag intersectFilteringQueryEnabled
Guardrail to warn on or fail filtering queries that contain intersections on mutable columns at consistency levels that require coordinator reconciliation.- See Also:
- CASSANDRA-19007
-
pageSize
public static final MaxThreshold pageSize
Guardrail on the number of elements returned within page.
-
partitionKeysInSelect
public static final MaxThreshold partitionKeysInSelect
Guardrail on the number of partition keys in the IN clause.
-
readBeforeWriteListOperationsEnabled
public static final EnableFlag readBeforeWriteListOperationsEnabled
Guardrail disabling operations on lists that require read before write.
-
allowFilteringEnabled
public static final EnableFlag allowFilteringEnabled
Guardrail disabling ALLOW FILTERING statement within a query
-
simpleStrategyEnabled
public static final EnableFlag simpleStrategyEnabled
Guardrail disabling setting SimpleStrategy via keyspace creation or alteration
-
inSelectCartesianProduct
public static final MaxThreshold inSelectCartesianProduct
Guardrail on the number of restrictions created by a cartesian product of a CQL'sIN
query.
-
readConsistencyLevels
public static final Values<ConsistencyLevel> readConsistencyLevels
Guardrail on read consistency levels.
-
writeConsistencyLevels
public static final Values<ConsistencyLevel> writeConsistencyLevels
Guardrail on write consistency levels.
-
partitionSize
public static final MaxThreshold partitionSize
Guardrail on the size of a partition.
-
partitionTombstones
public static final MaxThreshold partitionTombstones
Guardrail on the number of rows of a partition.
-
columnValueSize
public static final MaxThreshold columnValueSize
Guardrail on the size of a collection.
-
collectionSize
public static final MaxThreshold collectionSize
Guardrail on the size of a collection.
-
itemsPerCollection
public static final MaxThreshold itemsPerCollection
Guardrail on the number of items of a collection.
-
fieldsPerUDT
public static final MaxThreshold fieldsPerUDT
Guardrail on the number of fields on each UDT.
-
vectorTypeEnabled
public static final EnableFlag vectorTypeEnabled
Guardrail on the usage of vector type. This may be useful when running clusters that have diverse clients, where some do not support the vector type. Clients that do not support vector may fail to establish sessions or fail to read results containing vector columns.
-
vectorDimensions
public static final MaxThreshold vectorDimensions
Guardrail on the number of dimensions of vector columns.
-
localDataDiskUsage
public static final PercentageThreshold localDataDiskUsage
Guardrail on the data disk usage on the local node, used by a periodic task to calculate and propagate that status. SeeDiskUsageMonitor
andDiskUsageBroadcaster
.
-
replicaDiskUsage
public static final Predicates<InetAddressAndPort> replicaDiskUsage
Guardrail on the data disk usage on replicas, used at write time to verify the status of the involved replicas. SeeDiskUsageMonitor
andDiskUsageBroadcaster
.
-
minimumReplicationFactor
public static final MinThreshold minimumReplicationFactor
Guardrail on the minimum replication factor.
-
maximumReplicationFactor
public static final MaxThreshold maximumReplicationFactor
Guardrail on the maximum replication factor.
-
maximumAllowableTimestamp
public static final MaxThreshold maximumAllowableTimestamp
-
minimumAllowableTimestamp
public static final MinThreshold minimumAllowableTimestamp
-
saiSSTableIndexesPerQuery
public static final MaxThreshold saiSSTableIndexesPerQuery
-
saiStringTermSize
public static final MaxThreshold saiStringTermSize
Guardrail on the size of a string term written to SAI index.
-
saiFrozenTermSize
public static final MaxThreshold saiFrozenTermSize
Guardrail on the size of a frozen term written to SAI index.
-
saiVectorTermSize
public static final MaxThreshold saiVectorTermSize
Guardrail on the size of a vector term written to SAI index.
-
nonPartitionRestrictedIndexQueryEnabled
public static final EnableFlag nonPartitionRestrictedIndexQueryEnabled
-
-
Method Detail
-
getKeyspacesWarnThreshold
public int getKeyspacesWarnThreshold()
- Specified by:
getKeyspacesWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when creating more user keyspaces than threshold. -1 means disabled.
-
getKeyspacesFailThreshold
public int getKeyspacesFailThreshold()
- Specified by:
getKeyspacesFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent creating more user keyspaces than threshold. -1 means disabled.
-
setKeyspacesThreshold
public void setKeyspacesThreshold(int warn, int fail)
- Specified by:
setKeyspacesThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getTablesWarnThreshold
public int getTablesWarnThreshold()
- Specified by:
getTablesWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when creating more tables than threshold. -1 means disabled.
-
getTablesFailThreshold
public int getTablesFailThreshold()
- Specified by:
getTablesFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent creating more tables than threshold. -1 means disabled.
-
setTablesThreshold
public void setTablesThreshold(int warn, int fail)
- Specified by:
setTablesThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getColumnsPerTableWarnThreshold
public int getColumnsPerTableWarnThreshold()
- Specified by:
getColumnsPerTableWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when having more columns per table than threshold. -1 means disabled.
-
getColumnsPerTableFailThreshold
public int getColumnsPerTableFailThreshold()
- Specified by:
getColumnsPerTableFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent having more columns per table than threshold. -1 means disabled.
-
setColumnsPerTableThreshold
public void setColumnsPerTableThreshold(int warn, int fail)
- Specified by:
setColumnsPerTableThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getSecondaryIndexesPerTableWarnThreshold
public int getSecondaryIndexesPerTableWarnThreshold()
- Specified by:
getSecondaryIndexesPerTableWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when creating more secondary indexes per table than threshold. -1 means disabled.
-
getSecondaryIndexesPerTableFailThreshold
public int getSecondaryIndexesPerTableFailThreshold()
- Specified by:
getSecondaryIndexesPerTableFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent creating more secondary indexes per table than threshold. -1 means disabled.
-
setSecondaryIndexesPerTableThreshold
public void setSecondaryIndexesPerTableThreshold(int warn, int fail)
- Specified by:
setSecondaryIndexesPerTableThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getSecondaryIndexesEnabled
public boolean getSecondaryIndexesEnabled()
- Specified by:
getSecondaryIndexesEnabled
in interfaceGuardrailsMBean
- Returns:
- Whether secondary index creation is active or not on the node
-
setSecondaryIndexesEnabled
public void setSecondaryIndexesEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Enables or disables the ability to create secondary indexes- Specified by:
setSecondaryIndexesEnabled
in interfaceGuardrailsMBean
-
getMaterializedViewsPerTableWarnThreshold
public int getMaterializedViewsPerTableWarnThreshold()
- Specified by:
getMaterializedViewsPerTableWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when creating more materialized views per table than threshold. -1 means disabled.
-
getMaterializedViewsPerTableFailThreshold
public int getMaterializedViewsPerTableFailThreshold()
- Specified by:
getMaterializedViewsPerTableFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent creating more materialized views per table than threshold. -1 means disabled.
-
setMaterializedViewsPerTableThreshold
public void setMaterializedViewsPerTableThreshold(int warn, int fail)
- Specified by:
setMaterializedViewsPerTableThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getTablePropertiesWarned
public java.util.Set<java.lang.String> getTablePropertiesWarned()
- Specified by:
getTablePropertiesWarned
in interfaceGuardrailsMBean
- Returns:
- properties that are warned about when creating or altering a table.
-
getTablePropertiesWarnedCSV
public java.lang.String getTablePropertiesWarnedCSV()
- Specified by:
getTablePropertiesWarnedCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of properties that are warned about when creating or altering a table.
-
setTablePropertiesWarned
public void setTablePropertiesWarned(java.lang.String... properties)
-
setTablePropertiesWarned
public void setTablePropertiesWarned(java.util.Set<java.lang.String> properties)
- Specified by:
setTablePropertiesWarned
in interfaceGuardrailsMBean
- Parameters:
properties
- properties that are warned about when creating or altering a table.
-
setTablePropertiesWarnedCSV
public void setTablePropertiesWarnedCSV(java.lang.String properties)
- Specified by:
setTablePropertiesWarnedCSV
in interfaceGuardrailsMBean
- Parameters:
properties
- Comma-separated list of properties that are warned about when creating or altering a table.
-
getTablePropertiesDisallowed
public java.util.Set<java.lang.String> getTablePropertiesDisallowed()
- Specified by:
getTablePropertiesDisallowed
in interfaceGuardrailsMBean
- Returns:
- properties that are not allowed when creating or altering a table.
-
getTablePropertiesDisallowedCSV
public java.lang.String getTablePropertiesDisallowedCSV()
- Specified by:
getTablePropertiesDisallowedCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of properties that are not allowed when creating or altering a table.
-
setTablePropertiesDisallowed
public void setTablePropertiesDisallowed(java.lang.String... properties)
-
setTablePropertiesDisallowed
public void setTablePropertiesDisallowed(java.util.Set<java.lang.String> properties)
- Specified by:
setTablePropertiesDisallowed
in interfaceGuardrailsMBean
- Parameters:
properties
- properties that are not allowed when creating or altering a table.
-
setTablePropertiesDisallowedCSV
public void setTablePropertiesDisallowedCSV(java.lang.String properties)
- Specified by:
setTablePropertiesDisallowedCSV
in interfaceGuardrailsMBean
- Parameters:
properties
- Comma-separated list of properties that are not allowed when creating or altering a table.
-
getTablePropertiesIgnored
public java.util.Set<java.lang.String> getTablePropertiesIgnored()
- Specified by:
getTablePropertiesIgnored
in interfaceGuardrailsMBean
- Returns:
- properties that are ignored when creating or altering a table.
-
getTablePropertiesIgnoredCSV
public java.lang.String getTablePropertiesIgnoredCSV()
- Specified by:
getTablePropertiesIgnoredCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of properties that are ignored when creating or altering a table.
-
setTablePropertiesIgnored
public void setTablePropertiesIgnored(java.lang.String... properties)
-
setTablePropertiesIgnored
public void setTablePropertiesIgnored(java.util.Set<java.lang.String> properties)
- Specified by:
setTablePropertiesIgnored
in interfaceGuardrailsMBean
- Parameters:
properties
- properties that are ignored when creating or altering a table.
-
setTablePropertiesIgnoredCSV
public void setTablePropertiesIgnoredCSV(java.lang.String properties)
- Specified by:
setTablePropertiesIgnoredCSV
in interfaceGuardrailsMBean
- Parameters:
properties
- Comma-separated list of properties that are ignored when creating or altering a table.
-
getUserTimestampsEnabled
public boolean getUserTimestampsEnabled()
Description copied from interface:GuardrailsMBean
Returns whether user-provided timestamps are allowed.- Specified by:
getUserTimestampsEnabled
in interfaceGuardrailsMBean
- Returns:
true
if user-provided timestamps are allowed,false
otherwise.
-
setUserTimestampsEnabled
public void setUserTimestampsEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether user-provided timestamps are allowed.- Specified by:
setUserTimestampsEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if user-provided timestamps are allowed,false
otherwise.
-
getAlterTableEnabled
public boolean getAlterTableEnabled()
Description copied from interface:GuardrailsMBean
Gets whether users can use the ALTER TABLE statement to change columns- Specified by:
getAlterTableEnabled
in interfaceGuardrailsMBean
- Returns:
true
if ALTER TABLE is allowed,false
otherwise.
-
setAlterTableEnabled
public void setAlterTableEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether users can use the ALTER TABLE statement to change columns- Specified by:
setAlterTableEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if changing columns is allowed,false
otherwise.
-
getAllowFilteringEnabled
public boolean getAllowFilteringEnabled()
Description copied from interface:GuardrailsMBean
Returns whether ALLOW FILTERING property is allowed.- Specified by:
getAllowFilteringEnabled
in interfaceGuardrailsMBean
- Returns:
true
if ALLOW FILTERING is allowed,false
otherwise.
-
setAllowFilteringEnabled
public void setAllowFilteringEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether ALLOW FILTERING is allowed.- Specified by:
setAllowFilteringEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if ALLOW FILTERING is allowed,false
otherwise.
-
getSimpleStrategyEnabled
public boolean getSimpleStrategyEnabled()
Description copied from interface:GuardrailsMBean
Returns whether SimpleStrategy is allowed on keyspace creation or alteration- Specified by:
getSimpleStrategyEnabled
in interfaceGuardrailsMBean
- Returns:
true
if SimpleStrategy is allowed;false
otherwise
-
setSimpleStrategyEnabled
public void setSimpleStrategyEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether SimpleStrategy is allowed on keyspace creation or alteration- Specified by:
setSimpleStrategyEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if SimpleStrategy is allowed,false
otherwise.
-
getUncompressedTablesEnabled
public boolean getUncompressedTablesEnabled()
Description copied from interface:GuardrailsMBean
Returns whether users can disable compression on tables- Specified by:
getUncompressedTablesEnabled
in interfaceGuardrailsMBean
- Returns:
true
if users can disable compression on a table,false
otherwise.
-
setUncompressedTablesEnabled
public void setUncompressedTablesEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether users can disable compression on tables- Specified by:
setUncompressedTablesEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if users can disable compression on a table,false
otherwise.
-
getCompactTablesEnabled
public boolean getCompactTablesEnabled()
Description copied from interface:GuardrailsMBean
Returns whether users can create new COMPACT STORAGE tables- Specified by:
getCompactTablesEnabled
in interfaceGuardrailsMBean
- Returns:
true
if allowed,false
otherwise.
-
setCompactTablesEnabled
public void setCompactTablesEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether users can create new COMPACT STORAGE tables- Specified by:
setCompactTablesEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if allowed,false
otherwise.
-
getGroupByEnabled
public boolean getGroupByEnabled()
Description copied from interface:GuardrailsMBean
Returns whether GROUP BY queries are allowed.- Specified by:
getGroupByEnabled
in interfaceGuardrailsMBean
- Returns:
true
if allowed,false
otherwise.
-
setGroupByEnabled
public void setGroupByEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether GROUP BY queries are allowed.- Specified by:
setGroupByEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if allowed,false
otherwise.
-
getDropTruncateTableEnabled
public boolean getDropTruncateTableEnabled()
Description copied from interface:GuardrailsMBean
Returns whether users can TRUNCATE or DROP TABLE- Specified by:
getDropTruncateTableEnabled
in interfaceGuardrailsMBean
- Returns:
true
if allowed,false
otherwise.
-
setDropTruncateTableEnabled
public void setDropTruncateTableEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether users can TRUNCATE or DROP TABLE- Specified by:
setDropTruncateTableEnabled
in interfaceGuardrailsMBean
-
getDropKeyspaceEnabled
public boolean getDropKeyspaceEnabled()
Description copied from interface:GuardrailsMBean
Returns whether users can DROP a keyspace- Specified by:
getDropKeyspaceEnabled
in interfaceGuardrailsMBean
- Returns:
true
if allowed,false
otherwise.
-
setDropKeyspaceEnabled
public void setDropKeyspaceEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether users can DROP a keyspace- Specified by:
setDropKeyspaceEnabled
in interfaceGuardrailsMBean
-
getPageSizeWarnThreshold
public int getPageSizeWarnThreshold()
- Specified by:
getPageSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when requested page size greater than threshold. -1 means disabled.
-
getPageSizeFailThreshold
public int getPageSizeFailThreshold()
- Specified by:
getPageSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent requesting page with more elements than threshold. -1 means disabled.
-
setPageSizeThreshold
public void setPageSizeThreshold(int warn, int fail)
- Specified by:
setPageSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getReadBeforeWriteListOperationsEnabled
public boolean getReadBeforeWriteListOperationsEnabled()
Description copied from interface:GuardrailsMBean
Returns whether list operations that require read before write are allowed.- Specified by:
getReadBeforeWriteListOperationsEnabled
in interfaceGuardrailsMBean
- Returns:
true
if list operations that require read before write are allowed,false
otherwise.
-
setReadBeforeWriteListOperationsEnabled
public void setReadBeforeWriteListOperationsEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether list operations that require read before write are allowed.- Specified by:
setReadBeforeWriteListOperationsEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if list operations that require read before write are allowed,false
otherwise.
-
getPartitionKeysInSelectWarnThreshold
public int getPartitionKeysInSelectWarnThreshold()
- Specified by:
getPartitionKeysInSelectWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when the number of partition keys in a select statement greater than threshold. -1 means disabled.
-
getPartitionKeysInSelectFailThreshold
public int getPartitionKeysInSelectFailThreshold()
- Specified by:
getPartitionKeysInSelectFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when the number of partition keys in a select statement greater than threshold. -1 means disabled.
-
setPartitionKeysInSelectThreshold
public void setPartitionKeysInSelectThreshold(int warn, int fail)
- Specified by:
setPartitionKeysInSelectThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getPartitionSizeWarnThreshold
@Nullable public java.lang.String getPartitionSizeWarnThreshold()
- Specified by:
getPartitionSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when encountering partitions larger than threshold, as a string formatted as in,
for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.
-
getPartitionSizeFailThreshold
@Nullable public java.lang.String getPartitionSizeFailThreshold()
- Specified by:
getPartitionSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when encountering partitions larger than threshold, as a string formatted as in,
for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled. Triggering a failure emits a log message and a diagnostic event, but it doesn't throw an exception interrupting the offending sstable write.
-
setPartitionSizeThreshold
public void setPartitionSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
- Specified by:
setPartitionSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSize
- The threshold to warn when encountering partitions larger than threshold, as a string formatted as in, for example,10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.failSize
- The threshold to fail when encountering partitions larger than threshold, as a string formatted as in, for example,10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled. Triggering a failure emits a log message and a diagnostic event, but it desn't throw an exception interrupting the offending sstable write.
-
getPartitionTombstonesWarnThreshold
public long getPartitionTombstonesWarnThreshold()
- Specified by:
getPartitionTombstonesWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when encountering partitions with more tombstones than threshold. -1 means disabled.
-
getPartitionTombstonesFailThreshold
public long getPartitionTombstonesFailThreshold()
- Specified by:
getPartitionTombstonesFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when encountering partitions with more tombstones than threshold. -1 means disabled. Triggering a failure emits a log message and a diagnostic event, but it doesn't throw an exception interrupting the offending sstable write.
-
setPartitionTombstonesThreshold
public void setPartitionTombstonesThreshold(long warn, long fail)
- Specified by:
setPartitionTombstonesThreshold
in interfaceGuardrailsMBean
- Parameters:
warn
- The threshold to warn when encountering partitions with more tombstones than threshold. -1 means disabled.fail
- The threshold to fail when encountering partitions with more tombstones than threshold. -1 means disabled. Triggering a failure emits a log message and a diagnostic event, but it desn't throw an exception interrupting the offending sstable write.
-
getColumnValueSizeWarnThreshold
@Nullable public java.lang.String getColumnValueSizeWarnThreshold()
- Specified by:
getColumnValueSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when encountering column values larger than threshold, as a string formatted as
in, for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.
-
getColumnValueSizeFailThreshold
@Nullable public java.lang.String getColumnValueSizeFailThreshold()
- Specified by:
getColumnValueSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent column values larger than threshold, as a string formatted as in, for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.
-
setColumnValueSizeThreshold
public void setColumnValueSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
- Specified by:
setColumnValueSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSize
- The threshold to warn when encountering column values larger than threshold, as a string formatted as in, for example,10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.failSize
- The threshold to prevent column values larger than threshold, as a string formatted as in, for example,10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.
-
getCollectionSizeWarnThreshold
@Nullable public java.lang.String getCollectionSizeWarnThreshold()
- Specified by:
getCollectionSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when encountering larger size of collection data than threshold, as a string
formatted as in, for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means that the threshold is disabled.
-
getCollectionSizeFailThreshold
@Nullable public java.lang.String getCollectionSizeFailThreshold()
- Specified by:
getCollectionSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent collections with larger data size than threshold, as a string formatted as in,
for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means that the threshold is disabled.
-
setCollectionSizeThreshold
public void setCollectionSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
- Specified by:
setCollectionSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
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
or40B
. Anull
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
or40B
. Anull
value means disabled.
-
getItemsPerCollectionWarnThreshold
public int getItemsPerCollectionWarnThreshold()
- Specified by:
getItemsPerCollectionWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when encountering more elements in a collection than threshold.
-
getItemsPerCollectionFailThreshold
public int getItemsPerCollectionFailThreshold()
- Specified by:
getItemsPerCollectionFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent collections with more elements than threshold.
-
setItemsPerCollectionThreshold
public void setItemsPerCollectionThreshold(int warn, int fail)
- Specified by:
setItemsPerCollectionThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getInSelectCartesianProductWarnThreshold
public int getInSelectCartesianProductWarnThreshold()
- Specified by:
getInSelectCartesianProductWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when an IN query creates a cartesian product with a size exceeding threshold. -1 means disabled.
-
getInSelectCartesianProductFailThreshold
public int getInSelectCartesianProductFailThreshold()
- Specified by:
getInSelectCartesianProductFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to prevent IN queries creating a cartesian product with a size exceeding threshold. -1 means disabled.
-
setInSelectCartesianProductThreshold
public void setInSelectCartesianProductThreshold(int warn, int fail)
- Specified by:
setInSelectCartesianProductThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getReadConsistencyLevelsWarned
public java.util.Set<java.lang.String> getReadConsistencyLevelsWarned()
- Specified by:
getReadConsistencyLevelsWarned
in interfaceGuardrailsMBean
- Returns:
- consistency levels that are warned about when reading.
-
getReadConsistencyLevelsWarnedCSV
public java.lang.String getReadConsistencyLevelsWarnedCSV()
- Specified by:
getReadConsistencyLevelsWarnedCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of consistency levels that are warned about when reading.
-
setReadConsistencyLevelsWarned
public void setReadConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels)
- Specified by:
setReadConsistencyLevelsWarned
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- consistency levels that are warned about when reading.
-
setReadConsistencyLevelsWarnedCSV
public void setReadConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
- Specified by:
setReadConsistencyLevelsWarnedCSV
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- Comma-separated list of consistency levels that are warned about when reading.
-
getReadConsistencyLevelsDisallowed
public java.util.Set<java.lang.String> getReadConsistencyLevelsDisallowed()
- Specified by:
getReadConsistencyLevelsDisallowed
in interfaceGuardrailsMBean
- Returns:
- consistency levels that are not allowed when reading.
-
getReadConsistencyLevelsDisallowedCSV
public java.lang.String getReadConsistencyLevelsDisallowedCSV()
- Specified by:
getReadConsistencyLevelsDisallowedCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of consistency levels that are not allowed when reading.
-
setReadConsistencyLevelsDisallowed
public void setReadConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels)
- Specified by:
setReadConsistencyLevelsDisallowed
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- consistency levels that are not allowed when reading.
-
setReadConsistencyLevelsDisallowedCSV
public void setReadConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)
- Specified by:
setReadConsistencyLevelsDisallowedCSV
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- Comma-separated list of consistency levels that are not allowed when reading.
-
getWriteConsistencyLevelsWarned
public java.util.Set<java.lang.String> getWriteConsistencyLevelsWarned()
- Specified by:
getWriteConsistencyLevelsWarned
in interfaceGuardrailsMBean
- Returns:
- consistency levels that are warned about when writing.
-
getWriteConsistencyLevelsWarnedCSV
public java.lang.String getWriteConsistencyLevelsWarnedCSV()
- Specified by:
getWriteConsistencyLevelsWarnedCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of consistency levels that are warned about when writing.
-
setWriteConsistencyLevelsWarned
public void setWriteConsistencyLevelsWarned(java.util.Set<java.lang.String> consistencyLevels)
- Specified by:
setWriteConsistencyLevelsWarned
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- consistency levels that are warned about when writing.
-
setWriteConsistencyLevelsWarnedCSV
public void setWriteConsistencyLevelsWarnedCSV(java.lang.String consistencyLevels)
- Specified by:
setWriteConsistencyLevelsWarnedCSV
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- Comma-separated list of consistency levels that are warned about when writing.
-
getWriteConsistencyLevelsDisallowed
public java.util.Set<java.lang.String> getWriteConsistencyLevelsDisallowed()
- Specified by:
getWriteConsistencyLevelsDisallowed
in interfaceGuardrailsMBean
- Returns:
- consistency levels that are not allowed when writing.
-
getWriteConsistencyLevelsDisallowedCSV
public java.lang.String getWriteConsistencyLevelsDisallowedCSV()
- Specified by:
getWriteConsistencyLevelsDisallowedCSV
in interfaceGuardrailsMBean
- Returns:
- Comma-separated list of consistency levels that are not allowed when writing.
-
setWriteConsistencyLevelsDisallowed
public void setWriteConsistencyLevelsDisallowed(java.util.Set<java.lang.String> consistencyLevels)
- Specified by:
setWriteConsistencyLevelsDisallowed
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- consistency levels that are not allowed when writing.
-
setWriteConsistencyLevelsDisallowedCSV
public void setWriteConsistencyLevelsDisallowedCSV(java.lang.String consistencyLevels)
- Specified by:
setWriteConsistencyLevelsDisallowedCSV
in interfaceGuardrailsMBean
- Parameters:
consistencyLevels
- Comma-separated list of consistency levels that are not allowed when writing.
-
getFieldsPerUDTWarnThreshold
public int getFieldsPerUDTWarnThreshold()
- Specified by:
getFieldsPerUDTWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when creating a UDT with more fields than threshold. -1 means disabled.
-
getFieldsPerUDTFailThreshold
public int getFieldsPerUDTFailThreshold()
- Specified by:
getFieldsPerUDTFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when creating a UDT with more fields than threshold. -1 means disabled.
-
setFieldsPerUDTThreshold
public void setFieldsPerUDTThreshold(int warn, int fail)
- Specified by:
setFieldsPerUDTThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getVectorDimensionsWarnThreshold
public int getVectorDimensionsWarnThreshold()
- Specified by:
getVectorDimensionsWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when creating a vector with more dimensions than threshold.
-
getVectorDimensionsFailThreshold
public int getVectorDimensionsFailThreshold()
- Specified by:
getVectorDimensionsFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when creating a vector with more dimensions than threshold.
-
setVectorDimensionsThreshold
public void setVectorDimensionsThreshold(int warn, int fail)
- Specified by:
setVectorDimensionsThreshold
in interfaceGuardrailsMBean
- Parameters:
warn
- The threshold to warn when creating a vector with more dimensions than threshold.fail
- The threshold to prevent creating a vector with more dimensions than threshold.
-
setVectorTypeEnabled
public void setVectorTypeEnabled(boolean enabled)
- Specified by:
setVectorTypeEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if vector type usage is enabled.
-
getVectorTypeEnabled
public boolean getVectorTypeEnabled()
- Specified by:
getVectorTypeEnabled
in interfaceGuardrailsMBean
- Returns:
true
if vector type usage is enabled.
-
getMaximumReplicationFactorWarnThreshold
public int getMaximumReplicationFactorWarnThreshold()
- Specified by:
getMaximumReplicationFactorWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when replication factor is greater than threshold.
-
getMaximumReplicationFactorFailThreshold
public int getMaximumReplicationFactorFailThreshold()
- Specified by:
getMaximumReplicationFactorFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when replication factor is greater than threshold.
-
setMaximumReplicationFactorThreshold
public void setMaximumReplicationFactorThreshold(int warn, int fail)
- Specified by:
setMaximumReplicationFactorThreshold
in interfaceGuardrailsMBean
- Parameters:
warn
- The threshold to warn when the maximum replication factor is greater than threshold. -1 means disabled.fail
- The threshold to fail when the maximum replication factor is greater than threshold. -1 means disabled.
-
getDataDiskUsagePercentageWarnThreshold
public int getDataDiskUsagePercentageWarnThreshold()
- Specified by:
getDataDiskUsagePercentageWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when local data disk usage percentage exceeds that threshold.
Allowed values are in the range
[1, 100]
, and -1 means disabled.
-
getDataDiskUsagePercentageFailThreshold
public int getDataDiskUsagePercentageFailThreshold()
- Specified by:
getDataDiskUsagePercentageFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when local data disk usage percentage exceeds that threshold.
Allowed values are in the range
[1, 100]
, and -1 means disabled.
-
setDataDiskUsagePercentageThreshold
public void setDataDiskUsagePercentageThreshold(int warn, int fail)
- Specified by:
setDataDiskUsagePercentageThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getDataDiskUsageMaxDiskSize
@Nullable public java.lang.String getDataDiskUsageMaxDiskSize()
- Specified by:
getDataDiskUsageMaxDiskSize
in interfaceGuardrailsMBean
- Returns:
- The max disk size of the data directories when calculating disk usage thresholds, as a string formatted
as in, for example,
10GiB
,20MiB
,30KiB
or40B
. Anull
value means disabled.
-
setDataDiskUsageMaxDiskSize
public void setDataDiskUsageMaxDiskSize(@Nullable java.lang.String size)
- Specified by:
setDataDiskUsageMaxDiskSize
in interfaceGuardrailsMBean
- Parameters:
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
or40B
. Anull
value means disabled.
-
getMinimumReplicationFactorWarnThreshold
public int getMinimumReplicationFactorWarnThreshold()
- Specified by:
getMinimumReplicationFactorWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to warn when replication factor is lesser than threshold.
-
getMinimumReplicationFactorFailThreshold
public int getMinimumReplicationFactorFailThreshold()
- Specified by:
getMinimumReplicationFactorFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The threshold to fail when replication factor is lesser than threshold.
-
setMinimumReplicationFactorThreshold
public void setMinimumReplicationFactorThreshold(int warn, int fail)
- Specified by:
setMinimumReplicationFactorThreshold
in interfaceGuardrailsMBean
- Parameters:
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.
-
getZeroTTLOnTWCSEnabled
public boolean getZeroTTLOnTWCSEnabled()
Description copied from interface:GuardrailsMBean
Returns whether it is allowed to create or alter table to use 0 default TTL with TimeWindowCompactionStrategy. If it is not, such query will fail.- Specified by:
getZeroTTLOnTWCSEnabled
in interfaceGuardrailsMBean
- Returns:
true
if 0 default TTL is allowed on TWCS table,false
otherwise.
-
setZeroTTLOnTWCSEnabled
public void setZeroTTLOnTWCSEnabled(boolean value)
Description copied from interface:GuardrailsMBean
Sets whether users can use 0 default TTL on a table with TimeWindowCompactionStrategy.- Specified by:
setZeroTTLOnTWCSEnabled
in interfaceGuardrailsMBean
- Parameters:
value
-true
if 0 default TTL on TWCS tables is allowed,false
otherwise.
-
getZeroTTLOnTWCSWarned
public boolean getZeroTTLOnTWCSWarned()
Description copied from interface:GuardrailsMBean
Returns whether warnings will be emitted when usage of 0 default TTL on a table with TimeWindowCompactionStrategy is detected.- Specified by:
getZeroTTLOnTWCSWarned
in interfaceGuardrailsMBean
- Returns:
true
if warnings will be emitted,false
otherwise.
-
setZeroTTLOnTWCSWarned
public void setZeroTTLOnTWCSWarned(boolean value)
Description copied from interface:GuardrailsMBean
Sets whether warnings will be emitted when usage of 0 default TTL on a table with TimeWindowCompactionStrategy is detected.- Specified by:
setZeroTTLOnTWCSWarned
in interfaceGuardrailsMBean
- Parameters:
value
-true
if warning will be emitted,false
otherwise.
-
getMaximumTimestampWarnThreshold
public java.lang.String getMaximumTimestampWarnThreshold()
- Specified by:
getMaximumTimestampWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The highest acceptable difference between now and the written value timestamp before triggering a warning.
Expressed as a string formatted as in, for example,
10s
20m
,30h
or40d
. Anull
value means disabled.
-
getMaximumTimestampFailThreshold
public java.lang.String getMaximumTimestampFailThreshold()
- Specified by:
getMaximumTimestampFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The highest acceptable difference between now and the written value timestamp before triggering a failure.
Expressed as a string formatted as in, for example,
10s
20m
,30h
or40d
. Anull
value means disabled.
-
setMaximumTimestampThreshold
public void setMaximumTimestampThreshold(java.lang.String warnSeconds, java.lang.String failSeconds)
Description copied from interface:GuardrailsMBean
Sets the warning upper bound for user supplied timestamps.- Specified by:
setMaximumTimestampThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSeconds
- The highest acceptable difference between now and the written value timestamp before triggering a warning. Expressed as a string formatted as in, for example,10s
,20m
,30h
or40d
. Anull
value means disabled.failSeconds
- The highest acceptable difference between now and the written value timestamp before triggering a failure. Expressed as a string formatted as in, for example,10s
,20m
,30h
or40d
. Anull
value means disabled.
-
getMinimumTimestampWarnThreshold
public java.lang.String getMinimumTimestampWarnThreshold()
- Specified by:
getMinimumTimestampWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The lowest acceptable difference between now and the written value timestamp before triggering a warning.
Expressed as a string formatted as in, for example,
10s
20m
,30h
or40d
. Anull
value means disabled.
-
getMinimumTimestampFailThreshold
public java.lang.String getMinimumTimestampFailThreshold()
- Specified by:
getMinimumTimestampFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The lowest acceptable difference between now and the written value timestamp before triggering a failure.
Expressed as a string formatted as in, for example,
10s
20m
,30h
or40d
. Anull
value means disabled.
-
setMinimumTimestampThreshold
public void setMinimumTimestampThreshold(java.lang.String warnSeconds, java.lang.String failSeconds)
Description copied from interface:GuardrailsMBean
Sets the warning lower bound for user supplied timestamps.- Specified by:
setMinimumTimestampThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSeconds
- The lowest acceptable difference between now and the written value timestamp before triggering a warning. Expressed as a string formatted as in, for example,10s
,20m
,30h
or40d
. Anull
value means disabled.failSeconds
- The lowest acceptable difference between now and the written value timestamp before triggering a failure. Expressed as a string formatted as in, for example,10s
,20m
,30h
or40d
. Anull
value means disabled.
-
getSaiSSTableIndexesPerQueryWarnThreshold
public int getSaiSSTableIndexesPerQueryWarnThreshold()
- Specified by:
getSaiSSTableIndexesPerQueryWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- the warning threshold for the number of SAI SSTable indexes searched by a query
-
getSaiSSTableIndexesPerQueryFailThreshold
public int getSaiSSTableIndexesPerQueryFailThreshold()
- Specified by:
getSaiSSTableIndexesPerQueryFailThreshold
in interfaceGuardrailsMBean
- Returns:
- the failure threshold for the number of SAI SSTable indexes searched by a query
-
setSaiSSTableIndexesPerQueryThreshold
public void setSaiSSTableIndexesPerQueryThreshold(int warn, int fail)
Description copied from interface:GuardrailsMBean
Sets warning and failure thresholds for the number of SAI SSTable indexes searched by a query- Specified by:
setSaiSSTableIndexesPerQueryThreshold
in interfaceGuardrailsMBean
- Parameters:
warn
- value to set for warn thresholdfail
- value to set for fail threshold
-
getSaiStringTermSizeWarnThreshold
@Nullable public java.lang.String getSaiStringTermSizeWarnThreshold()
- Specified by:
getSaiStringTermSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The warning threshold for string terms written to an SAI index, as a human-readable string.
(ex.
10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
getSaiStringTermSizeFailThreshold
@Nullable public java.lang.String getSaiStringTermSizeFailThreshold()
- Specified by:
getSaiStringTermSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The failure threshold for string terms written to an SAI index, as a human-readable string.
(ex.
10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
setSaiStringTermSizeThreshold
public void setSaiStringTermSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
- Specified by:
setSaiStringTermSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSize
- The warning threshold for string terms written to an SAI index, as a human-readable string. (ex.10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.failSize
- The failure threshold for string terms written to an SAI index, as a human-readable string. (ex.10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
getSaiFrozenTermSizeWarnThreshold
@Nullable public java.lang.String getSaiFrozenTermSizeWarnThreshold()
- Specified by:
getSaiFrozenTermSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The warning threshold for frozen terms written to an SAI index, as a human-readable string.
(ex.
10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
getSaiFrozenTermSizeFailThreshold
@Nullable public java.lang.String getSaiFrozenTermSizeFailThreshold()
- Specified by:
getSaiFrozenTermSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The failure threshold for frozen terms written to an SAI index, as a human-readable string.
(ex.
10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
setSaiFrozenTermSizeThreshold
public void setSaiFrozenTermSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
- Specified by:
setSaiFrozenTermSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSize
- The warning threshold for frozen terms written to an SAI index, as a human-readable string. (ex.10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.failSize
- The failure threshold for frozen terms written to an SAI index, as a human-readable string. (ex.10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
getSaiVectorTermSizeWarnThreshold
@Nullable public java.lang.String getSaiVectorTermSizeWarnThreshold()
- Specified by:
getSaiVectorTermSizeWarnThreshold
in interfaceGuardrailsMBean
- Returns:
- The warning threshold for vector terms written to an SAI index, as a human-readable string.
(ex.
10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
getSaiVectorTermSizeFailThreshold
@Nullable public java.lang.String getSaiVectorTermSizeFailThreshold()
- Specified by:
getSaiVectorTermSizeFailThreshold
in interfaceGuardrailsMBean
- Returns:
- The failure threshold for vector terms written to an SAI index, as a human-readable string.
(ex.
10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
setSaiVectorTermSizeThreshold
public void setSaiVectorTermSizeThreshold(@Nullable java.lang.String warnSize, @Nullable java.lang.String failSize)
- Specified by:
setSaiVectorTermSizeThreshold
in interfaceGuardrailsMBean
- Parameters:
warnSize
- The warning threshold for vector terms written to an SAI index, as a human-readable string. (ex.10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.failSize
- The failure threshold for vector terms written to an SAI index, as a human-readable string. (ex.10GiB
,20MiB
,30KiB
or40B
) Anull
value means disabled.
-
getNonPartitionRestrictedQueryEnabled
public boolean getNonPartitionRestrictedQueryEnabled()
Description copied from interface:GuardrailsMBean
Returns whether it is possible to execute a query against secondary indexes without specifying any partition key restrictions.- Specified by:
getNonPartitionRestrictedQueryEnabled
in interfaceGuardrailsMBean
- Returns:
- true if it is possible to execute a query without a partition key, false otherwise
-
setNonPartitionRestrictedQueryEnabled
public void setNonPartitionRestrictedQueryEnabled(boolean enabled)
Description copied from interface:GuardrailsMBean
Sets whether it is possible to execute a query against indexes (secondary or SAI) without specifying any partition key restrictions.- Specified by:
setNonPartitionRestrictedQueryEnabled
in interfaceGuardrailsMBean
- Parameters:
enabled
-true
if a query without partition key is enabled or not
-
getIntersectFilteringQueryWarned
public boolean getIntersectFilteringQueryWarned()
- Specified by:
getIntersectFilteringQueryWarned
in interfaceGuardrailsMBean
- Returns:
- true if a client warning is emitted for a filtering query with an intersection on mutable columns at a consistency level requiring coordinator reconciliation
-
setIntersectFilteringQueryWarned
public void setIntersectFilteringQueryWarned(boolean value)
- Specified by:
setIntersectFilteringQueryWarned
in interfaceGuardrailsMBean
-
getIntersectFilteringQueryEnabled
public boolean getIntersectFilteringQueryEnabled()
- Specified by:
getIntersectFilteringQueryEnabled
in interfaceGuardrailsMBean
- Returns:
- true if it is possible to execute a filtering query with an intersection on mutable columns at a consistency level requiring coordinator reconciliation
-
setIntersectFilteringQueryEnabled
public void setIntersectFilteringQueryEnabled(boolean value)
- Specified by:
setIntersectFilteringQueryEnabled
in interfaceGuardrailsMBean
-
-