Set Hive in Local / Auto Mode

Setting Hive in “AUTO/LOCAL MODE” comes very handy when you are dealing with small amount of data.
How this works?

Well, suppose you are running some complex hive query, then you know that it will trigger MapReduce job in background and will give you the output.

This approach works well if the data size is huge in hive, but becomes a problem if the data is less in hive table.
The main reason this problem occurs is when MapReduce job is triggered, it is triggered at the server/cluster level and hence every time you run complex queries, it will go to server and launch MapReduce there and then will give the output.

In case of LOCAL/AUTO MODE, if your complex query is launching less than 4 mapper jobs, then that MapReduce job is run locally and you get output of your complex query in less time.

Following are the three commands that you need to set on hive command to run hive in local/auto mode.




In conclusion, if you want the the output of your query in less time, you should go for “LOCAL/AUTO MODE”.

Published by milindjagre

I founded my blog four years ago and am currently working as a Data Scientist Analyst at the Ford Motor Company. I graduated from the University of Connecticut pursuing Master of Science in Business Analytics and Project Management. I am working hard and learning a lot of new things in the field of Data Science. I am a strong believer of constant and directional efforts keeping the teamwork at the highest priority. Please reach out to me at for further information. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: