Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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.