Create table in hbase

I am new to hbase and hadoop. Anyway, I managed to create a hadoop cluster consisting of 3 machines. Now I need help creating a database.

I have a table "comments" contains the fields:

  • user ID
  • comments
  • comments on comments (which may be more than one) and a status field for the same,

Can someone help me build the same with hbase / shell?

+3
source share
2 answers

Here are some useful HBase shell commands for you. Get formatting help to create a table in a shell.

help 'create'
create 'comments', {NAME=>'user_info'}, {NAME=>'comment_data'}

, , , Put. 1 , . user_info, "user_id" "status". 'comment_data'.

(, ), ,

disable 'tableName'
help 'alter'
enable 'tableName' # when done altering

, .

+8

Source: https://habr.com/ru/post/1793838/


All Articles