Apache Drill - MongoDB plugin

I am using apache drill distributed - but querying to sharded collection giving this error, rest unsharded collection queries are working fine.

org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR: InvalidDefinitionException: No serializer found for class org.bson.types.MinKey and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: org.apache.drill.exec.physical.config.SingleSender[“child”]->org.apache.drill.exec.physical.config.SelectionVectorRemover[“child”]->org.apache.drill.exec.physical.config.Limit[“child”]->org.apache.drill.exec.store.mongo.MongoSubScan[“chunkScanSpecList”]->java.util.ArrayList[354]->org.apache.drill.exec.store.mongo.MongoSubScan$MongoSubScanSpec[“maxFilters”]->java.util.HashMap[“rid”])

Hi @Aayushi_Mangal,

If possible, Please share the connection string and queries that you’re trying to run on sharded collection.

Hi Viraj,

this is the type of basic query:

select * from mongo.dbname.shardedcollection_name limit 1;

Connection string is:
“type”: “mongo”,
“connection”: “mongodb://usr:pwd@mongo-router/?readPreference=secondaryPreferred”,
“enabled”: true

Hi Ayushi,

I tried reproducing the same error with both sharded and un-sharded collection and in the different modes like drill-embedded, drill-localhost, As you said it is working fine with un-sharded collections but as soon as we shard and make the same query it breaks. In my case, It is throwing typecast exception. I also tried building binaries from source and executed the same set of operations. It gives the same error.

I’ve reported this issue to the Drill team and hopefully it will be resolved in the upcoming release.


Thank Viraj,

Thank you so much for your efforts by reproducing it. Can you please share that link that you have reported over drill?

They haven’t opened an issue specifically to the error we’re facing but it will be taken care along with this Github issue. this one.