Engineering Questions with Answers - Multiple Choice Questions

MCQs on Pig Latin

1 - Question

_________ 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 - Question

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 - Question

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 - Question

___________ 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.




5 - Question

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 - Question

__________ 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.




7 - Question

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 - Question

___________ 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.




9 - Question

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 - Question

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.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners