APACHE PIG QUIZ DESCRIPTION

Point out the wrong statement.

  • To run Pig in local mode, you need access to a single machine
     

  •  The DISPLAY operator will display the results to your terminal screen
     

  •  To run Pig in mapreduce mode, you need access to a Hadoop cluster and HDFS installation
     

  • All of the mentioned

Point out the wrong statement.

  • The load/store UDFs control how data goes into Pig and comes out of Pig.
     

  • LoadCaster has methods to convert byte arrays to specific types.
     

  •  The meaning of getNext() has changed and is called by Pig runtime to get the last tuple in the data
     

  •  None of the mentioned

Which of the following command can be used for debugging?

  • exec
     

  • execute
     

  • error
     

  • throw

Pig operates in mainly how many nodes?

  • Two
     

  • Three
     

  • Four
     

  • Five

Which of the following is an entry in jobconf?

  • pig.job
     

  • pig.input.dirs
     

  •  pig.feature
     

  • none of the mentioned

Point out the correct statement.

  • During the testing phase of your implementation, you can use LOAD to display results to your terminal screen
     

  •  You can view outer relations as well as relations defined in a nested FOREACH statement
     

  • Hadoop properties are interpreted by Pig
     

  • None of the mentioned

 Point out the correct statement.

  • LoadMeta has methods to convert byte arrays to specific types
     

  • The Pig load/store API is aligned with Hadoop InputFormat class only
     

  • LoadPush has methods to push operations from Pig runtime into loader implementations
     

  • All of the mentioned

Point out the wrong statement.

  • You can run Pig scripts from the command line and from the Grunt shell
     

  •  DECLARE defines a Pig macro
     

  •  Use Pig scripts to place Pig Latin statements and Pig commands in a single file
     

  •  None of the mentioned

Point out the correct statement.

  • Invoke the Grunt shell using the “enter” command
     

  •  Pig does not support jar files
     

  • Both the run and exec commands are useful for debugging because you can modify a Pig script in an editor
     

  •  All of the mentioned

Which of the following has methods to deal with metadata?

  • LoadPushDown
     

  •  LoadMetadata
     

  •  LoadCaster
     

  • All of the mentioned

Which of the following file contains user defined functions (UDFs)?

  • script2-local.pig
     

  • pig.jar
     

  •  tutorial.jar
     

  • excite.log.bz2

Which of the following scripts that generate more than three MapReduce jobs?

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = group a by (j#'PIG_SCRIPT_ID', j#'USER', j#'JOBNAME');
    c = for b generate group.$1, group.$2, COUNT(a);

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = display a by (j#'PIG_SCRIPT_ID', j#'USER', j#'JOBNAME');
    c = foreach b generate group.$1, group.$2, COUNT(a

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = group a by (j#'PIG_SCRIPT_ID', j#'USER', j#'JOBNAME');
    c = foreach b generate group.$1, group.$2, COUNT(a);

  • None of the mentioned

Use the __________ command to run a Pig script that can interact with the Grunt shell (interactive mode).

  • fetch
     

  •  declare
     

  •  run
     

  • all of the mentioned

______ is a framework for collecting and storing script-level statistics for Pig Latin.

  • Pig Stats
     

  •  PStatistics
     

  •  Pig Statistics
     

  •  None of the mentioned

Pig Latin is _______ and fits very naturally in the pipeline paradigm while SQL is instead declarative.

  • functional
     

  • procedural
     

  •  declarative
     

  • all of the mentioned

Point out the wrong statement.

  • Pig can invoke code in language like Java Only
     

  •  Pig enables data workers to write complex data transformations without knowing Java
     

  •  Pig’s simple SQL-like scripting language is called Pig Latin, and appeals to developers already familiar with scripting languages and SQL
     

  • Pig is complete, so you can do all required data manipulations in Apache Hadoop with Pig

_________ are scanned in the order they are specified on the command line.

  • Command line parameters
     

  • Parameter files
     

  •  Declare and default preprocessors
     

  • Both parameter files and command line parameters

___________ method will be called by Pig both in the front end and back end to pass a unique signature to the Loader.

  •  relativeToAbsolutePath()
     

  •  setUdfContextSignature()
     

  • getCacheFiles()
     

  •  getShipFiles()

Which of the following is the default mode?

  • Mapreduce
     

  • Tez
     

  • Local
     

  •  All of the mentioned

A loader implementation should implement __________ if casts (implicit or explicit) from DataByteArray fields to other types need to be supported.

  • LoadPushDown
     

  •  LoadMetadata
     

  •  LoadCaster
     

  • All of the mentioned

In comparison to SQL, Pig uses ______________

  • Lazy evaluation
     

  •  ETL
     

  •  Supports pipeline splits
     

  •  All of the mentioned

Which of the following function is used to read data in PIG?

  • WRITE
     

  •  READ
     

  • LOAD
     

  • None of the mentioned

Which of the following is correct syntax for parameter substitution using cmd?

  • pig {-param param_name = param_value | -param_file file_name} [-debug | -dryrun] script
     

  •  {%declare | %default} param_name param_value
     

  • {%declare | %default} param_name param_value cmd
     

  • All of the mentioned

Point out the wrong statement.

  • ILLUSTRATE operator is used to review how data is transformed through a sequence of Pig Latin statements
     

  •  ILLUSTRATE is based on an example generator
     

  • Several new private classes make it harder for external tools such as Oozie to integrate with Pig statistics
     

  •  None of the mentioned

Point out the correct statement.

  • LoadPredicatePushdown is same as LoadMetadata.setPartitionFilter
     

  • getOutputFormat() is called by Pig to get the InputFormat used by the loader
     

  • Pig works with data from many sources
     

  • None of the mentioned

 $ pig -x tez_local … will enable ________ mode in Pig.

  • Mapreduce
     

  •  Tez
     

  • Local
     

  •  None of the mentioned

Which of the following will run pig in local mode?

  • $ pig -x local …
     

  •  $ pig -x tez_local …
     

  •  $ pig …
     

  • None of the mentioned

You can specify parameter names and parameter values in one of the ways?

  •  As part of a command line.
     

  •  In parameter file, as part of a command line
     

  •  With the declare statement, as part of Pig script
     

  •  All of the mentioned

________ abstract class has three main methods for loading data and for most use cases it would suffice to extend it.

  • Load
     

  • LoadFunc
     

  • FuncLoad
     

  • None of the mentioned

The loader should use ______ method to communicate the load information to the underlying InputFormat.

  •  relativeToAbsolutePath()
     

  •  setUdfContextSignature()
     

  •  getCacheFiles()
     

  • setLocation()