How to create multiple column families in an HBase table using the shell

Multi tool use


How to create multiple column families in an HBase table using the shell
Is the process to have multiple "create" commands against the same table? What is the syntax for it?
3 Answers
3
Syntax would be like this :
create '<table name>' , '<column-family1>' , '<column-family2>' etc..
Answer is to use a ruby list: the following creates a table 'app' with three column familes m, f, c:
create 'app',['m','f','c']
This works +1. Thank you.
– 030
Jul 7 '14 at 8:54
The syntax to create Hbase table with multiple column families and versions is as follows:
create 'test', {NAME => 'e', VERSIONS => 5},{NAME => 'r', VERSIONS => 5},{NAME => 'rm', VERSIONS => 5},{NAME => 'rx', VERSIONS => 5},{NAME => 't', VERSIONS => 5},{NAME => 'w', VERSIONS => 5}
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
OK that's another way to do it.
– javadba
May 22 '13 at 17:19