elassandra
elassandra copied to clipboard
Anybody having issues with bucket script aggregation?
I'm trying to do a aggregation with bucket script which is working fine in elasticsearch 5.5 but not in elassandra.
https://www.elastic.co/guide/en/elasticsearch/reference/5.5/search-aggregations-pipeline-bucket-script-aggregation.html
Error I'm receiving the moment I try something with bucket script is:
{
"error": {
"root_cause": [],
"type": "search_phase_execution_exception",
"reason": "",
"phase": "fetch",
"grouped": true,
"failed_shards": [],
"caused_by": {
"type": "script_exception",
"reason": "compile error",
"script_stack": [],
"script": "params.totalSales * 100",
"lang": "painless",
"caused_by": {
"type": "runtime_exception",
"reason": "java.lang.ClassNotFoundException: org.elasticsearch.painless.PainlessError"
}
}
},
"status": 503
}
Hi, The class not found should be in modules/lang-painless/lang-painless-5.5.0.jar. What is your environnement ? (version, os, installation ?)
Tried in multiple environments, on mac os, on centos 7 and on docker, same issue. Versions tested are 5.5.0.9 and 5.5.0.10
Well, the issue comes from a class loading issue of asm jar required by both elasticsearch scripting modules (expression+painless) and cassandra UDF (see CASSANDRA-11193).
If you don't have any Cassandra UDF in your schema, the quick workaround is to move lib/asm-debug-all-5.1.jar to modules/lang-painless/asm-debug-all-5.1.jar + restart.g
The fix will be available soon in next release 5.5.0.12. Thanks for reporting the issue.
@vroyer just tested last version, same issue still persist as soon as indexes are defined. Example query which works on elasticsearch but not in elassandra is
{
"from": 0,
"size": 0,
"aggs": {
"test_script": {
"avg": {
"field": "cpu_usage",
"script": "_value + 2000"
}
}
}
}
Yes, there is still a class loading issue. If you don’t need cassandra UDF, remove lib/asm-debug-all-5.1.jar and it should work. Thanks.
Le 22 févr. 2018 à 17:25, shpetimshala [email protected] a écrit :
@vroyer https://github.com/vroyer just tested last version, same issue still persist as soon as indexes are defined. Example query which works on elasticsearch but not in elassandra is
{ "from": 0, "size": 0, "aggs": { "test_script": { "avg": { "field": "cpu_usage", "script": "_value + 2000" } } } } — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/strapdata/elassandra/issues/165#issuecomment-367736326, or mute the thread https://github.com/notifications/unsubscribe-auth/AJzHmW99aeWkq2RiC3N9xASN-Ug89IvCks5tXZUFgaJpZM4R82_f.