Skip to content
Menu
HE'S BLOG
  • Home
  • One Page
  • Home page
  • Links
  • Mac
  • Windows
  • Program
  • AI
HE'S BLOG
2018年6月19日2018年6月19日

Docker Hbase初体验

安装

https://github.com/harisekhon/dockerfiles 中包含N多Hadoop的docker项目,用于体验Hadoop是挺好的选择, 以下是怎么在Docker下体验Hbase项目

下载 Dockerfiles

git clone git@github.com:HariSekhon/Dockerfiles.git
mv Dockerfiles hadoop-docker
cd hadoop-docker

运行Hbase

cd hbase-dev
docker-compose up -d

在浏览器打开
– http://localhost:16010/
如果看到下图, 表名安装成功.

体验

  • 进入hbase容器
cd hbase-dev
docker-compose exec hbase-dev bash
hbase shell
  • list 列出当前tables
hbase(main):001:0> list
TABLE
0 row(s) in 0.3360 seconds

=> []
  • 创建emp表
hbase(main):001:0> create 'emp', 'personal data', 'professional data'
0 row(s) in 1.6220 seconds

=> Hbase::Table - emp
  • 插入数据
hbase(main):003:0> put 'emp','1','personal data:name','raju'
0 row(s) in 0.1370 seconds

hbase(main):005:0> scan 'emp'
ROW                                                  COLUMN+CELL
 1                                                   column=personal data:name, timestamp=1529399837299, value=raju
1 row(s) in 0.0410 seconds
  • 更新数据
hbase(main):012:0> put 'emp','1','personal data:name','raju-1'
0 row(s) in 0.0100 seconds

hbase(main):013:0> scan 'emp'
ROW                                                  COLUMN+CELL
 1                                                   column=personal data:name, timestamp=1529400258739, value=raju-1
1 row(s) in 0.0390 seconds
  • 读取数据
hbase(main):014:0> get 'emp', '1'
COLUMN                                               CELL
 personal data:name                                  timestamp=1529400258739, value=raju-1
1 row(s) in 0.0440 seconds
  • 删除单元格
delete 'emp', '1', 'personal data:name'
  • 删除表的所有单元格
deleteall 'emp','1'
  • 计数
hbase(main):022:0> count 'emp'
0 row(s) in 0.0460 seconds

=> 0

参考

  • https://www.yiibai.com/hbase/hbase_shell.html

近期文章

  • Dify1.3.1安装
  • Gopro 驱动下载
  • Popular models download website
  • Stable diffusion enable remote access
  • Ollama remote access

近期评论

    归档

    • 2025 年 5 月
    • 2025 年 3 月
    • 2025 年 2 月
    • 2024 年 3 月
    • 2023 年 10 月
    • 2023 年 5 月
    • 2023 年 4 月
    • 2022 年 11 月
    • 2022 年 9 月
    • 2022 年 5 月
    • 2022 年 4 月
    • 2022 年 3 月
    • 2022 年 2 月
    • 2022 年 1 月
    • 2021 年 10 月
    • 2021 年 9 月
    • 2021 年 5 月
    • 2020 年 7 月
    • 2020 年 6 月
    • 2020 年 5 月
    • 2020 年 4 月
    • 2020 年 3 月
    • 2019 年 11 月
    • 2019 年 10 月
    • 2018 年 9 月
    • 2018 年 6 月
    • 2018 年 5 月
    • 2018 年 2 月
    • 2017 年 8 月
    • 2016 年 4 月

    分类

    • AI
    • Android
    • Angular
    • Apple Hardware
    • C++
    • Docker
    • Doctine
    • ELK
    • English
    • Hadoop
    • Hbase
    • IDE&Tools
    • Ionic2
    • Javascript
    • jQuery
    • Kubernetes
    • Mac
    • PHP
    • Program
    • Scala
    • Shell
    • SQL
    • Symfony
    • Web
    • Wordpress
    • 一行命令

    其他操作

    • 登录
    • 条目 feed
    • 评论 feed
    • WordPress.org
    ©2025 HE'S BLOG | Powered by WordPress and Superb Themes!