drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Jaimes III <rafjai...@gmail.com>
Subject Re: Problem querying a sharded MongoDB cluster
Date Wed, 14 Oct 2020 17:32:47 GMT
Hi Boyan,

Have you seen the guide here:
https://drill.apache.org/blog/2014/11/19/sql-on-mongodb/

In short, I think you might want to list the mongod shards in the Drill
config as opposed to pointing it to the router.

Best,
Rafael

On Wed, Oct 14, 2020 at 12:21 PM Boyan Kolev <bkolev@leanxcale.com> wrote:

> Hello,
>
> I am running a MongoDB cluster with 8 shards (8 mongod instances running on
> the same machine) and one mongo router.
> On the same machine, there is a drillbit started.
> I have enabled the mongodb storage, pointing it to the mongos router
> through the "connection" configuration parameter.
> There is a sharded collection named customer.
>
> 1) SELECT COUNT(*) FROM CUSTOMER
> works as expected, i.e. returns the total number of docs, e.g. 1200000;
>
> However:
>
> 2) SELECT * FROM CUSTOMER
> returns no rows;
>
> 3) SELECT * FROM CUSTOMER WHERE c_custkey = 1503;
> returns no rows too;
>
> If I connect with mongo shell to the mongo router:
>
> 4) db.customer.find({c_custkey: 1503})
> returns 1 row as expected;
>
> If I update the mongodb storage configuration to point directly to a mongod
> shard instance instead of the mongo router, queries 2) and 3) work
> correctly;
>
> Any help to make Drill query correctly (and hopefully in parallel) mongodb
> shards will be appreciated.
>
> Thanks,
>
> --
> Boyan Kolev
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message