安裝Hbase_分佈式安裝

[hadoop@master conf]$ pwdshell

/home/hadoop/hbase/confvim

[hadoop@master conf]$ vim hbase-env.sh 分佈式

[hadoop@master conf]$oop

export HBASE_CLASSPATH=/home/hadoop/hadoop/confspa

BASE_MANAGES_ZK=true.net

 

[hadoop@master conf]$ vim hbase-site.xmlserver

 

若是想知道默認參數在哪裏能夠xml

[hadoop@master hbase]$ find . -name "*default*"hadoop

./docs/hbase-default.xmlci

./src/main/resources/hbase-default.xml

[hadoop@master hbase]$ vim src/main/resources/hbase-default.xml

查看

 

 

<configuration>

<property>

<name>hbase.rootdir</name>

<value>hdfs://master:9000/hbase</value>

</property>

<property>

<name>hbase.cluster.distributed</name>

<value>true</value>

</property>

</configuration>

 

 

 

拷貝驅動,由於要支持hadoop

[hadoop@master lib]$ ll hadoop-core-1.0.4.jar

-rw-r--r-- 1 hadoop hadoop 3929148 2014-01-11 hadoop-core-1.0.4.jar

這時候發現是hadoop 1.0.4  咱們使用的是1.2.1

 

這個jar能夠刪除,拷貝新的過來

 

[hadoop@master lib]$ mv hadoop-core-1.0.4.jar hadoop-core-1.0.4.sav

[hadoop@master lib]$ cp /home/hadoop/hadoop/hadoop-core-1.2.1.jar .

[hadoop@master lib]$ ll hadoop-core-1.

hadoop-core-1.0.4.sav  hadoop-core-1.2.1.jar 

 

到這裏僞分佈式ok

 

[hadoop@master conf]$ start-hbase.sh

The authenticity of host 'localhost (127.0.0.1)' can't be established.

RSA key fingerprint is 6d:ef:a5:75:27:1d:7f:60:eb:ef:bc:dc:7c:4d:f7:a4.

Are you sure you want to continue connecting (yes/no)? yes

localhost: Warning: Permanently added 'localhost' (RSA) to the list of known hosts.

localhost: starting zookeeper, logging to /home/hadoop/hbase/logs/hbase-hadoop-zookeeper-master.out

starting master, logging to /home/hadoop/hbase/logs/hbase-hadoop-master-master.out

localhost: starting regionserver, logging to /home/hadoop/hbase/logs/hbase-hadoop-regionserver-master.out

 

 

[hadoop@master conf]$ jps

5248 HRegionServer

5946 NameNode

5068 HMaster

5492 Jps

4953 HQuorumPeer

6189 JobTracker

6108 SecondaryNameNode

 

[hadoop@master conf]$ hbase shell

HBase Shell; enter 'help<RETURN>' for list of supported commands.

Type "exit<RETURN>" to leave the HBase Shell

Version 0.94.16, r1557241, Fri Jan 10 20:10:24 UTC 2014

hbase(main):001:0> status

1 servers, 0 dead, 2.0000 average load

 

hbase(main):002:0> status 'simple'

1 live servers

    master:60020 1414089200727

        requestsPerSecond=0, numberOfOnlineRegions=2, usedHeapMB=30, maxHeapMB=48

0 dead servers

Aggregate load: 0, regions: 2

 

 

[hadoop@master ~]$ hadoop fs -ls /

Found 4 items

drwxr-xr-x   - hadoop supergroup          0 2014-10-24 02:33 /hbase

drwxr-xr-x   - hadoop supergroup          0 2014-10-15 07:42 /home

drwxr-xr-x   - hadoop supergroup          0 2014-10-15 08:38 /system

drwxr-xr-x   - hadoop supergroup          0 2014-10-15 08:33 /user

[hadoop@master ~]$

 

中止hbase

 

 

刪除這些內容

[hadoop@master ~]$ hadoop fs -ls /hbase

Found 7 items

drwxr-xr-x   - hadoop supergroup          0 2014-10-24 02:33 /hbase/-ROOT-

drwxr-xr-x   - hadoop supergroup          0 2014-10-24 02:33 /hbase/.META.

drwxr-xr-x   - hadoop supergroup          0 2014-10-24 02:33 /hbase/.logs

drwxr-xr-x   - hadoop supergroup          0 2014-10-24 02:33 /hbase/.oldlogs

drwxr-xr-x   - hadoop supergroup          0 2014-10-24 02:33 /hbase/.tmp

-rw-r--r--   2 hadoop supergroup         38 2014-10-24 02:33 /hbase/hbase.id

-rw-r--r--   2 hadoop supergroup          3 2014-10-24 02:33 /hbase/hbase.version

 

由於集羣有惟一的東西好比ID

 

[hadoop@master ~]$ stop-hbase.sh

stopping hbase...........

localhost: stopping zookeeper.

 

[hadoop@master ~]$

[hadoop@master ~]$ hadoop fs -rmr /hbase

Deleted hdfs://master:9000/hbase

[hadoop@master ~]$

相關文章
相關標籤/搜索