Reputation: 703
I want to create Demo table, for example, named Teacher and specify the number of versions that the table can store, I write the statement like this:
hbase(main):052:0> create 'Teacher', {NAME => 'username',VERSIONS => 2}
An argument ignored (unknown or overridden): username
An argument ignored (unknown or overridden): VERSIONS
ERROR: Table must have at least one column family
but I got the error like above, I don't know how to fix this problem, can you give me some instructions?
Upvotes: 1
Views: 183
Reputation: 4636
I assume you're trying to create the teacher table with a username column family? I don't know why you would do that, personally I would just create a 'cf1' column family and then a username column, but it depends on your use case.
That being said, you're having troubles because that feature is not available in the version of HBase you're using.
help 'create'
create 'Teacher', 'username'
But again, I would do:
create 'teacher', 'cf1' # use a lowercase table name and a single column fam
put 'teacher', 'teacher-1', 'cf1:username', 'teacher1-username'
Upvotes: 1