温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

【巨杉数据库Sequoiadb】【咨询】【SequoiaFS】

发布时间:2020-08-10 18:57:04 来源:ITPUB博客 阅读:118 作者:CherylRAnthony 栏目:数据库


问题详细 描述】
如何挂 并指定手工 建的元数据集合,且集合 分区集合?  

【解决方法】
1.
在手工 建了目 和文件的元数据的分区集合后(假 元数据集合 "sequoiafs.metadir_cl" ,文件元数据集合 "sequoiafs.metafile_cl" ,分区 键为 "_id" ),需要 建如下三个索引:
  1
)在目 元数据表中 建复合索引 "NameIndex"
  db.sequoiafs.metadir_cl.createIndex( "NameIndex", { Name:1, Pid:1, _id:1 },{ Unique: true, Enforced :true } ); 

  2 )在文件元数据表中 建复合索引 "NameIndex" "LobOidIndex"
  db.sequoiafs.metafile_cl.createIndex( "NameIndex", { Name:1, Pid:1, _id:1 },{ Unique: true, Enforced :true } );
  db.sequoiafs.metafile_cl.createIndex( "LobOidIndex", { LobOid:1, _id:1 },{ Unique: true, Enforced :true } );
2.
在挂 录时 使用 -d -f 指定自己手工 建的元数据集合,不要指定 --autocreate 生成元数据集合即可。
  $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

详情参考:
http://doc.sequoiadb.com/cn/sequoiadb-cat_id-1525956060-edition_id-302
注】
创建索引时需要注意复合索引字段中的顺序问题,需要把分区键字段放在最后,如将分区键字段放在最前面创建了索引,在后续查找目录时可能会因为无法使用此索引而导致写入目录速度慢等问题。  

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI