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
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
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
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
Explanation: ILLUSTRATE allows you to test your programs on small datasets and get faster turnaround times.
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
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
Explanation: The new Pig statistics and the existing Hadoop statistics can also be accessed via the Hadoop job history file.
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
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
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.
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
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
Explanation: Local mode does not require a real cluster but a new local one is created each time.
Sanfoundry Global Education & Learning Series – Hadoop.
Here’s the list of Best Books in Hadoop.
- Check Programming Books
- Check Hadoop Books
- Practice Programming MCQs
- Apply for Computer Science Internship