HBase – Count & Truncate
count You can count the number of rows of a table using the count command. Its syntax is as follows: count ‘<table name>’ After deleting the first row, emp table will have…
count You can count the number of rows of a table using the count command. Its syntax is as follows: count ‘<table name>’ After deleting the first row, emp table will have…
Scaning using HBase Shell The scan command is used to view the data in HTable. Using the scan command, you can get the table data. Its syntax is as follows: scan ‘<table…
Deleting a Specific Cell in a Table Using the delete command, you can delete a specific cell in a table. The syntax of delete command is as follows: delete ‘<table name>’, ‘<row>’, ‘<column name…
Reading Data using HBase Shell The get command and the get() method of HTable class are used to read data from a table in HBase. Using get command, you can get a single row of data at a…
Updating Data using HBase Shell You can update an existing cell value using the put command. To do so, just follow the same syntax and mention your new value as shown below.…
Inserting Data using HBase Shell This chapter demonstrates how to create data in an HBase table. To create data in an HBase table, the following commands and methods are used:…
This chapter describes the java client API for HBase that is used to perform CRUD operations on HBase tables. HBase is written in Java and has a Java Native API. Therefore it…
exit You exit the shell by typing the exit command. hbase(main):021:0> exit Stopping HBase To stop HBase, browse to the HBase home folder and type the following command. ./bin/stop-hbase.sh Stopping HBase Using…
Dropping a Table using HBase Shell Using the drop command, you can delete a table. Before dropping a table, you have to disable it. hbase(main):018:0> disable 'emp' 0 row(s) in 1.4580 seconds…
Existence of Table using HBase Shell You can verify the existence of a table using the exists command. The following example shows how to use this command. hbase(main):024:0> exists 'emp' Table emp…