APACHE PIG QUIZ DESCRIPTION Total Questions −30 00 Max Time − 15:00 Which of the following is an entry in jobconf? pig.job pig.input.dirs pig.feature none 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 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 _______ operator is used to view the step-by-step execution of a series of statements. ILLUSTRATE DESCRIBE STORE EXPLAIN Pig operates in mainly how many nodes? Two Three Four Five You can run Pig in interactive mode using the ______ shell. Grunt FS HDFS 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 The ________ class mimics the behavior of the Main class but gives users a statistics object back. PigRun PigRunner None of the mentioned RunnerPig __________ 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 the default mode? Mapreduce Tez Local All of the mentioned $ pig -x tez_local … will enable ________ mode in Pig. Mapreduce Tez Local None of the mentioned Which of the following script is used to check scripts that have failed jobs? 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 Use the __________ command to run a Pig script that can interact with the Grunt shell (interactive mode). fetch declare run all of the mentioned Which of the following will compile the Pigunit? $pig_trunk ant pigunit-jar $pig_tr ant pigunit-jar $pig_ ant pigunit-jar None 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 Which of the following is shortcut for DUMP operator? de alias d alias q None 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 Pig Latin statements are generally organized in one of the following ways? A LOAD statement to read data from the file system A series of “transformation” statements to process the data A DUMP statement to view results or a STORE statement to save the results 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 You can run Pig in batch mode using __________ Pig shell command Pig scripts Pig options All 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 Which of the following operator is used to view the map reduce execution plans? DUMP DESCRIBE STORE EXPLAIN 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 Point out the correct statement. You can run Pig in either mode using the “pig” command You can run Pig in batch mode using the Grunt shell You can run Pig in interactive mode using the FS shell 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 __________ is a simple xUnit framework that enables you to easily test your Pig scripts. PigUnit PigXUnit PigUnitX All of the mentioned __________ return a list of hdfs files to ship to distributed cache. relativeToAbsolutePath() setUdfContextSignature() getCacheFiles() getShipFiles() 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 Pig Latin is _______ and fits very naturally in the pipeline paradigm while SQL is instead declarative. functional procedural declarative all of the mentioned Previous Next Total Question16 Wrong Answer13 Right Answer13