Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hbase installation of hadoop

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Description:

Hadoop installation: http://kexl908.blog.51cto.com/605006/812494

After Hbase is connected to the above hadoop installation environment, the installation continues, and the environment IP remains unchanged.

1 Hbase software installation hbase installation path: / home/hadoop/hbase/ wget http://mirror.bjtu.edu.cn/apache/hbase/hbase-0.94.4/hbase-0.94.4.tar.gz tar zxvf hbase-0.94.4.tar.gz mv hbase-0.94.4 hbase2 modify configuration file: 2.1vim hbase-env.sh # modify three places JDK path hbase path enable zk29 export JAVA _ HOME=JAVA_HOME=/usr/java/jdk1.7.0_09 32 export HBASE_CLASSPATH=/home/hadoop/hbase/ 107 export HBASE_MANAGES_ZK=true

2.2 modify the hbase-site.sh hbase.rootdir hdfs://192.168.142.137:9000/hbase hbase.cluster.distributed true hbase.master hdfs:192.168.142.137:60000 hbase.tmp.dir / home/hadoop/hbase/tmp hbase.zookeeper.qourum Server hbase.zookeeper.property.clentPort 2181 hbase.zookeeper.property.dataDir / home/hadoop/hbase/zookeeper configuration file description:

2.3 the jar files of Hadoo and Hbase uniformly overwrite the hadoop-core-1.1.1.jar under / home/hadoop/hadoop to / home/hadoop/hbase/lib of hbase. Delete the hadoop-core.xxxx of the previous hbase 3 distribute the hbase file to the Client1 Client2, and then start the service [hadoop@Server bin] $. / start-hbase.sh [hadoop@Server bin] $jps 17066 HRegionServer 17134 Jps 16591 JobTracker 16507 SecondaryNameNode 16908 HQuorumPeer 16351 NameNode 16970 HMaster

4 check installation check basically use the jps command to come out HRegionServer HQuorumPeer HMaster has been successful. For the first time, let's take a look at the web page and enter hbase to verify the operation of the database.

Hbase port authentication: server:60010/master-status server:60030/regionserver.jspserver:60010/zk.jsp

Hbase database verification: [hadoop@Server bin] $. / hbase shellHBase Shell; enter 'help' for list of supported commands.Type "exit" to leave the HBase ShellVersion 0.94.4, r1428173, Thu Jan 3 06:29:56 UTC 2013

Hbase (main): 001row 0 > listTABLE 0 row (s) in 3.2980 seconds

Hbase (main): 003user','f1','f2','f3'0 row 0 > create 'user','f1','f2','f3'0 row (s) in 2.8680 seconds

Hbase (main): 004row 0 > listTABLE user 1 row (s) in 0.0400 seconds

Hbase (main): 005put uNameError 0 > put uNameError: undefined local variable or method `u' for #

Hbase (main): 006 user','1','f1:name','fu'0 row 0 > put 'user','1','f1:name','fu'0 row (s) in 0.2520 seconds

Hbase (main): 007user'ROW COLUMN+CELL 0 > scan 'user'ROW COLUMN+CELL 1 column=f1:name, timestamp=1359095663649, value=fu 1 row (s) in 0.1680 seconds

Description: successfully built the user table, you can now go to the web page to view the information in the previous ROOT META with a user.

5 make Hadoop support Hbase MapReduce in Hbase, encapsulate hadoop MapReduce, so that Hadoop MapReduce can directly use Hbase table as input and output. Therefore, you need to configure the class library that Hadoop introduces into Hbase, as follows

First, stop drops Hbase and Hadoop.

Vim hadoop-env.sh adds export HBASE_HOME=/home/hadoop/hbaseexport HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HBASE_HOME/hbase-0.94.4.jar:$HBASE_HOME/hbase-0.94.4-tests.jar:$HBASE_HOME/conf:$HBASE_HOME/lib/zookeeper-3.4.5.jar:$HBASE_HOME/lib/protobuf-java-2.4.0a.jar at last

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report