cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Bryński <>
Subject Problem with Jython UDF
Date Thu, 03 Nov 2016 06:15:30 GMT
I have following problem with Jython UDF.

1) I'm using Cassandra 3.9 deb packages and Ubuntu 14.04. I'm running
Oracle Java 1.8.0_101-b13)

2) I added jython jar to /usr/share/cassandra/lib. (jython version 2.7.0)
This makes creating python function possible

3) I want to test function.

cqlsh:e> CREATE FUNCTION IF NOT EXISTS test123 (input bigint) CALLED ON
NULL INPUT RETURNS text LANGUAGE python AS 'return "123"';

This worked, but running select with udf returns exception:
Traceback (most recent call last):
  File "/usr/bin/", line 1264, in perform_simple_statement
    result = future.result()
line 3650, in result
    raise self._final_exception
FunctionFailure: Error from server: code=1400 [User Defined Function
failure] message="execution of 'e.test123[bigint]' failed: access denied:

4) I tried to modify /etc/java-8-oracle/security/java.policy and added:

grant codeBase "file:/usr/share/cassandra/lib/*" {

Still no improvement.

Any ideas how to run python UDFs in Cassandra ?

Maciek Bryński

View raw message