linjian513 opened a new issue #8418: JavaScript is disabled Error 
class:java.lang.IllegalStateException
URL: https://github.com/apache/incubator-druid/issues/8418
 
 
   my druid version is druid-0.13.0. I had set
   druid.javascript.enabled=true
   at the file
   /druid-0.13.0/conf/druid/_common/common.runtime.properties
   in every broker node. But i met a strage broblem: it cant work in the time 
hours ago, but it does not work when i query a near time from now. It shows 
"java.lang.Exception: Unknown exception JavaScript is disabled Error 
class:java.lang.IllegalStateException".
   My query is :
   {
      "queryType": "groupBy",
      "dataSource": "monitor_install_event",
      "intervals": [
                         
"2019-08-28T09:30:33.000+0800/2019-08-28T09:36:33.000+0800"
                   ],
      "granularity": "all",
      "context": { "timeout": 60000 },
      "filter": {
               "type":"and",
                   "fields":[
                      
{"type":"not","field":{"type":"selector","dimension":"interruptTotal","value":"0"}},
                       
{"type":"in","dimension":"exceptionCode","values":["-7","0","2"]},
                       {"type":"in","dimension":"city","values":["莆田"]},
                       {"type":"in","dimension":"cdnName","values":["baishan"]}
                       
                   ]
               },
      "dimensions":[
                       "versionId"
                   ],
                   
      
        "having":{
               "type": "and",
               "havingSpecs": [        
                   {
                       "type": "greaterThan",
                       "aggregation": "total",
                       "value": 0
                   },
                   {
                       "type": "greaterThan",
                       "aggregation": "ratio",
                       "value": -1
                   }
                   
               ]
           },
      "metrics":[],
      "aggregations": [
                       {
                           "type": "doubleSum",
                           "name": "total",
                           "fieldName": "count"
                       },
                       {
                             "type": "javascript",
                             "name": "execTotal",
                             "fieldNames": ["exceptionCode","cdnUrl","count"],
                             "fnAggregate" : "function(current, exceptionCode, 
cdnUrl,count)      {var arr = ['0'];  return current + 
((arr.indexOf(exceptionCode) >= 0)? count:0); }",
                             "fnCombine"   : "function(partialA, partialB) { 
return partialA + partialB; }",
                             "fnReset"     : "function()                   { 
return 0; }"
                       }
                   ],
       "postAggregations": [
                       {
                           "type": "arithmetic",
                           "name": "ratio",
                           "fn": "/",
                           "fields": [
                               {
                                   "type": "fieldAccess",
                                   "fieldName": "execTotal"
                               },
                               {
                                   "type": "fieldAccess",
                                   "fieldName": "total"
                               }
                           ]
                       }
                   ],
      "limitSpec": {
                       "type": "default",
                       "limit"   : 100,
                       "columns": [
                           {
                               "dimension": "total",
                               "direction": "descending"
                           }
                       ]
               }
   }
   
   eg: I use the intervals 
"2019-08-28T00:30:33.000+0800/2019-08-28T00:36:33.000+0800"  is OK, but use 
"2019-08-28T09:30:33.000+0800/2019-08-28T09:36:33.000+0800" the query return 
"java.lang.Exception: Unknown exception JavaScript is disabled Error 
class:java.lang.IllegalStateException."
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to