Package org.apache.hadoop.mapred

Examples of org.apache.hadoop.mapred.MiniMRCluster.shutdown()


      job.setReducerClass(IndexTableReducer.class);
      job.setOutputFormatClass(IndexOutputFormat.class);
      FileOutputFormat.setOutputPath(job, new Path(INDEX_DIR));
      job.waitForCompletion(true);
    } finally {
      mrCluster.shutdown();
    }

    if (printResults) {
      LOG.info("Print table contents after map/reduce");
    }
View Full Code Here


      jobConf.setOutputFormat(IndexOutputFormat.class);

      JobClient.runJob(jobConf);

    } finally {
      mrCluster.shutdown();
    }

    if (printResults) {
      LOG.info("Print table contents after map/reduce");
    }
View Full Code Here

      mr = new MiniMRCluster(2, "file:///", 3);
      Configuration conf = mr.createJobConf();
      runWordCount(conf);
      runMultiFileWordCount(conf);
    } finally {
      if (mr != null) { mr.shutdown(); }
    }
  }

  public static class TrackingTextInputFormat extends TextInputFormat {
View Full Code Here

      runProgram(mr, dfs, wordCountPart,
                 inputPath, outputPath, 3, 2, fixedPartitionOutput, null);
      runNonPipedProgram(mr, dfs, wordCountNoPipes, null);
      mr.waitUntilIdle();
    } finally {
      mr.shutdown();
      dfs.shutdown();
    }
  }

View Full Code Here

      TaskReport[] reports = job.jc_.getMapTaskReports(job.jobId_);
      assertEquals(1, reports.length);
      assertEquals("starting echo > sort", reports[0].getState());
    } finally {
      if (fs != null) { clean(fs); }
      if (mr != null) { mr.shutdown(); }
    }
  }
}
View Full Code Here

        System.out.println(line);
      }
      assertEquals(cacheString + "\t", line);
    } finally{
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown();}
    }
   
  }

  public static void main(String[]args) throws Exception
View Full Code Here

      logs = fs.globStatus(new Path(namenode+"/logs/part*"));
      assertTrue("Unexpected map count, logs.length=" + logs.length,
          logs.length == 1);
    } finally {
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown(); }
    }
  }

  public void testLimits() throws Exception {
    Configuration conf = new Configuration();
View Full Code Here

      }
      assertEquals(cacheString + "\t", line);
      assertEquals(cacheString2 + "\t", line2);
    } finally{
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown();}
    }
  }

  public static void main(String[]args) throws Exception
  {
View Full Code Here

        System.out.println(line);
      }
      assertEquals(cacheString + "\t", line);
    } finally{
      if (dfs != null) { dfs.shutdown(); }
      if (mr != null) { mr.shutdown();}
    }
   
  }

  public static void main(String[]args) throws Exception
View Full Code Here

      runProgram(mr, dfs, wordCountPart,
                 inputPath, outputPath, 3, 2, fixedPartitionOutput, null);
      runNonPipedProgram(mr, dfs, wordCountNoPipes, null);
      mr.waitUntilIdle();
    } finally {
      mr.shutdown();
      dfs.shutdown();
    }
  }

View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.