[Sequoia database Sequoiadb] [] [consulting] SequoiaFS how to mount directory and manually create the specified metadata collection, and the collection is a collection of partitions

[Issue] a detailed description of
how to mount directory specified set of metadata and manually created, and the collection is a collection of partition?
[Solution]
1. After manually create a partition set directory and file metadata (assuming that catalog metadata set is: "sequoiafs.metadir_cl", the file metadata collection as: "sequoiafs.metafile_cl", the partition key is " _id "), need to create the following three indexes:
1) create a composite index catalog metadata table" NameIndex ":
db.sequoiafs.metadir_cl.createIndex (" NameIndex ", {the Name: 1, the Pid: 1, the _id: 1 }, {of Unique: to true, the Enforced: to true});
2) to create a composite index "NameIndex" and "LobOidIndex" in the file metadata table:
db.sequoiafs.metafile_cl.createIndex ( "NameIndex", {the Name:. 1, the Pid :. 1, the _id:. 1}, {of Unique: to true, the Enforced: to true});
db.sequoiafs.metafile_cl.createIndex ( "LobOidIndex", {LobOid:. 1, the _id:. 1}, {of Unique: to true, the Enforced: to true} );
2. specify your own metadata created manually using the -d and -f collection at mount directory, do not specify a default --autocreate can generate metadata collection.
$sequoiafs /opt/sequoiadb/mountpoint -i localhost:11810 -l foo.bar -c /opt/sequoiafs/conf/foo_bar/001/ --diagpath /opt/sequoiafs/log/foo_bar/001/ -o big_writes -o auto_unmount -o max_write=131072 -o max_read=131072 -d sequoiafs.metadir_cl -f sequoiafs.metafile_cl

For more details refer to:
Mount directory: http://doc.sequoiadb.com/cn/sequoiadb-cat_id-1525956060-edition_id-302
[Note]
Note that the order problem Composite index fields when creating an index, you need to put the partition key field in the end, such as the partition key field in the top of the index is created, when the follow-up because they can not find the directory may use this index resulting from the write directory slow and so on.

Guess you like

Origin blog.csdn.net/Kamani_msd/article/details/94432439