Question
a.
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' as script_name, j#'JOBID' as job;
c = filter b by status != 'SUCCESS';
dump c;
b.
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_REDUCES' as reduces;
c = group b by (id, user, script_name) parallel 10;
d = foreach c generate group.user, group.script_name, MAX(b.reduces) as max_reduces;
e = filter d by max_reduces == 1;
dump e;
c.
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, user, queue) parallel 10;
d = foreach c generate group.user, group.queue, COUNT(b);
dump d;
d.
None of the mentioned
Posted under Hadoop
b = foreach a generate (Chararray) j#'STATUS' as status, j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME' as script_name, j#'JOBID' as job;
c = filter b by status != 'SUCCESS';
dump c;
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Which of the following script is used to check scripts that have failed jobs?
Similar Questions
Discover Related MCQs
Q. Which of the following code is used to find scripts that use only the default parallelism?
View solution
Q. Pig Latin is _______ and fits very naturally in the pipeline paradigm while SQL is instead declarative.
View solution
Q. In comparison to SQL, Pig uses ______________
View solution
Q. Which of the following is an entry in jobconf?
View solution
Q. Point out the correct statement.
View solution
Q. Point out the wrong statement.
View solution
Q. Point out the correct statement.
View solution
Q. Point out the wrong statement.
View solution
Q. Point out the correct statement.
View solution
Q. Point out the wrong statement.
View solution
Q. Point out the correct statement.
View solution
Q. Point out the wrong statement.
View solution
Q. Point out the correct statement.
View solution
Q. Point out the wrong statement.
View solution
Q. Which of the following is not true about Pig?
View solution
Q. Which of the following is/are a feature of Pig?
View solution
Q. In which year apache Pig was released?
View solution
Q. Which of the following company has developed PIG?
View solution
Q. Which of the following is true statement?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Hadoop? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!