APACHE PIG QUIZ DESCRIPTION

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

  • functional
     

  • procedural
     

  •  declarative
     

  • all of the mentioned

_______ operator is used to view the step-by-step execution of a series of statements.

  • ILLUSTRATE
     

  •  DESCRIBE
     

  • STORE
     

  •  EXPLAIN

___________ 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()

 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

You can run Pig in batch mode using __________

  • Pig shell command
     

  • Pig scripts
     

  •  Pig options
     

  • All 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 code is used to find scripts that use only the default parallelism?

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate (Chararray) j#'STATUS' as status, j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME'

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME' as script_name, (Long) r#'NUMBER_RED

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'QUEUE_NAME' as queue;
    c = group b by (id,

  • None of the mentioned

__________ is a simple xUnit framework that enables you to easily test your Pig scripts.

  • PigUnit
     

  •  PigXUnit
     

  • PigUnitX
     

  • All of the mentioned

Which of the following operator is used to view the map reduce execution plans?

  • DUMP
     

  • DESCRIBE
     

  • STORE
     

  • EXPLAIN

__________ method tells LoadFunc which fields are required in the Pig script.

  • pushProjection()
     

  •  relativeToAbsolutePath()
     

  •  prepareToRead()
     

  • 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

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

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

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

  • Pig Stats
     

  •  PStatistics
     

  •  Pig Statistics
     

  •  None 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 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

Which of the following has methods to deal with metadata?

  • LoadPushDown
     

  •  LoadMetadata
     

  •  LoadCaster
     

  • All of the mentioned

Which of the following script determines the number of scripts run by user and queue on a cluster?
 

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate (Chararray) j#'STATUS' as status, j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME'

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME' as script_name, (Long) r#'NUMBER_RED

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'QUEUE_NAME' as queue;
    c = group b by (id,

  • None of the mentioned
     

__________ method enables the RecordReader associated with the InputFormat provided by the LoadFunc is passed to the LoadFunc.

  • getNext()
     

  •  relativeToAbsolutePath()
     

  • prepareToRead()
     

  •  all of the mentioned

Which of the following is an entry in jobconf?

  • pig.job
     

  • pig.input.dirs
     

  •  pig.feature
     

  • none of the mentioned

You can run Pig in interactive mode using the ______ shell.

  • Grunt
     

  •  FS
     

  • HDFS
     

  •  None of the mentioned

Which of the following is shortcut for DUMP operator?

  • de alias
     

  •  d alias
     

  • q
     

  • None of the mentioned

The ________ class mimics the behavior of the Main class but gives users a statistics object back.

  • PigRun
     

  • PigRunner
     

  • None of the mentioned

  • RunnerPig
     

________ 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

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

__________ return a list of hdfs files to ship to distributed cache.

  • relativeToAbsolutePath()
     

  •  setUdfContextSignature()
     

  • getCacheFiles()
     

  •  getShipFiles()

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

_________ 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

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

  • script2-local.pig
     

  • pig.jar
     

  •  tutorial.jar
     

  • excite.log.bz2

Which of the following find the running time of each script (in seconds)?

  • Check this: Programming Books | Programming MCQs
    a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#&#

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = for a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME' as script_name, 
        &

  • a = load '/mapred/history/done' using HadoopJobHistoryLoader() as (j:map[], m:map[], r:map[]);
    b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'QUEUE_NAME' as queue;
    c = group b by (id,

  • All of the mentioned