hadoop hbase install

Posted 良红

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop hbase install 相关的知识,希望对你有一定的参考价值。

reference: http://dblab.xmu.edu.cn/blog/install-hbase/

reference: http://dblab.xmu.edu.cn/blog/2139-2/

wget sudo wget http://archive.apache.org/dist/hbase/1.1.5/hbase-1.1.5-bin.tar.gz
sudo tar zvxf hbase-1.1.5-bin.tar.gz
sudo mv hbase-1.1.5 hbase
sudo chown -R hadoop ./hbase

./hbase/bin/hbase version
2019-01-25 17:23:11,310 INFO [main] util.VersionInfo: HBase 1.1.5
2019-01-25 17:23:11,311 INFO [main] util.VersionInfo: Source code repository git://diocles.local/Volumes/hbase-1.1.5/hbase revision=239b80456118175b340b2e562a5568b5c744252e
2019-01-25 17:23:11,311 INFO [main] util.VersionInfo: Compiled by ndimiduk on Sun May 8 20:29:26 PDT 2016
2019-01-25 17:23:11,312 INFO [main] util.VersionInfo: From source with checksum 7ad8dc6c5daba19e4aab081181a2457d

hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local$ cat ~/.bashrc

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=$PATH:${JAVA_HOME}/bin:/usr/local/hbase/bin

hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local/hbase/conf$ vim hbase-site.xml

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://localhost:9000/hbase</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
</configuration>

 

hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local/hbase$ grep -v ^# ./conf/hbase-env.sh | grep -v ^$
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export HBASE_CLASSPATH=/usr/local/hadoop/conf
export HBASE_OPTS="-XX:+UseConcMarkSweepGC"
export HBASE_MASTER_OPTS="$HBASE_MASTER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
export HBASE_REGIONSERVER_OPTS="$HBASE_REGIONSERVER_OPTS -XX:PermSize=128m -XX:MaxPermSize=128m"
export HBASE_MANAGES_ZK=true

hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local/hbase$ ./bin/stop-hbase.sh
stopping hbase...............
localhost: stopping zookeeper.

hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local/hbase$ jps
1648 SecondaryNameNode
1329 NameNode
8795 Jps
1471 DataNode
hadoop@iZuf68496ttdogcxs22w6sZ:/usr/local/hbase$ ./bin/start-hbase.sh
localhost: starting zookeeper, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-zookeeper-iZuf68496ttdogcxs22w6sZ.out
starting master, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-master-iZuf68496ttdogcxs22w6sZ.out
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
starting regionserver, logging to /usr/local/hbase/bin/../logs/hbase-hadoop-1-regionserver-iZuf68496ttdogcxs22w6sZ.out

note:we need to set hdfs dfs.replication=3

 

start hbase normal, we can find it in hdfs web page.

 

 

hbase(main):010:0> describe \'student\'
Table student is ENABLED
student
COLUMN FAMILIES DESCRIPTION
{NAME => \'Sage\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', BL
OCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'Sdept\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', B
LOCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'Sname\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', B
LOCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'Ssex\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', BL
OCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'course\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\',
BLOCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
5 row(s) in 0.0330 seconds

hbase(main):011:0> disable \'student\'
0 row(s) in 2.4280 seconds

hbase(main):012:0> drop \'student\'
0 row(s) in 1.2700 seconds

hbase(main):013:0> list
TABLE
0 row(s) in 0.0040 seconds

=> []
hbase(main):002:0> create \'student\',\'Sname\',\'Ssex\',\'Sage\',\'Sdept\',\'course\'
0 row(s) in 1.3740 seconds

=> Hbase::Table - student
hbase(main):003:0> scan \'student\'
ROW COLUMN+CELL
0 row(s) in 0.1200 seconds

hbase(main):004:0> describe \'student\'
Table student is ENABLED
student
COLUMN FAMILIES DESCRIPTION
{NAME => \'Sage\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', BL
OCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'Sdept\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', B
LOCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'Sname\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', B
LOCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'Ssex\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\', BL
OCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
{NAME => \'course\', BLOOMFILTER => \'ROW\', VERSIONS => \'1\', IN_MEMORY => \'false\', KEEP_DELETED_CELLS => \'FALSE\', DATA_BLOCK_ENCODING => \'NONE\', TTL => \'FOREVER\', COMPRESSION => \'NONE\', MIN_VERSIONS => \'0\',
BLOCKCACHE => \'true\', BLOCKSIZE => \'65536\', REPLICATION_SCOPE => \'0\'}
5 row(s) in 0.0420 seconds

hbase(main):005:0> put \'student\', \'95001\', \'Sname\', \'LiYing\'
0 row(s) in 0.1100 seconds

hbase(main):006:0> scan \'student\'
ROW COLUMN+CELL
95001 column=Sname:, timestamp=1548640148767, value=LiYing
1 row(s) in 0.0220 seconds

hbase(main):007:0> put \'student\',\'95001\',\'course:math\',\'80\'
0 row(s) in 0.0680 seconds

hbase(main):008:0> scan \'student\'
ROW COLUMN+CELL
95001 column=Sname:, timestamp=1548640148767, value=LiYing
95001 column=course:math, timestamp=1548640220401, value=80
1 row(s) in 0.0170 seconds

hbase(main):009:0> delete \'student\',\'95001\',\'Sname\'
0 row(s) in 0.0300 seconds

hbase(main):011:0> scan \'student\'
ROW COLUMN+CELL
95001 column=course:math, timestamp=1548640220401, value=80
1 row(s) in 0.0170 seconds

hbase(main):012:0> get \'student\',\'95001\'
COLUMN CELL
course:math timestamp=1548640220401, value=80
1 row(s) in 0.0260 seconds

hbase(main):013:0> deleteall \'student\',\'95001\'
0 row(s) in 0.0180 seconds

hbase(main):014:0> scan \'student\'
ROW COLUMN+CELL
0 row(s) in 0.0170 seconds

hbase(main):015:0> disable \'student\'
0 row(s) in 2.2720 seconds


hbase(main):017:0> drop \'student\'
0 row(s) in 1.2530 seconds

hbase(main):018:0> list
TABLE
0 row(s) in 0.0060 seconds

=> []

  

以上是关于hadoop hbase install 的主要内容,如果未能解决你的问题,请参考以下文章

org.apache.hadoop.hbase.PleaseHoldException: Master is initializing

原创Hbase1.2.1集群安装

centos8上安装hbase

Ubuntu下搭建单机版的hadoop+hbase+zookeeper

hadoop/spark/hbase集群 动态缩容/扩容

ubuntu install eclipse-installer