Premium

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



Question : You have created an HBase application called Acmeshell and from within Acmeshell, you want to create a new table named AcmeLogs.
In this AcmeLogs table you will be storing 2 Billion Mobile advertisement and its clickstream information. You start with the following Java code:
You have already created HBaseAdmin object ( name of object acmeAdmin)using the configuration as well as HTableDescriptor with
table name "AcmeLogs". Now you want to finally create the table using HTableDescriptor, select the correct command.
  :  You have created an HBase application called Acmeshell and from within Acmeshell, you want to create a new table named AcmeLogs.
1. HTable.createTable(acmeTable);
2. HBaseAdmin.createTable(acmeTable);
3. Access Mostly Uused Products by 50000+ Subscribers

4. acmeAdmin.createTable(acmeTable);



Correct Answer : Get Lastest Questions and Answer :
Explanation: HBaseAdmin class provides an interface to manage HBase database table metadata and general administrative functions. HBaseAdmin can create, drop, list, enable and disable tables. It can also be used to add and drop table column families. Once you create a table, the table is automatically enabled, so you don't need to callenableTable manually. HBaseAdmin class Configuration configuration = new Configuration();
HBaseAdmin acmeAdmin = new HBaseAdmin(configuration);
HTableDescriptor descriptor = new HTableDescriptor(Bytes.toBytes("tablename"));
HColumnDescriptor columnDescriptor = new HColumnDescriptor(Bytes.toBytes("columnfamilyname"));
descriptor.addFamily(columnDescriptor);
acmeAdmin.createTable(descriptor);
HBase schemas can be created or updated with shell or by using HBaseAdmin in the Java API.
Tables must be disabled when making ColumnFamily modifications, for example:
Configuration config = HBaseConfiguration.create();
HBaseAdmin admin = new HBaseAdmin(conf);
String table = "myTable";
admin.disableTable(table);
HColumnDescriptor cf1 = ...;
admin.addColumn(table, cf1); // adding new ColumnFamily
HColumnDescriptor cf2 = ...;
admin.modifyColumn(table, cf2); // modifying existing ColumnFamily
admin.enableTable(table);
public static void createSchemaTables (Configuration config) {
try { final HBaseAdmin admin = new HBaseAdmin(config);
HTableDescriptor table = new HTableDescriptor(TableName.valueOf(TABLE_NAME));
table.addFamily(new HColumnDescriptor(CF_DEFAULT).setCompressionType(Algorithm.SNAPPY));
System.out.print("Creating table. ");
createOrOverwrite(admin, table);
System.out.println(" Done.");
admin.close();





Question : You have created an advertising application based on HBase called Acmeshell
in Acmeshell you wish to insert text using the add method, with the add text you also want to store the time when the click happened
on the advertisement, in HBase select the correct syntax so that you can also store click timestamp using the Put class?
  :  You have created an advertising application based on HBase called Acmeshell
1. put.add(column_family, column_qualifier, data, click_timestamp)

2. put.add(column_family, column_qualifier, click_timestamp, data)

3. Access Mostly Uused Products by 50000+ Subscribers

4. put.insert(click_timestamp, column_family, column_qualifier, data)




Correct Answer : Get Lastest Questions and Answer :

HBase uses the Put class to write (store data) to an HBase row.

The Put class has add() method with a timestamp input parameter.

The add() method also takes the input parameters: column family, column qualifier, timestamp,and data.

Used to perform Put operations for a single row.

To perform a Put, instantiate a Put object with the row to insert to and for eachumn to be inserted, execute add or add if setting the timestamp.
public Put add(byte[] family,
byte[] qualifier,
long ts,
byte[] value)
Add the specified column and value, with the specified timestamp as its version to this Put operation.
Parameters:
family - family name
qualifier - column qualifier
ts - version timestamp
value - column value




Question :

Select the correct statement for deciding number of column families..
 :
1. Recommend no more than three Column Families
2. Column Families are defined by access scope
3. Access Mostly Uused Products by 50000+ Subscribers
4. All 1,2 and 3 are correct
5. only 1 and 3 are correct



Correct Answer : Get Lastest Questions and Answer :

When deciding number of column families
- Recommend no more than three Column Families
- Flushing and Compaction are per Region basis
If one CF is large the other CFs will also be flushed
- Compaction is triggered by number of files per CF
Not sized-based
- The more Column Families the greater the I/O load
- Column Families are defined by access scope
data across CFs are typically not accessed simultaneously




Related Questions


Question : Which statement is correct regarding the Put operation for inserting the data
 : Which statement is correct regarding the Put operation for inserting the data
1. It doen not replace existing Cell
2. Always creates a new versions of the Cell
3. Default version is the Server's currentTimeMillis
4. Versions can be specified on a per-column basis
5. All of the above




Question : Which of the code segment can be used to explicitely set the version time as

 :  Which of the code segment can be used to explicitely set the version time as
1. put.add(Bytes.toBytes("cf"), Bytes.toBytes("attr1"), 777, Bytes.toBytes(data));
2. put.add(Bytes.toBytes("cf"), Bytes.toBytes("attr1"), "777", Bytes.toBytes(data));
3. put.add(Bytes.toBytes("cf"), Bytes.toBytes("attr1"), Bytes.toBytes(data), "777");
4. None of the above is correct


Question : Which statement is true regarding the data delete in HBase
table

 :  Which statement is true regarding the data delete in HBase
1. Deleted data is not immediately removed
2. Delete creates a tombstone marker
3. Tombstones masks the deleted values
4. Data is removed at major compaction
5. All of the above



Question : Please select the wrong statement regarding the Version delete
 :  Please select the wrong statement regarding the Version delete
1. Deleting all the versions older than a certain timestamp can be
performed on a row, column family or a column
2. Delete version at a specific timestamp and can only be performed
on a column
3. For deletion if not timestamp is specified currentTimeMillis is
used
4. For deletion if not timestamp is specified all the versions will
be deleted


Question : Which command in HBase shell you will use to list all user
tables
 :  Which command in HBase shell you will use to list all user
1. all tables
2. list
3. describe "Column Family Name"
4. status



Question : Which of the following syntex is correct to create t table
undre fam1
 :  Which of the following syntex is correct to create t table
1. create 't1', {NAME => 'fam1'}
2. create 't1', {NAME => 'fam1', VERSIONS => 1}
3. create 't1', 'fam1'
4. All of the above