You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2018/08/07 18:44:34 UTC
[GitHub] RestfulBlue edited a comment on issue #4826:
AvaticaClientRuntimeException: Remote driver error: IllegalStateException:
DefaultQueryMetrics must not be modified from multiple threads.
RestfulBlue edited a comment on issue #4826: AvaticaClientRuntimeException: Remote driver error: IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads.
URL: https://github.com/apache/incubator-druid/issues/4826#issuecomment-411160413
@gianm i also issue this error with version 12.2(builded from sources 2-3 weeks ago)
using simple sql query
select __time,hostname
from hardware
where __time > TIME_SHIFT(CURRENT_TIMESTAMP,'PT1H',-1)
order by __time desc
limit 100
optimized plan :
`DruidQueryRel(query=[{"queryType":"select","dataSource":{"type":"table","name":"hardware"},"intervals":{"type":"intervals","intervals":["2018-08-07T17:32:17.001Z/146140482-04-24T15:36:27.903Z"]},"descending":true,"filter":null,"granularity":{"type":"all"},"dimensions":[{"type":"default","dimension":"dummy","outputName":"dummy","outputType":"STRING"}],"metrics":["__time","hostname"],"virtualColumns":[],"pagingSpec":{"pagingIdentifiers":{},"threshold":100,"fromNext":true},"context":{"driver":"org.apache.calcite.avatica.remote.Driver"}}], signature=[{__time:LONG, hostname:STRING}])
`
Error :
`
org.apache.calcite.avatica.AvaticaSqlException: Error -1 (00000) : Error while executing SQL "select __time,hostname
from hardware
where __time > TIME_SHIFT(CURRENT_TIMESTAMP,'PT1H',-1)
order by __time desc
limit 100": Remote driver error: IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads. If it is needed to gather dimension or metric information from multiple threads or from an async thread, this information should explicitly be passed between threads (e. g. using Futures), or this DefaultQueryMetrics's ownerThread should be reassigned explicitly
at org.apache.calcite.avatica.Helper.createException(Helper.java:53)
at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:143)
at org.apache.calcite.avatica.AvaticaStatement.execute(AvaticaStatement.java:177)
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:291)
at org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:597)
at org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:709)
at org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:97)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:498)
at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
at org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
java.lang.IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads. If it is needed to gather dimension or metric information from multiple threads or from an async thread, this information should explicitly be passed between threads (e. g. using Futures), or this DefaultQueryMetrics's ownerThread should be reassigned explicitly
at io.druid.query.DefaultQueryMetrics.checkModifiedFromOwnerThread(DefaultQueryMetrics.java:59)
at io.druid.query.DefaultQueryMetrics.reportMetric(DefaultQueryMetrics.java:259)
at io.druid.query.DefaultQueryMetrics.reportCpuTime(DefaultQueryMetrics.java:237)
at io.druid.query.select.DefaultSelectQueryMetrics.reportCpuTime(DefaultSelectQueryMetrics.java:201)
at io.druid.query.CPUTimeMetricQueryRunner$1.after(CPUTimeMetricQueryRunner.java:87)
at io.druid.java.util.common.guava.WrappingYielder.close(WrappingYielder.java:96)
at io.druid.java.util.common.guava.WrappingYielder.close(WrappingYielder.java:81)
at io.druid.java.util.common.guava.Yielders$2.close(Yielders.java:73)
at io.druid.java.util.common.guava.ConcatSequence.wrapYielder(ConcatSequence.java:114)
at io.druid.java.util.common.guava.ConcatSequence.access$000(ConcatSequence.java:29)
at io.druid.java.util.common.guava.ConcatSequence$2.next(ConcatSequence.java:134)
at io.druid.sql.avatica.DruidStatement.nextFrame(DruidStatement.java:284)
at io.druid.sql.avatica.DruidMeta.fetch(DruidMeta.java:233)
at org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:239)
at org.apache.calcite.avatica.remote.Service$FetchRequest.accept(Service.java:1371)
at org.apache.calcite.avatica.remote.Service$FetchRequest.accept(Service.java:1338)
at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:94)
at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:52)
at org.apache.calcite.avatica.server.AvaticaJsonHandler.handle(AvaticaJsonHandler.java:130)
at io.druid.sql.avatica.DruidAvaticaHandler.handle(DruidAvaticaHandler.java:60)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:534)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads. If it is needed to gather dimension or metric information from multiple threads or from an async thread, this information should explicitly be passed between threads (e. g. using Futures), or this DefaultQueryMetrics's ownerThread should be reassigned explicitly
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at io.druid.sql.avatica.DruidStatement.close(DruidStatement.java:342)
at io.druid.sql.avatica.DruidStatement.nextFrame(DruidStatement.java:297)
... 22 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads. If it is needed to gather dimension or metric information from multiple threads or from an async thread, this information should explicitly be passed between threads (e. g. using Futures), or this DefaultQueryMetrics's ownerThread should be reassigned explicitly
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at io.druid.sql.avatica.DruidStatement.close(DruidStatement.java:326)
... 23 more
Caused by: java.lang.IllegalStateException: DefaultQueryMetrics must not be modified from multiple threads. If it is needed to gather dimension or metric information from multiple threads or from an async thread, this information should explicitly be passed between threads (e. g. using Futures), or this DefaultQueryMetrics's ownerThread should be reassigned explicitly
at io.druid.query.DefaultQueryMetrics.checkModifiedFromOwnerThread(DefaultQueryMetrics.java:59)
at io.druid.query.DefaultQueryMetrics.reportMetric(DefaultQueryMetrics.java:259)
at io.druid.query.DefaultQueryMetrics.reportCpuTime(DefaultQueryMetrics.java:237)
at io.druid.query.select.DefaultSelectQueryMetrics.reportCpuTime(DefaultSelectQueryMetrics.java:201)
at io.druid.query.CPUTimeMetricQueryRunner$1.after(CPUTimeMetricQueryRunner.java:87)
at io.druid.java.util.common.guava.WrappingYielder.close(WrappingYielder.java:96)
at io.druid.java.util.common.guava.WrappingYielder.close(WrappingYielder.java:81)
at io.druid.java.util.common.guava.ConcatSequence$2.close(ConcatSequence.java:148)
at io.druid.java.util.common.guava.ConcatSequence$2.close(ConcatSequence.java:147)
at io.druid.sql.avatica.DruidStatement.lambda$close$1(DruidStatement.java:322)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
... 1 more
`
also, if i did not specify time filter, this query also break with timeout(10s), but it should return only 100 last rows. total size of hardware datasource is 500mb. hardware is really huge( for historical dedicated 8 cores, 30 gb , 4 servers , every server has 56 cores and 512gb+ memory)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org