Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-47327

Internal error while querying external dataset

    XMLWordPrintable

Details

    Description

      Steps to reproduce -
      1. Create a 2 node cluster (cluster version 6.5.0-4960) with each node configured with KV, index and analytics services.
      2. Create following on CBAS -
      Dataverse named x65
      Dataset named x65.y65
      Index i65 on "id" field for dataset x65.y65.
      3. Upgrade the cluster to Enterprise Edition 6.6.0 build 7909.
      4. Create following on CBAS -
      Dataverse named x66
      Dataset named x66.y66
      Index i6t on "id" field for dataset x66.y66.
      Remote link Default.rlink66
      Remote dataset x66.r66 using link Default.rlink66
      External link Default.elink66
      External dataset x66.e66 using link Default.elink66
      5. On running count query for x66.e66, internal error is thrown.

      2021-07-12T04:45:14.167-07:00 INFO CBAS.server.QueryServiceServlet [HttpExecutor(port:8095)-9] handleRequest: <ud>{"host":"10.112.205.101:8091","path":"/query/service","statement":"select count(*) from x66.e66;","pretty":false,"mode":"immediate","clientContextID":"8ccb7316-2663-419b-aef3-1e7a8afee4a4","format":"CLEAN_JSON","timeout":9223372036854775807,"maxResultReads":1,"planFormat":"JSON","expressionTree":false,"rewrittenExpressionTree":false,"logicalPlan":false,"optimizedLogicalPlan":true,"job":false,"profile":"counts","signature":true,"multiStatement":true,"parseOnly":false,"readOnly":false,"maxWarnings":10,"scanConsistency":"not_bounded","scanWait":null}</ud>
      2021-07-12T04:45:14.169-07:00 INFO CBAS.messaging.CCMessageBroker [Executor-8:ClusterController] Received message: ExecuteStatementRequestMessage(id=189, from=9a53e5f549ff22c6bdc69579df13f3e3): <ud>select count(*) from x66.e66;;</ud>
      2021-07-12T04:45:14.192-07:00 INFO CBAS.translator.QueryTranslator [QueryTranslator:1ba675eb-3df3-42cc-9de3-d82253462864] Unable to create adapter
      org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to create adapter
      	at org.apache.asterix.metadata.declared.MetadataProvider.getConfiguredAdapterFactory(MetadataProvider.java:811) ~[asterix-metadata.jar:6.6.0-7909]
      	at org.apache.asterix.metadata.declared.DatasetDataSource.buildDatasourceScanRuntime(DatasetDataSource.java:115) ~[asterix-metadata.jar:6.6.0-7909]
      	at org.apache.asterix.metadata.declared.MetadataProvider.getScannerRuntime(MetadataProvider.java:419) ~[asterix-metadata.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.algebra.operators.physical.DataSourceScanPOperator.contributeRuntimeOperator(DataSourceScanPOperator.java:119) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(AbstractLogicalOperator.java:171) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:111) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlanImpl(PlanCompiler.java:70) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:52) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:111) ~[algebricks-compiler.jar:6.6.0-7909]
      	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:297) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:2171) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$3(QueryTranslator.java:2683) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2815) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2728) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:2698) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:405) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.message.ExecuteStatementRequestMessage.handle(ExecuteStatementRequestMessage.java:155) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.messaging.CCMessageBroker.receivedMessage(CCMessageBroker.java:64) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.hyracks.control.cc.work.ApplicationMessageWork.lambda$notifyMessageBroker$0(ApplicationMessageWork.java:68) ~[hyracks-control-cc.jar:6.6.0-7909]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
      	at java.lang.Thread.run(Unknown Source) [?:?]
      Caused by: java.lang.IllegalStateException: com.couchbase.analytics.common.exceptions.AnalyticsAlgebricksException: CBAS0027: Link x66.elink66 does not exist
      	at com.couchbase.analytics.adapter.AnalyticsAdapterFactory.getLinkDetails(AnalyticsAdapterFactory.java:94) ~[cbas-connector.jar:6.6.0-7909]
      	at com.couchbase.analytics.adapter.AnalyticsAdapterFactory.configure(AnalyticsAdapterFactory.java:52) ~[cbas-connector.jar:6.6.0-7909]
      	at org.apache.asterix.external.provider.AdapterFactoryProvider.getAdapterFactory(AdapterFactoryProvider.java:57) ~[asterix-external-data.jar:6.6.0-7909]
      	at org.apache.asterix.metadata.declared.MetadataProvider.getConfiguredAdapterFactory(MetadataProvider.java:790) ~[asterix-metadata.jar:6.6.0-7909]
      	... 29 more
      2021-07-12T04:45:14.192-07:00 WARN CBAS.apache.asterix [Executor-8:ClusterController] Unable to create adapter
      org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unable to create adapter
      	at org.apache.asterix.metadata.declared.MetadataProvider.getConfiguredAdapterFactory(MetadataProvider.java:811) ~[asterix-metadata.jar:6.6.0-7909]
      	at org.apache.asterix.metadata.declared.DatasetDataSource.buildDatasourceScanRuntime(DatasetDataSource.java:115) ~[asterix-metadata.jar:6.6.0-7909]
      	at org.apache.asterix.metadata.declared.MetadataProvider.getScannerRuntime(MetadataProvider.java:419) ~[asterix-metadata.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.algebra.operators.physical.DataSourceScanPOperator.contributeRuntimeOperator(DataSourceScanPOperator.java:119) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator.contributeRuntimeOperator(AbstractLogicalOperator.java:171) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:111) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compileOpRef(PlanCompiler.java:97) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlanImpl(PlanCompiler.java:70) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.core.jobgen.impl.PlanCompiler.compilePlan(PlanCompiler.java:52) ~[algebricks-core.jar:6.6.0-7909]
      	at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.createJob(HeuristicCompilerFactoryBuilder.java:111) ~[algebricks-compiler.jar:6.6.0-7909]
      	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:297) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:2171) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$3(QueryTranslator.java:2683) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2815) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2728) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:2698) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:405) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.app.message.ExecuteStatementRequestMessage.handle(ExecuteStatementRequestMessage.java:155) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.asterix.messaging.CCMessageBroker.receivedMessage(CCMessageBroker.java:64) ~[asterix-app.jar:6.6.0-7909]
      	at org.apache.hyracks.control.cc.work.ApplicationMessageWork.lambda$notifyMessageBroker$0(ApplicationMessageWork.java:68) ~[hyracks-control-cc.jar:6.6.0-7909]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
      	at java.lang.Thread.run(Unknown Source) [?:?]
      Caused by: java.lang.IllegalStateException: com.couchbase.analytics.common.exceptions.AnalyticsAlgebricksException: CBAS0027: Link x66.elink66 does not exist
      	at com.couchbase.analytics.adapter.AnalyticsAdapterFactory.getLinkDetails(AnalyticsAdapterFactory.java:94) ~[cbas-connector.jar:6.6.0-7909]
      	at com.couchbase.analytics.adapter.AnalyticsAdapterFactory.configure(AnalyticsAdapterFactory.java:52) ~[cbas-connector.jar:6.6.0-7909]
      	at org.apache.asterix.external.provider.AdapterFactoryProvider.getAdapterFactory(AdapterFactoryProvider.java:57) ~[asterix-external-data.jar:6.6.0-7909]
      	at org.apache.asterix.metadata.declared.MetadataProvider.getConfiguredAdapterFactory(MetadataProvider.java:790) ~[asterix-metadata.jar:6.6.0-7909]
      	... 29 more
      

      Attachments

        Issue Links

          Activity

            People

              Hussain.Towaileb Hussain Towaileb
              umang.agrawal Umang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty