mirror of https://github.com/apache/cassandra
Deprecate JavaScript user-defined functions
patch by Ekaterina Dimitrova; reviewed by Berenguer Blasi and Marcus Eriksson for CASSANDRA-17280
This commit is contained in:
parent
5bc9f7c736
commit
22a4ae16e4
5
NEWS.txt
5
NEWS.txt
|
|
@ -64,6 +64,11 @@ Upgrading
|
|||
otc_backlog_expiration_interval_ms are deprecated and will be removed at earliest with next major release.
|
||||
otc_coalescing_strategy is disabled since 3.11.
|
||||
|
||||
Deprecation
|
||||
---------
|
||||
- JavaScript user-defined functions have been deprecated. They are planned for removal
|
||||
in the next major release. (CASSANDRA-17280)
|
||||
|
||||
4.0.2
|
||||
=====
|
||||
|
||||
|
|
|
|||
|
|
@ -242,11 +242,19 @@ For example, `bigintAsBlob(3)` returns `0x0000000000000003` and `blobAsBigint(0x
|
|||
==== User-defined functions
|
||||
|
||||
User-defined functions (UDFs) execute user-provided code in Cassandra.
|
||||
By default, Cassandra supports defining functions in _Java_ and _JavaScript_.
|
||||
By default, Cassandra supports defining functions in _Java_ and _JavaScript_.
|
||||
Support for other JSR 223 compliant scripting languages, such as Python, Ruby, and Scala, is possible by adding a JAR to the classpath.
|
||||
|
||||
UDFs are part of the Cassandra schema, and are automatically propagated to all nodes in the cluster.
|
||||
UDFs can be _overloaded_, so that multiple UDFs with different argument types can have the same function name.
|
||||
UDFs can be _overloaded_, so that multiple UDFs with different argument types can have the same function name.
|
||||
|
||||
|
||||
[NOTE]
|
||||
.Note
|
||||
====
|
||||
_JavaScript_ user-defined functions have been deprecated. They are planned for removal
|
||||
in the next major release.
|
||||
====
|
||||
|
||||
For example:
|
||||
|
||||
|
|
|
|||
|
|
@ -761,6 +761,9 @@ public class DatabaseDescriptor
|
|||
if (conf.allow_extra_insecure_udfs)
|
||||
logger.warn("Allowing java.lang.System.* access in UDFs is dangerous and not recommended. Set allow_extra_insecure_udfs: false to disable.");
|
||||
|
||||
if(conf.enable_scripted_user_defined_functions)
|
||||
logger.warn("JavaScript user-defined functions have been deprecated. You can still use them but the plan is to remove them in the next major version. For more information - CASSANDRA-17280");
|
||||
|
||||
if (conf.commitlog_segment_size_in_mb <= 0)
|
||||
throw new ConfigurationException("commitlog_segment_size_in_mb must be positive, but was "
|
||||
+ conf.commitlog_segment_size_in_mb, false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue