Hadoop Questions and Answers Part-29

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

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

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

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

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

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

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

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

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

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

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