Hadoop Questions and Answers – Pig Latin

This set of Hadoop Multiple Choice Questions & Answers (MCQs) focuses on “Pig Latin”.

1._________ operator is used to review the schema of a relation.
a) DUMP
b) DESCRIBE
c) STORE
d) EXPLAIN
View Answer

Answer: b
Explanation: DESCRIBE returns the schema of a relation.

2. Point out the correct statement.
a) During the testing phase of your implementation, you can use LOAD to display results to your terminal screen
b) You can view outer relations as well as relations defined in a nested FOREACH statement
c) Hadoop properties are interpreted by Pig
d) None of the mentioned
View Answer

Answer: b
Explanation: Viewing outer relations is possible using DESCRIBE operator.

3. Which of the following operator is used to view the map reduce execution plans?
a) DUMP
b) DESCRIBE
c) STORE
d) EXPLAIN
View Answer

Answer: d
Explanation: EXPLAIN displays execution plans.

4. ___________ operator is used to view the step-by-step execution of a series of statements.
a) ILLUSTRATE
b) DESCRIBE
c) STORE
d) EXPLAIN
View Answer

Answer: a
Explanation: ILLUSTRATE allows you to test your programs on small datasets and get faster turnaround times.

advertisement
advertisement

5. Point out the wrong statement.
a) ILLUSTRATE operator is used to review how data is transformed through a sequence of Pig Latin statements
b) ILLUSTRATE is based on an example generator
c) Several new private classes make it harder for external tools such as Oozie to integrate with Pig statistics
d) None of the mentioned
View Answer

Answer: c
Explanation: Several new public classes make it easier for external tools such as Oozie to integrate with Pig statistics.

6. __________ is a framework for collecting and storing script-level statistics for Pig Latin.
a) Pig Stats
b) PStatistics
c) Pig Statistics
d) None of the mentioned
View Answer

Answer: c
Explanation: The new Pig statistics and the existing Hadoop statistics can also be accessed via the Hadoop job history file.

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

7. The ________ class mimics the behavior of the Main class but gives users a statistics object back.
a) PigRun
b) PigRunner
c) RunnerPig
d) None of the mentioned
View Answer

Answer: b
Explanation: Optionally, you can call the API with an implementation of progress listener which will be invoked by Pig runtime during the execution.

8. ___________ is a simple xUnit framework that enables you to easily test your Pig scripts.
a) PigUnit
b) PigXUnit
c) PigUnitX
d) All of the mentioned
View Answer

Answer: b
Explanation: With PigUnit you can perform unit testing, regression testing, and rapid prototyping. No cluster setup is required if you run Pig in local mode.

advertisement

9. Which of the following will compile the Pigunit?
a) $pig_trunk ant pigunit-jar
b) $pig_tr ant pigunit-jar
c) $pig_ ant pigunit-jar
d) None of the mentioned
View Answer

Answer: a
Explanation: The compile will create the pigunit.jar file.

10. PigUnit runs in Pig’s _______ mode by default.
a) local
b) tez
c) mapreduce
d) none of the mentioned
View Answer

Answer: a
Explanation: Local mode does not require a real cluster but a new local one is created each time.

advertisement

Sanfoundry Global Education & Learning Series – Hadoop.

Here’s the list of Best Books in Hadoop.

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.