Package org.apache.hadoop.tools.rumen

Examples of org.apache.hadoop.tools.rumen.ZombieJobProducer


    JobSubmitter submitter, String traceIn, Path scratchDir, Configuration conf,
    CountDownLatch startFlag, UserResolver resolver)
    throws IOException {
    return GridmixJobSubmissionPolicy.getPolicy(
      conf, GridmixJobSubmissionPolicy.STRESS).createJobFactory(
      submitter, new ZombieJobProducer(
        createInputStream(
          traceIn), null), scratchDir, conf, startFlag, resolver);
  }
View Full Code Here


    Configuration conf = new Configuration();
    File fin = new File("src" + File.separator + "test" + File.separator
            + "resources" + File.separator + "data" + File.separator
            + "wordcount2.json");
    // read couple jobs from wordcount2.json
    JobStoryProducer jobProducer = new ZombieJobProducer(new Path(
            fin.getAbsolutePath()), null, conf);
    CountDownLatch startFlag = new CountDownLatch(1);
    UserResolver resolver = new SubmitterUserResolver();
    FakeJobSubmitter submitter = new FakeJobSubmitter();
    File ws = new File("target" + File.separator + this.getClass().getName());
View Full Code Here

   * @throws IOException if there was an error.
   */
  protected JobStoryProducer createJobStoryProducer(String traceIn,
      Configuration conf) throws IOException {
    if ("-".equals(traceIn)) {
      return new ZombieJobProducer(System.in, null);
    }
    return new ZombieJobProducer(new Path(traceIn), null, conf);
  }
View Full Code Here

  public ZombieJob getZombieJob(JobID jobId) {
    return zombieJobs.get(jobId);
  }
 
  private Map<JobID, ZombieJob> buildJobStories() throws IOException {
    ZombieJobProducer zjp = new ZombieJobProducer(path,null, conf);
    Map<JobID, ZombieJob> hm = new HashMap<JobID, ZombieJob>();
    ZombieJob zj = zjp.getNextJob();
    while (zj != null) {
      hm.put(zj.getJobID(),zj);
      zj = zjp.getNextJob();
    }
    if (hm.size() == 0) {
      return null;
    } else {
      return hm;
View Full Code Here

    Assert.assertEquals(res, 0);
  }
 
  private int getNumberJobs(Path inputFile, Configuration conf)
      throws IOException {
    ZombieJobProducer jobProducer = new ZombieJobProducer(inputFile, null, conf);
    try {
      int numJobs = 0;
      while (jobProducer.getNextJob() != null) {
        ++numJobs;
      }
      return numJobs;
    } finally {
      jobProducer.close();
    }
  }
View Full Code Here

  protected JobFactory createJobFactory(JobSubmitter submitter, String traceIn,
      Path scratchDir, Configuration conf, CountDownLatch startFlag)
      throws IOException {
     return GridmixJobSubmissionPolicy.getPolicy(
       conf, GridmixJobSubmissionPolicy.STRESS).createJobFactory(
       submitter, new ZombieJobProducer(
         createInputStream(
           traceIn), null), scratchDir, conf, startFlag)}
View Full Code Here

   * @throws java.io.IOException
   */
  public JobFactory(JobSubmitter submitter, InputStream jobTrace,
      Path scratch, Configuration conf, CountDownLatch startFlag)
      throws IOException {
    this(submitter, new ZombieJobProducer(jobTrace, null), scratch, conf,
        startFlag);
  }
View Full Code Here

   * @throws IOException if there was an error.
   */
  protected JobStoryProducer createJobStoryProducer(String traceIn,
      Configuration conf) throws IOException {
    if ("-".equals(traceIn)) {
      return new ZombieJobProducer(System.in, null);
    }
    return new ZombieJobProducer(new Path(traceIn), null, conf);
  }
View Full Code Here

   * @throws java.io.IOException
   */
  public JobFactory(JobSubmitter submitter, InputStream jobTrace,
      Path scratch, Configuration conf, CountDownLatch startFlag,
      UserResolver userResolver) throws IOException {
    this(submitter, new ZombieJobProducer(jobTrace, null), scratch, conf,
        startFlag, userResolver);
  }
View Full Code Here

   * @throws IOException if there was an error.
   */
  protected JobStoryProducer createJobStoryProducer(String traceIn,
      Configuration conf) throws IOException {
    if ("-".equals(traceIn)) {
      return new ZombieJobProducer(System.in, null);
    }
    return new ZombieJobProducer(new Path(traceIn), null, conf);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.tools.rumen.ZombieJobProducer

Copyright © 2018 www.massapicom. 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.