hbase (1)21.What is a rowkey in Hbase?
Each row in Hbase is identified by a unique byte of array called row key.

22.What are the two ways in which you can access data from Hbase?
The data in Hbase can be accessed in two ways.

Using the rowkey and table scan for a range of row key values.

Using mapreduce in a batch manner.

23.What are the two types of table design approach in Hbase?
They are − (i) Short and Wide (ii) Tall and Thin

24.In which scenario should we consider creating a short and wide Hbase table?
The short and wide table design is considered when there is

There is a small number of columns

There is a large number of rows

25.In Which scenario should we consider a Tall-thin table design?
The tall and thin table design is considered when there is

There is a large number of columns

There is a small number of rows

26.Give a command to store 4 versions in a table rather than the default 3.
hbase > alter ‘tablename’, {NAME => ‘ColFamily’, VERSIONS => 4}

27.What does the following command do?
hbase > alter ‘tablename’, {NAME => ‘colFamily’, METHOD => ‘delete’}
This command deletes the column family form the table.

28.Give the commands to add a new column family “(newcolfamily”) to a table (“tablename”) which has a existing column family(“oldcolfamily”).

Hbase > disable ‘tablename’
Hbase > alter ‘tablename’ {NAME => ‘oldcolfamily’,NAME=>’newcolfamily’}
Habse > enable ‘tablename’

29.What is the Hbase shell command to only 10 records form a table?

scan ‘tablename’, {LIMIT=>10,
STARTROW=>”start_row”,
STOPROW=>”stop_row”}

30.What does the following command do?
major_compact ‘tablename’

Run a major compaction on the table.

 

You may also like

Leave a Comment