With the fingers counted, today is Wednesday, it means that I have been in contact with Hadoop to build a cluster of Hadoop, HBase, Hive has been four days, the result is I still do not build complete, still struggling. It's a shame to have the whole Hadoop running this week.
Today I think about what to do, in the morning passed the youth road when bought a steamed bread, he actually wanted me two pieces of money!!! is not what nutritious steamed bread, is roadside stall. Take a stroke, vent it.
Today's work to be divided into two sections, the morning is their own next in the study of hbase cluster configuration, encountered the main problem is two, the first is when I configure the slave machine, in the Hbase-site.xml file problems.
<Property>
<Name>hbase.rootdir</Name>
<Value>hdfs://master:9000/hbase</Value>
</Property>
<Property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.master</name>
<value>master:60000</value>
Hbase.rootdir later I use the information of master, or slave information, finally came to the results (although not verified) the use of master information, as well as Hbase.master is the same reason. Don't say this, that is, I wrote it, if you like me to find, it has been, the biggest harvest of the morning is here
Then is the core of the article, you such as you have a machine, you configure a station, unless you are crazy, I give a script for reference.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21st 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
#!/bin/bash
# Author:xirong # date:2015-05-11
##### # hbase data is stored in HDFs, so depending on the Hadoop environment, installing and configuring the HBase environment requires a good hadoop environment # ####
# Unzip files # unzip hbase.zip-d/home/hadoop/(brother Taiwan you see your path like mine is/opt/hbase) # give permission sudo chown-r hadoop:hadoop/home/hadoop/hbase
sudo sed-i' $ A # hbase configuration '/etc/profile sudo sed-i' $ A export path= $PATH:/home/hadoop/hbase/bin '/etc/profile
Source/etc/profile HBase version Echo' Congratilations, HBase have been installed on your machine! '
Echo' Start change hbase-env.sh configuration ... ' Echo' # Add environment variable ' >>/home/hadoop/hbase/conf/hbase-env.sh (also modify it to your own path, back to the same, I will not say) Echo' Export java_home=/opt/jdk1.7.0_75 ' >>/home/hadoop/hbase/conf/hbase-env.sh Echo' Export hbase_classpath=/home/hadoop/hbase/conf ' >>/home/hadoop/hbase/conf/hbase-env.sh Echo' Export hbase_manages_zk=true ' >>/home/hadoop/hbase/conf/hbase-env.sh Echo' Export hbase_home=/home/hadoop/hbase ' >>/home/hadoop/hbase/conf/hbase-env.sh Echo' Export hadoop_home=/home/hadoop/hadoop-2.5.2 ' >>/home/hadoop/hbase/conf/hbase-env.sh Echo' Export hbase_log_dir=/home/hadoop/hbase/logs ' >>/home/hadoop/hbase/conf/hbase-env.sh (Wordy >> This means to append this statement to what is inside)
Echo' Finish hbase-env.sh and start change hbase-site.xml configuration ... ' \cp-f/home/hadoop/hbase/conf/hbase-site.xml/home/hadoop/hbase/conf/hbase-site.xml.bak
Sed-i'/<\/configuration>/d '/home/hadoop/hbase/conf/hbase-site.xml
Sed-i' $ A <property> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <name>hbase.rootdir<\/name> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <value>hdfs:\/\/master:9000\/hbase<\/value> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <\/property> '/home/hadoop/hbase/conf/hbase-site.xml
Sed-i' $ A <property> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <name>hbase.cluster.distributed<\/name> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <value>true<\/value> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <\/property> '/home/hadoop/hbase/conf/hbase-site.xml
Sed-i' $ A <property> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <name>hbase.master<\/name> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <value>master:60000<\/value> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <\/property> '/home/hadoop/hbase/conf/hbase-site.xml
Sed-i' $ A <property> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <name>hbase.zookeeper.quorum<\/name> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <value>master,slave1,slave2<\/value> '/home/hadoop/hbase/conf/hbase-site.xml Sed-i' $ A <\/property> '/home/hadoop/hbase/conf/hbase-site.xml sed-i ' $ A <\/configuration> '/home/hadoop/ Hbase/conf/hbase-site.xml echo \ CP -f/home/hadoop/hbase/conf/regionservers/home/hadoop/hbase/conf/regionservers.bak Span class= "line" >echo ' slave1 ' >>/home/hadoop/hbase/conf/ Regionservers echo ' slave2 ' >>/home/ Hadoop/hbase/conf/regionservers echo ' congratilations, all conf have been changed! Enjoy HBase! ' |
< Span class= "line" > < Span class= "line" > < Span class= "line" > &NBSP;
Excavator Upgrade Road Two (04)--Share an automatically configured script