[
https://issues.apache.org/jira/browse/DRILL-6961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16739328#comment-16739328
]
Arina Ielchiieva commented on DRILL-6961:
-----------------------------------------
Classes that override AbstrcactSchema.getTablesName should not throw exception
if there was an exception while retrieving table names, they should log a
warning and return empty collection (similar is done in Hive plugin). Another
point to consider is to ensure that when populating data for information_schema
and sys schemas' tables instead of failing return empty result.
> Error Occurred: Cannot connect to the db. query INFORMATION_SCHEMA.VIEWS :
> Maybe you have incorrect connection params or db unavailable now (timeout)
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: DRILL-6961
> URL: https://issues.apache.org/jira/browse/DRILL-6961
> Project: Apache Drill
> Issue Type: Improvement
> Components: Storage - Information Schema
> Affects Versions: 1.13.0
> Reporter: Khurram Faraaz
> Priority: Major
>
> Trying to query drill information_schema.views table returns error. Disabling
> openTSDB plugin resolves the problem.
> Drill 1.13.0
> Failing query :
> {noformat}
> SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, VIEW_DEFINITION FROM
> INFORMATION_SCHEMA.`VIEWS` where VIEW_DEFINITION not like 'kraken';
> {noformat}
> Stack Trace from drillbit.log
> {noformat}
> 2019-01-07 15:36:21,975 [23cc39aa-2618-e9f0-e77e-4fafa6edc314:foreman] INFO
> o.a.drill.exec.work.foreman.Foreman - Query text for query id
> 23cc39aa-2618-e9f0-e77e-4fafa6edc314: SELECT TABLE_CATALOG, TABLE_SCHEMA,
> TABLE_NAME, VIEW_DEFINITION FROM INFORMATION_SCHEMA.`VIEWS` where
> VIEW_DEFINITION not like 'kraken'
> 2019-01-07 15:36:35,221 [23cc39aa-2618-e9f0-e77e-4fafa6edc314:frag:0:0] INFO
> o.a.d.e.s.o.c.services.ServiceImpl - User Error Occurred: Cannot connect to
> the db. Maybe you have incorrect connection params or db unavailable now
> (timeout)
> org.apache.drill.common.exceptions.UserException: CONNECTION ERROR: Cannot
> connect to the db. Maybe you have incorrect connection params or db
> unavailable now
> [Error Id: f8b4c074-ba62-4691-b142-a8ea6e4f6b2a ]
> at
> org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:633)
> ~[drill-common-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.openTSDB.client.services.ServiceImpl.getTableNames(ServiceImpl.java:107)
> [drill-opentsdb-storage-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.openTSDB.client.services.ServiceImpl.getAllMetricNames(ServiceImpl.java:70)
> [drill-opentsdb-storage-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.openTSDB.schema.OpenTSDBSchemaFactory$OpenTSDBSchema.getTableNames(OpenTSDBSchemaFactory.java:78)
> [drill-opentsdb-storage-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.calcite.jdbc.SimpleCalciteSchema.addImplicitTableToBuilder(SimpleCalciteSchema.java:106)
> [calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at
> org.apache.calcite.jdbc.CalciteSchema.getTableNames(CalciteSchema.java:318)
> [calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at
> org.apache.calcite.jdbc.CalciteSchema$SchemaPlusImpl.getTableNames(CalciteSchema.java:587)
> [calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at
> org.apache.calcite.jdbc.CalciteSchema$SchemaPlusImpl.getTableNames(CalciteSchema.java:548)
> [calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.visitTables(InfoSchemaRecordGenerator.java:227)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:216)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:209)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaRecordGenerator.scanSchema(InfoSchemaRecordGenerator.java:196)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaTableType.getRecordReader(InfoSchemaTableType.java:58)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:34)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.store.ischema.InfoSchemaBatchCreator.getBatch(InfoSchemaBatchCreator.java:30)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator$2.run(ImplCreator.java:146)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator$2.run(ImplCreator.java:142)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at java.security.AccessController.doPrivileged(Native Method) [na:1.8.0_144]
> at javax.security.auth.Subject.doAs(Subject.java:422) [na:1.8.0_144]
> at
> org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1633)
> [hadoop-common-2.7.0-mapr-1710.jar:na]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:142)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:182)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:137)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:182)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:137)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:182)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getRecordBatch(ImplCreator.java:137)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getChildren(ImplCreator.java:182)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getRootExec(ImplCreator.java:110)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.physical.impl.ImplCreator.getExec(ImplCreator.java:87)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:206)
> [drill-java-exec-1.13.0-mapr.jar:1.13.0-mapr]
> at
> org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
> [drill-common-1.13.0-mapr.jar:1.13.0-mapr]
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
> [na:1.8.0_144]
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
> [na:1.8.0_144]
> at java.lang.Thread.run(Thread.java:748) [na:1.8.0_144]
> Caused by: java.net.SocketTimeoutException: timeout
> at okio.Okio$3.newTimeoutException(Okio.java:212) ~[okio-1.8.0.jar:na]
> at okio.AsyncTimeout.exit(AsyncTimeout.java:288) ~[okio-1.8.0.jar:na]
> at okio.AsyncTimeout$2.read(AsyncTimeout.java:242) ~[okio-1.8.0.jar:na]
> at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
> ~[okio-1.8.0.jar:na]
> at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)
> ~[okio-1.8.0.jar:na]
> at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
> ~[okio-1.8.0.jar:na]
> at okhttp3.internal.http.Http1xStream.readResponse(Http1xStream.java:184)
> ~[okhttp-3.3.0.jar:na]
> at
> okhttp3.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:125)
> ~[okhttp-3.3.0.jar:na]
> at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:775)
> ~[okhttp-3.3.0.jar:na]
> at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:86)
> ~[okhttp-3.3.0.jar:na]
> at
> okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:760)
> ~[okhttp-3.3.0.jar:na]
> at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:613)
> ~[okhttp-3.3.0.jar:na]
> at okhttp3.RealCall.getResponse(RealCall.java:244) ~[okhttp-3.3.0.jar:na]
> at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
> ~[okhttp-3.3.0.jar:na]
> at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
> ~[okhttp-3.3.0.jar:na]
> at okhttp3.RealCall.execute(RealCall.java:57) ~[okhttp-3.3.0.jar:na]
> at retrofit2.OkHttpCall.execute(OkHttpCall.java:174) ~[retrofit-2.1.0.jar:na]
> at
> org.apache.drill.exec.store.openTSDB.client.services.ServiceImpl.getTableNames(ServiceImpl.java:102)
> [drill-opentsdb-storage-1.13.0-mapr.jar:1.13.0-mapr]
> ... 33 common frames omitted
> Caused by: java.net.SocketException: Socket closed
> at java.net.SocketInputStream.read(SocketInputStream.java:204) ~[na:1.8.0_144]
> at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[na:1.8.0_144]
> at okio.Okio$2.read(Okio.java:140) ~[okio-1.8.0.jar:na]
> at okio.AsyncTimeout$2.read(AsyncTimeout.java:238) ~[okio-1.8.0.jar:na]
> ... 48 common frames omitted
> 2019-01-07 15:36:35,221 [23cc39aa-2618-e9f0-e77e-4fafa6edc314:frag:0:0] INFO
> o.a.d.e.w.fragment.FragmentExecutor -
> 23cc39aa-2618-e9f0-e77e-4fafa6edc314:0:0: State change requested
> AWAITING_ALLOCATION --> FAILED
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)