Question
a.
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) j#'SUBMIT_TIME' as start, (Long) j#'FINISH_TIME' as end;
c = group b by (id, user, script_name)
d = foreach c generate group.user, group.script_name, (MAX(b.end) - MIN(b.start)/1000;
dump d;
b.
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,
(Long) j#'SUBMIT_TIME' as start, (Long) j#'FINISH_TIME' as end;
c = group b by (id, user, script_name)
d = for c generate group.user, group.script_name, (MAX(b.end) - MIN(b.start)/1000;
dump d;
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.
All of the mentioned
Posted under Hadoop
b = foreach a generate j#'PIG_SCRIPT_ID' as id, j#'USER' as user, j#'JOBNAME' as script_name,
(Long) j#'SUBMIT_TIME' as start, (Long) j#'FINISH_TIME' as end;
c = group b by (id, user, script_name)
d = foreach c generate group.user, group.script_name, (MAX(b.end) - MIN(b.start)/1000;
dump d;
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 find the running time of each script (in seconds)?
Similar Questions
Discover Related MCQs
Q. Which of the following script determines the number of scripts run by user and queue on a cluster?
View solution
Q. Which of the following script is used to check scripts that have failed jobs?
View solution
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
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!