Cloud large experimental data: Hbase shell command Basic Operation

【Purpose】

    1) Learn hbase Service

    2) learn to start and stop services

    3) learn to enter hbase shell environment

ASSAY PRINCIPLE

    HBase is a distributed, open column-oriented database, as it uses Hadoop HDFS file storage system, the use of massive amounts of data to process Hadoop MapReduce HBase in. Linux arranged hbase environment when the system of the present experiment, the basic operation of the table under hbase hbase the shell environment.

【lab environment】

    The environment is: centos6.5 + jdk1.7.0_79 + hadoop-2.4.1 + hbase

    Toolkits in the / simple / soft directory

[Experimental Procedure]

    An operation table hbase

        1.1 start hadoop service, execute the command start-all.sh, execute commands in terminal linux system: start-hbase.sh Enter start hbase service. Then execute the command: cd /simple/hbase-0.92-hadoop2/bin enter hbasebin directory, perform connection hbase shell command: ./ hbase shell commands into the environment, and then execute the command: create 'test', 'cf' and create a table test the table specifies a column family cf. As shown in Figure 1

 

 

 

figure 1

        1.2 Create test table after the previous operation, and then execute the command: put 'test', 'row1', 'cf: a', 'va' test table column value is added by the behavior of the column group. as shown in picture 2

 

 

 

figure 2

        1.3 If you want to look at the information table test line added, you can execute the command: scan 'test' to see all the information in the test table. As shown in Figure 3

 

 

 

image 3

        1.4 If you want to look at the information table test in a row, you can execute the command: get 'test', 'row1' to see all the information specified in the test line row of the table. As shown in Figure 4

 

 

 

Figure 4

        1.5 If you want to look at information about a column in a data table test ranks of the family, you can execute the command: get 'test', 'row1', 'cf: a' test view the table information specified in a column of a row of family . 5 shown in FIG.

 

 

 

Figure 5

        1.6 If you want to delete the test tables created above, we need to execute the command: disable 'test' so that the table is in an inactive state, then delete the table, you can execute the command: drop 'test' to delete the table. As shown in Figure 6

 

 

 

Image 6

    Second, the exit hbase shell environment

        After 2.1 implementation of the relevant operation is completed in hbase shell environment and want to exit the command environment, you can execute the command: quit to exit. 7 shown in FIG.

 

 

 

Figure 7

Guess you like

Origin www.cnblogs.com/hign/p/11918357.html