Big data combat Linux Ubuntu 20.04.1 HBase table management

1. HBase deployed successfully

The prerequisite for HBase deployment is the successful deployment of Hadoop!

2. Download the relevant package from the master node

Download hbase-2.2.6 and zookeeper-3.4.14 from the master node
. Download
$scp -r [email protected]:/app/ hbase-2.2.6 /app
$scp -r [email protected]: /app/zookeeper-3.4.14 /app
Note: The desktop node machine and the master do not have SSH to communicate, so you need to enter a password to access.

3. Modify environment variables and activate

Insert picture description here
Add at the end:

export HBASE_HOME=/app/hbase-2.2.6
export PATH=$PATH:$HBASE_HOME/bin

export ZOOKEEPER_HOME=/app/zookeeper-3.4.14
export PATH=$PATH:$ZOOKEEPER_HOME/bin

4. HBase Shell basic commands

Insert picture description here

5. Start the hbase shell

Note: Turn on the slave node (test machine)!Insert picture description here

5.1 Create a score table

Insert picture description here

5.2 View the structure of the table

Insert picture description here

5.3 Add record

Insert picture description here

Insert picture description here

5.4 Meter reading record

Insert picture description here

Insert picture description here

5.5 Scan Record

Insert picture description here
Insert picture description here
Insert picture description here

5.6 FILTER filter scan records

5.6.1 Scan John's record
Insert picture description here
5.6.2 Scan the class value contains Clou's record
Insert picture description here
5.6.3 Scan the record beginning with 610
Insert picture description here
5.6.4 Only take out the first version of the first column in the key and only the key record.
Insert picture description here
5.6.5 Scan the records in the course of the column family with a score greater than or equal to 85

Insert picture description here
5.7 Delete record
Insert picture description here
Insert picture description here
5.8 Modify and delete table
(add column family)
Insert picture description here
(delete column family)
Insert picture description here
5.9 Delete table (disable+drop)
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_45059457/article/details/109442772