title: How to make hive run mapreduce jobs concurrently?
body: <p>I'm new to hive and I have encountered a problem,  </p>
  
  <p>I have a table in hive like this:  </p>
  
  <pre><code>create table td(id int, time string, ip string, v1 bigint, v2 int, v3 int,
  v4 int, v5 bigint, v6 int)  PARTITIONED BY(dt STRING)
  ROW FORMAT DELIMITED FIELDS
  TERMINATED BY ','  lines TERMINATED BY '\n' ;  
  </code></pre>
  
  <p>And I run an sql like:</p>
  
  <pre><code>from td
  INSERT OVERWRITE  DIRECTORY '/tmp/total.out' select count(v1)
  INSERT OVERWRITE  DIRECTORY '/tmp/totaldistinct.out' select count(distinct v1)
  INSERT OVERWRITE  DIRECTORY '/tmp/distinctuin.out' select distinct v1
  
  INSERT OVERWRITE  DIRECTORY '/tmp/v4.out' select v4 , count(v1), count(distinct v1) group by v4
  INSERT OVERWRITE  DIRECTORY '/tmp/v3v4.out' select v3, v4 , count(v1), count(distinct v1) group by v3, v4
  
  INSERT OVERWRITE  DIRECTORY '/tmp/v426.out' select count(v1), count(distinct v1)  where v4=2 or v4=6
  INSERT OVERWRITE  DIRECTORY '/tmp/v3v426.out' select v3, count(v1), count(distinct v1) where v4=2 or v4=6 group by v3
  
  INSERT OVERWRITE  DIRECTORY '/tmp/v415.out' select count(v1), count(distinct v1)  where v4=1 or v4=5
  INSERT OVERWRITE  DIRECTORY '/tmp/v3v415.out' select v3, count(v1), count(distinct v1) where v4=1 or v4=5 group by v3
  </code></pre>
  
  <p>it works, and the output result is what I want.  </p>
  
  <p>but there is one problem, hive generate 9 mapreduce jobs and run these jobs one by one.  </p>
  
  <p>I run explain on this query, and I got the following message:  </p>
  
  <pre><code>STAGE DEPENDENCIES:
    Stage-9 is a root stage
    Stage-0 depends on stages: Stage-9
    Stage-10 depends on stages: Stage-9
    Stage-1 depends on stages: Stage-10
    Stage-11 depends on stages: Stage-9
    Stage-2 depends on stages: Stage-11
    Stage-12 depends on stages: Stage-9
    Stage-3 depends on stages: Stage-12
    Stage-13 depends on stages: Stage-9
    Stage-4 depends on stages: Stage-13
    Stage-14 depends on stages: Stage-9
    Stage-5 depends on stages: Stage-14
    Stage-15 depends on stages: Stage-9
    Stage-6 depends on stages: Stage-15
    Stage-16 depends on stages: Stage-9
    Stage-7 depends on stages: Stage-16
    Stage-17 depends on stages: Stage-9
    Stage-8 depends on stages: Stage-17
  </code></pre>
  
  <p>it seems that stage 9-17 is corresponding to mapreduce job 0-8<br>
  but from the explain message above, stage 10-17 only depends on stage 9,<br>
  so I have an question, why job 1-8 can't run concurrently?  </p>
  
  <p>Or how can I make job 1-8 run concurrently?  </p>
  
  <p>Thank you very much for your help!</p>