Hadoop Questions and Answers – HCatalog with Hadoop – 2

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

Answer: b
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

Answer: d
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

Answer: c
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

Answer: c
Explanation: Hive 0.12.0 and earlier releases support writing Pig primitive data types with HCatStorer.

advertisement
advertisement

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

Answer: d
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

Answer: c
Explanation: If a schema is not specified, all the columns in the table will be returned.

Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

7. The first call on the HCatOutputFormat must be ____________
a) setOutputSchema
b) setOutput
c) setOut
d) OutputSchema
View Answer

Answer: b
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

Answer: a
Explanation: The types in an HCatalog table schema determine the types of objects returned for different fields in HCatRecord.

advertisement

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

Answer: b
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

Answer: a
Explanation: Any command which is not supported throws an exception with the message “Operation Not Supported”.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Books in Hadoop.

To practice all interview questions and answers on HCatalog, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.