cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maciej Bryński <mac...@brynski.pl>
Subject Problem with Jython UDF
Date Thu, 03 Nov 2016 06:15:30 GMT
Hi,
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/cqlsh.py", line 1264, in perform_simple_statement
    result = future.result()
  File
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.5.0.post0-d8d0456.zip/cassandra-driver-3.5.0.post0-d8d0456/cassandra/cluster.py",
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:
java.security.AccessControlException: access denied:
("java.lang.RuntimePermission"
"accessClassInPackage.org.python.jline.console")

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

grant codeBase "file:/usr/share/cassandra/lib/*" {
        permission java.security.AllPermission;
};

Still no improvement.

Any ideas how to run python UDFs in Cassandra ?

Regards,
-- 
Maciek Bryński

Mime
View raw message