Premium

Cloudera HBase Certification Questions and Answers (Dumps and Practice Questions)



Question : Given the following HBase code:

HTable customers = new HTable(hconf, "customers");
byte [] rowKey = Bytes.toBytes(65);
Put put = new Put(rowKey);
put.add("info".getBytes(), "FirstName".getBytes(), "Kimberly".getBytes());
put.add("info".getBytes(), "LastName".getBytes(), "Grant".getBytes());

What line of code adds this data to the table named "customers"?


 : Given the following HBase code:
1. put.insertRow(customers);
2. put.add(customers);
3. Access Mostly Uused Products by 50000+ Subscribers
4. customers.add(put);


Correct Answer : Get Lastest Questions and Answer :

Explanation: HTable API one of the put method is as below
public void put(Put put)
throws InterruptedIOException,
RetriesExhaustedWithDetailsException
Puts some data in the table.
If isAutoFlush is false, the update is buffered until the internal buffer is full.

Specified by:
put in interface Table
Parameters:
put - The data to put.




Question : Given the following HBase code:
byte [] rowKey = Bytes.toBytes(65);
Get get = new Get(rowKey);
Result result = customers.get(get);

Which one of the following statements is true?


 : Given the following HBase code:
1. The result variable will contain all values from all column families for the row whose key is 65
2. The result variable in this example will always be null
3. Access Mostly Uused Products by 50000+ Subscribers
4. The result variable will not contain any values and can be used for retrieving the column values


Correct Answer : Get Lastest Questions and Answer :

Explanation: public Get(byte[] row)
Create a Get operation for the specified row.
If no further operations are done, this will get the latest version of all columns in all families of the specified row.

Parameters:
row - row key




Question : Given the following HBase code:

byte [] rowKey = Bytes.toBytes(65);
Get get = new Get(rowKey);
get.addFamily("info".getBytes());
Result result = customers.get(get);

Which one of the following statements is true?



 : Given the following HBase code:
1. The method call to addFamily does not compile
2. The result will contain all values from all column families for the row whose key is 65
3. Access Mostly Uused Products by 50000+ Subscribers
4. The result will contain all values from the "info" column qualifier for the row whose key is 65


Correct Answer : Get Lastest Questions and Answer :

Explanation: public Get addFamily(byte[] family)
Get all columns from the specified family.
Overrides previous calls to addColumn for this family.

Parameters:
family - family name
Returns:
the Get object

Related Questions


Question : You want to store clickstream data in HBase. Your data consists of the following:
the source id
the name of the cluster
the url of the click
the datetimestamp for each click
Which rowkey should you use if you want to retrieve the source ids with a scan and sorted with the most recent first?
 : You want to store clickstream data in HBase. Your data consists of the following:
1. (source_id)(Long.MAX_VALUE - (Long)datetimestamp)
2. ((Long)datetimestamp)(source_id)

3. Access Mostly Uused Products by 50000+ Subscribers
4. (source_id)(datetimestamp)(Long.MAX_VALUE)



Question : Given the following HBase code:
byte [] rowKey = Bytes.toBytes(65);
Put put = new Put(rowKey);
put.add("info".getBytes(), "FirstName".getBytes(), "Kimberly".getBytes());
put.add("info".getBytes(), "LastName".getBytes(), "Grant".getBytes());
What does "info" represent?

 : Given the following HBase code:
1. Primary key of the row
2. Column family name
3. Access Mostly Uused Products by 50000+ Subscribers
4. Column value



Question : Given the following HBase code:
byte [] rowKey = Bytes.toBytes(65);
Put put = new Put(rowKey);
put.add("info".getBytes(), "FirstName".getBytes(), "Kimberly".getBytes());
put.add("info".getBytes(), "LastName".getBytes(), "Grant".getBytes());
What does "FirstName" represent?

 : Given the following HBase code:
1. Primary key of the row
2. Column family name
3. Access Mostly Uused Products by 50000+ Subscribers
4. Column value



Question : Given the following HBase code:

HTable customers = new HTable(hconf, "customers");
byte [] rowKey = Bytes.toBytes(65);
Put put = new Put(rowKey);
put.add("info".getBytes(), "FirstName".getBytes(), "Kimberly".getBytes());
put.add("info".getBytes(), "LastName".getBytes(), "Grant".getBytes());

What line of code adds this data to the table named "customers"?


 : Given the following HBase code:
1. put.insertRow(customers);
2. put.add(customers);
3. Access Mostly Uused Products by 50000+ Subscribers
4. customers.add(put);



Question : Given the following HBase code:
byte [] rowKey = Bytes.toBytes(65);
Get get = new Get(rowKey);
Result result = customers.get(get);

Which one of the following statements is true?


 : Given the following HBase code:
1. The result variable will contain all values from all column families for the row whose key is 65
2. The result variable in this example will always be null
3. Access Mostly Uused Products by 50000+ Subscribers
4. The result variable will not contain any values and can be used for retrieving the column values



Question : Given the following HBase code:

byte [] rowKey = Bytes.toBytes(65);
Get get = new Get(rowKey);
get.addFamily("info".getBytes());
Result result = customers.get(get);

Which one of the following statements is true?



 : Given the following HBase code:
1. The method call to addFamily does not compile
2. The result will contain all values from all column families for the row whose key is 65
3. Access Mostly Uused Products by 50000+ Subscribers
4. The result will contain all values from the "info" column qualifier for the row whose key is 65