博客园 首页 私信博主 显示目录 隐藏目录 管理 动画

启动 hbase

How to start the hbase:

The first step to start the hadoop first

cd hadoop

/sbin/start-all.sh

The second step to start the zookeeper

cd zookeeper

/sbin/zkServer.sh start

The third step to start the hbase

cd hbase

/binstart-hbase.sh

/bin/hbase shell 

 

table operate:

create "tableName","info"

scan "tableName"

disable "tableName"

drop "talbeName"

put 表名 行键 列族 列

put "student","0001","StuInfo:Name","Tom Green",1

  • 第一个参数Student为表名;
  • 第二个参数0001为行键的名称,为字符串类型;
  • 第三个参数StuInfo:Name为列族和列的名称,中间用冒号隔开。
  •           列族名必须是已经创建的,否则 HBase 会报错;
  •           列名是临时定义的,因此列族里的列是可以随意扩展的;
  • 第四个参数Tom Green为单元格的值
  • 最后一个参数1为时间戳,如果不设置时间戳,则系统会自动插入当前时间为时间戳。
posted @ 2022-04-18 15:37  CHANG_09  阅读(39)  评论(0)    收藏  举报