Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Mac OSXでHBaseを使う

More than 5 years have passed since last update.

環境
OSX 10.9
JDK 1.8.0

で確認。

HBaseインストール

shell
brew install hbase

brew でHadoopも一緒にインストールしてくれる

HBase Server 起動

shell
$start-hbase.sh 
starting master, logging to /usr/local/Cellar/hbase/0.98.6.1/libexec/bin/../logs/hbase-Siori-master-Siori-no-MacBook-Air.local.out

HBase shell 起動

shell
$ hbase shell
2014-10-12 15:36:56,510 INFO  [main] Configuration.deprecation: hadoop.native.lib is deprecated. Instead, use io.native.lib.available
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 0.98.6.1-hadoop2, r96a1af660b33879f19a47e9113bf802ad59c7146, Sun Sep 14 21:27:25 PDT 2014

HBase起動確認

shell
hbase(main):001:0> status
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hbase/0.98.6.1/libexec/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/Cellar/hadoop/2.5.1/libexec/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
2014-10-12 15:37:00,896 WARN  [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
1 servers, 0 dead, 2.0000 average load

エラーがでなかったらOK

HBaseでテーブル作成しテーブルリストを表示

shell
hbase(main):002:0> create 'test_table','column1'
0 row(s) in 5.3470 seconds

=> Hbase::Table - test_table
hbase(main):003:0> list
TABLE                                                                                                                                                                             
test_table                                                                                                                                                                        
1 row(s) in 0.0350 seconds

=> ["test_table"]
hbase(main):004:0> 
AKB428
秋葉原で働くプログラマー
http://akb428.hatenablog.com/
toranoana
とらのあな関連サービスのシステム開発を担う、エンジニア所属会社
https://yumenosora.co.jp/tora-lab
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away