Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Number of MapReduce jobs for single Hive query

avatar
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

avatar
Mentor
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.

View solution in original post

1 REPLY 1

avatar
Mentor
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.