0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

初めて HBase を使ってみただけの記録

Last updated at Posted at 2022-09-12

hadoopと組み合わせて使われれる HBase がなんなのか試してみた

あんまいいtutorialがなかった

ref
https://blog.newnius.com/setup-apache-hbase-in-docker.html
https://github.com/big-data-europe/docker-hbase/blob/master/docker-compose-standalone.yml

setup

git clone git@github.com:big-data-europe/docker-hbase.git
cd docker-hbase

docker-compose -f docker-compose-standalone.yml up -d

Dashboard

image.png

この後作ったtest tableの概要だけ見れた

image.png

ZooKeeperが動いてるらしい。いまだになんなのかわかってない。

demo

docker exec -it hbase /bin/bash

hbase shell


create 'test', 'cf'

desc 'test'

list 'test'

put 'test', 'row1', 'cf:a', 'value1'

put 'test', 'row2', 'cf:b', 'value2'

put 'test', 'row3', 'cf:c', 'value3'

scan 'test'

get 'test', 'row1'

HDFSを利用した NoSQL っぽかった。ただのkey valueではないのかな。
このqueryはいまいち意味がわからなかった

まあ、そのうち。

やっぱり遅い

HDFSなので、やっぱり遅かった。 get するだけで5秒かかる. 全部localにあるのに。

root@7cc78d760534:/# time echo "get 'test', 'row1'" | hbase shell -n
2022-09-12 03:42:34,531 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
COLUMN                                      CELL
 cf:a                                       timestamp=1662953978258, value=value1
1 row(s) in 0.2850 seconds

nil

real	0m4.226s
user	0m11.911s
sys	0m0.674s
0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?