when you are writing a file, it will need an application to create and write the file. Thats why the mapreduce job to create the file.
Where as for other way when its displayed on console, its just hdfs cat operation On Fri, Feb 14, 2014 at 4:13 PM, Sreenath <sreenaths1...@gmail.com> wrote: > i have two queries > 1. select * from tab1 limit 3; > this returns the 3 rows quickly withoput launcing any map reduce jobs; > > 2. INSERT OVERWRITE LOCAL DIRECTORY "/tmp/query1/" select * from tab1 > limit 3; > but the same above query to write to a local directory launches a map > reduce job and scans through all the rows launching map-reduce jobs > > why the differenceinexecution of both queries? > > -- > Sreenath S Kamath > Bangalore > Ph No:+91-9590989106 > -- Nitin Pawar