简体   繁体   English

hbase模式设计-模板-继承

[英]hbase schema design - Template - Inheritance

I have a requirement to display a parent child relationship. 我需要显示父子关系。 Other than the display parent/child would not have anything in common. 除了显示父/子之外,不会有任何共同之处。 The properties for each node will be inherited from Template. 每个节点的属性将从模板继承。 Only admin user can add/ edit Template node property's default values, which will get reflected to the user created nodes and they can override the template properties. 只有管​​理员用户可以添加/编辑模板节点属性的默认值,这些默认值将反映到用户创建的节点上,并且它们可以覆盖模板属性。

I had this structure in mySql. 我在mySql中有此结构。 Now I am redesigning with Hbase (Huge Data). 现在,我正在使用Hbase(巨大数据)进行重新设计。 The project is at its early stage. 该项目尚处于初期阶段。

Please suggest me an perfect schema design for this. 请为我建议一个完美的模式设计。 I am trying with Node/Edge design. 我正在尝试使用节点/边缘设计。 Is there any other alternatives? 还有其他选择吗?

PS-I am new to Hbase PS-我是Hbase的新手

I am following the below schema. 我正在遵循以下架构。

RowKey        | CF(a)                  
node-UUID     | t-node-UUID:"dummy"
              | p-node-UUID:"dummy"
              | c-node-UUID:"dummy"
              | i-node-UUID:"dummy"

and then in code, Separated key with prefix 't-' for template nodes, 'p-' for parent nodes, 'c-' for child nodes, 'i-' for instances. 然后在代码中,模板节点的前缀为“ t-”的分隔键,父节点为“ p-”,子节点为“ c-”,实例为“ i-”。

Please answer if you have any other better idea. 如果您还有其他更好的主意,请回答。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM