This is an automated email from the ASF dual-hosted git repository.
luoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/drill-site.git
The following commit(s) were added to refs/heads/master by this push:
new 7ec936d Update doc
7ec936d is described below
commit 7ec936d2723635c7fe29a01440cc6162f84cb7c2
Author: feiteng <[email protected]>
AuthorDate: Sat Dec 18 13:07:03 2021 +0800
Update doc
---
.../drill-metastore/040-mongo-metastore.md | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/_docs/en/performance-tuning/drill-metastore/040-mongo-metastore.md
b/_docs/en/performance-tuning/drill-metastore/040-mongo-metastore.md
index 17fa78b..e6f1d22 100644
--- a/_docs/en/performance-tuning/drill-metastore/040-mongo-metastore.md
+++ b/_docs/en/performance-tuning/drill-metastore/040-mongo-metastore.md
@@ -12,7 +12,7 @@ The Mongo Metastore implementation allows you store Drill
Metastore metadata in
## Configuration
Currently, the Mongo Metastore is not the default implementation.
-To enable the Mongo Metastore create the `drill-metastore-override.conf` file
+To enable the Mongo Metastore, create the `drill-metastore-override.conf` file
in your config directory and specify the Mongo Metastore class:
```yaml
@@ -27,6 +27,10 @@ Use the connection properties to specify how Drill should
connect to your Metast
`drill.metastore.mongo.connection` - connection url to your MongoDB. Required.
+`drill.metastore.mongo.database` - database used. Optional, default is "meta".
+
+`drill.metastore.mongo.table_collection` - collection used to store metadata
for tables. Optional, default is "tables".
+
### Custom configuration
`drill-metastore-override.conf` is used to customize connection details to the
Drill Metastore database.
@@ -38,12 +42,16 @@ See `drill-metastore-override-example.conf` for more
details.
drill.metastore: {
implementation.class: "org.apache.drill.metastore.mongo.MongoMetastore",
mongo: {
- connection: "mongodb://localhost:27017/"
+ connection: "mongodb://localhost:27017/",
+ database: "meta",
+ table_collection: "tables"
}
}
```
-Note: username and password can also be included in the connection url.
+**Note: If your MongoDB enabled access control, make sure the user can read
and write the collection used.
+If you are using a sharded MongoDB cluster, make sure the database used is
enabled sharding,
+and the collection used is only sharded by `_id` in hash mode.**
## Tables structure
@@ -53,6 +61,6 @@ In Drill `tables` component unit is represented by
`TableMetadataUnit` class whi
The `TableMetadataUnit` class holds fields for all five metadata types within
the `tables` component.
Any fields not applicable to a particular metadata type are simply ignored and
remain unset.
-In the Mongo implementation of the Drill Metastore, all metadata of the tables
component stored in
- one collection named `tables` in the `meta` database. The database and
collection will be auto
- created when first write data into it.
+In the Mongo implementation of the Drill Metastore, all metadata of the tables
component stored in one collection.
+The database and collection will be auto created when write data firstly into
it if not exist,
+but you need to configure the database and collection before used as the note
specified above if you are using a sharded cluster.