In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "hbase installation and hbase shell usage sharing". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "hbase installation and hbase shell usage sharing".
The installation method of Hbase is basically the same as that of hadoop:
There are three modes: stand-alone mode, pseudo-distributed mode, and fully distributed mode.
Pre-installation environment: in a fully distributed environment, each node parses DNS, JAVA environment and password-free ssh
Apache download image: http://www.apache.org/dyn/closer.cgi/hbase/
Edit configuration file conf/hbase-site.xml
Hbase.rootdir file:///DIRECTORY/hbase file directory; hbase.cluster.distributed enables distributed mode; default should be enabled; true
Overwrite the jar package:
Since HBase relies on Hadoop, it publishes a Hadoopjar file under its lib. This suite of jar is used only in stand-alone mode. In distributed mode, the Hadoop version must be the same as the version under HBase. Replace the Hadoop jar file in the HBaselib directory with the distributed Hadoop version jar file you are running to avoid version mismatch. Confirm that the jar files under all HBase in the cluster have been replaced. Hadoop version mismatch problems behave differently, but they all look like they are dead.
Version selection questions:
HBase-0.92.xHBase-0.94.xHBase-0.96
Hadoop-0.20.205
S
X
X
Hadoop-0.22.x
S
X
X
Hadoop-1.0.xS
S
S
Hadoop-1.1.xNT
S
S
Hadoop-0.23.xX
S
NT
Hadoop-2.xX
S
S
S = supported and tested, support
X = not supported, not supported
NT = not tested enough. It can be run, but the tests are insufficient.
Start and verify hbase:
#. / bin/start-hbase.shstarting Master,logging to logs/hbase-user-master-example.org.out# jps6022 Jps4150 SecondaryNamenode5898 HRegionServer does not have this process on a stand-alone machine 5789 HMaster5898 HQuorumPeer4072 NameNode4367 JobTracker
HBase Shell Learning:
Connect to hbase with shell:
#. / bin/hbase shell
Create a table named test with a column family lz
Hbase (main): 003cf'0row 0 > create 'test',' cf'0row (s) in 1.2200 secondshbase (main): 003test', 0 > list 'table'test1row (s) in 0.0550 seconds
Note: under this shell, all table names and column family names should be in quotation marks.
Add several rows of values to the test table family lz:
Hbase (main): 004 lz:a', 0 > put 'test',' row1', 'lz:a',' value1'0row (s) in 0.0560 secondshbase (main): 005 test', 0 > put 'test',' row2', 'lz:b',' value2'0row (s) in 0.0370 seconds
Scan this table:
Hbase (main): 007test'ROW COLUMN+CELLrow1 column=lz:a 0 > scan 'test'ROW COLUMN+CELLrow1 column=lz:a, timestamp=1288380727188,value=value1row2 column=lz:b, timestamp=1288380738440,value=value22row (s) in 0.0590 seconds
Get the value of a row:
Hbase (main): 008test', 0 > get 'test',' row1'COLUMN CELLlz:a timestamp=1288380727188, value=value11row (s) in 0.0400 seconds
Delete a table: disabled before drop
Hbase (main): 012test'0row (s) in 1.0930 secondshbase (main): 013test'0row 0 > drop 'test'0row (s) in 0.0770 seconds Thank you for reading, the above is the content of "hbase installation and hbase shell usage sharing". After the study of this article, I believe you have a deeper understanding of the installation of hbase and the sharing of hbase shell usage, and the specific use needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.