This set of Interview Questions & Answers focuses on “HCatalog with Hadoop – 2”.
1. _________________ property allow users to override the expiry time specified.
a) hcat.desired.partition.num.splits
b) hcatalog.hive.client.cache.expiry.time
c) hcatalog.hive.client.cache.disabled
d) hcat.append.limit
View Answer
Explanation: This property is an int, and specifies number of seconds.
2. Point out the correct statement.
a) The HCatLoader and HCatStorer interfaces are used with Pig scripts to read and write data in HCatalog-managed tables
b) HCatalog is not thread safe
c) HCatLoader is used with Pig scripts to read data from HCatalog-managed tables.
d) All of the mentioned
View Answer
Explanation: HCatLoader is accessed via a Pig load statement.
3. ____________ is used with Pig scripts to write data to HCatalog-managed tables.
a) HamaStorer
b) HCatStam
c) HCatStorer
d) All of the mentioned
View Answer
Explanation: HCatStorer is accessed via a Pig store statement.
4. Hive does not have a data type corresponding to the ____________ type in Pig.
a) decimal
b) short
c) biginteger
d) datetime
View Answer
Explanation: Hive 0.12.0 and earlier releases support writing Pig primitive data types with HCatStorer.
5. Point out the wrong statement.
a) The Hive metastore lets you create tables without specifying a database
b) Restrictions apply to the types of columns HCatLoader can read from HCatalog-managed tables
c) If the table is partitioned, you can indicate which partitions to scan by immediately following the load statement with a partition filter statement
d) None of the mentioned
View Answer
Explanation: If you created tables using metastore, then the database name is ‘default’ and is not required when specifying the table for HCatLoader.
6. _______________ method is used to include a projection schema, to specify the output fields.
a) OutputSchema
b) setOut
c) setOutputSchema
d) none of the mentioned
View Answer
Explanation: If a schema is not specified, all the columns in the table will be returned.
7. The first call on the HCatOutputFormat must be ____________
a) setOutputSchema
b) setOutput
c) setOut
d) OutputSchema
View Answer
Explanation: Any other call will throw an exception saying the output format is not initialized.
8. ___________ is the type supported for storing values in HCatalog tables.
a) HCatRecord
b) HCatColumns
c) HCatValues
d) All of the mentioned
View Answer
Explanation: The types in an HCatalog table schema determine the types of objects returned for different fields in HCatRecord.
9. The output descriptor for the table to be written is created by calling ____________
a) OutputJobInfo.describe
b) OutputJobInfo.create
c) OutputJobInfo.put
d) None of the mentioned
View Answer
Explanation: The implementation of Map takes HCatRecord as an input and the implementation of Reduce produces it as an output.
10. Which of the following Hive commands is not supported by HCatalog?
a) ALTER INDEX … REBUILD
b) CREATE VIEW
c) SHOW FUNCTIONS
d) DROP TABLE
View Answer
Explanation: Any command which is not supported throws an exception with the message “Operation Not Supported”.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Check Hadoop Books
- Check Programming Books
- Practice Programming MCQs
- Apply for Computer Science Internship