Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Number of MapReduce jobs for single Hive query

SOLVED Go to solution

Number of MapReduce jobs for single Hive query

Explorer

Hi,

 

How to find out the number of MapReduce jobs for single Hive query?

Could you please let me know if I execute below query how many mapreduce jobs will be launched and the squence of these jobs.

 

select col1, col2, sum(col3), count(col4), avg(col5) from sample_table where col1=condition;

 

Thanks in advance

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Number of MapReduce jobs for single Hive query

Master Guru
You can run an EXPLAIN on a query to see how Hive would plan to run the query (how many phases). This will help you get a sense of 'how many jobs' or something close to it.

Your query is invalid in HiveQL, but with GROUP BY statements further added for col1 and col2 to make it legal, it would take a single job.
1 REPLY 1

Re: Number of MapReduce jobs for single Hive query

Master Guru
You can run an EXPLAIN on a query to see how Hive would plan to run the query (how many phases). This will help you get a sense of 'how many jobs' or something close to it.

Your query is invalid in HiveQL, but with GROUP BY statements further added for col1 and col2 to make it legal, it would take a single job.