1. Enter the command line
Bin/hbase Shell
2. Enter Help to view various command groups.
Commands are grouped, and you can perform the commands that help ' general ' view the general group.
3. Common commands
--What tables are displayedList--displaying DDL information for a tableDescribe'Table name'--Create a tableCreate 'Table name','family name'... Create 'Table name', {NAME='family name', VERSIONS='5'}--Delete a table--Close the table firstDisable'Table name'Drop 'Table name' --Determine if a table is availableIs_enabled'Table name'is_disabled'Table name'--Enable tableEnable'Table name'--Inserting DataPut'Table name','Row Key','Family:column', Value--The same statement can modify the valuePut'Table name','Row Key','Family:column', NewValue--Scan TableScan'Table name'--View information for multiple versionsScan'Table name',{RAW=True,versions=3}--Specifying column familiesScan'TT1',{COLUMN='F1'}--Get ValueGet'Table name','Row Key',[{column=> ' COLUMN ', timestamp= '}]--when you save a value, specify a timestampPut'Table name','Row Key','Family:column', Value,ts--purge Data (disable->drop->create)truncate 'Table name'
* End of statement with no semicolon
Shell Operations for HBase