Reply
Highlighted
Explorer
Posts: 25
Registered: ‎07-09-2015
Accepted Solution

Number of MapReduce jobs for single Hive query

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

 

 

Posts: 1,892
Kudos: 432
Solutions: 302
Registered: ‎07-31-2013

Re: Number of MapReduce jobs for single Hive query

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.