Examples of cleanupJob()


Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.ShardedJobService.cleanupJob()

  }

  @Test
  public void testCleanupJob() throws Exception {
    ShardedJobService jobService = ShardedJobServiceFactory.getShardedJobService();
    assertTrue(jobService.cleanupJob("testCleanupJob")); // No such job yet
    ShardedJobSettings settings = new ShardedJobSettings.Builder().build();
    ShardedJobController<TestTask> controller = new DummyWorkerController();
    byte[] bytes = new byte[1024 * 1024];
    new Random().nextBytes(bytes);
    TestTask s1 = new TestTask(0, 2, 2, 2, bytes);
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.ShardedJobService.cleanupJob()

    byte[] bytes = new byte[1024 * 1024];
    new Random().nextBytes(bytes);
    TestTask s1 = new TestTask(0, 2, 2, 2, bytes);
    TestTask s2 = new TestTask(1, 2, 2, 1);
    jobService.startJob("testCleanupJob", ImmutableList.of(s1, s2), controller, settings);
    assertFalse(jobService.cleanupJob("testCleanupJob"));
    executeTasksUntilEmpty();
    DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
    assertEquals(3, ds.prepare(new Query()).countEntities(FetchOptions.Builder.withDefaults()));
    assertTrue(jobService.cleanupJob("testCleanupJob"));
    executeTasksUntilEmpty();
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.shardedjob.ShardedJobService.cleanupJob()

    jobService.startJob("testCleanupJob", ImmutableList.of(s1, s2), controller, settings);
    assertFalse(jobService.cleanupJob("testCleanupJob"));
    executeTasksUntilEmpty();
    DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
    assertEquals(3, ds.prepare(new Query()).countEntities(FetchOptions.Builder.withDefaults()));
    assertTrue(jobService.cleanupJob("testCleanupJob"));
    executeTasksUntilEmpty();
    assertEquals(0, ds.prepare(new Query()).countEntities(FetchOptions.Builder.withDefaults()));
  }

  // Tests that an job that has just been initialized returns a reasonable job detail.
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

            throw new IOException(e);
        }
        if(oc.needsTaskCommit(tac)) {
            oc.commitTask(tac);
        }
        oc.cleanupJob(jc);
    }

    @Override
    public String toString() {
        return "PigFile: file: " + this.file + ", append: " + this.append;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

        }

        @Override
        public void cleanupJob(JobContext context) throws IOException {
          try {
            baseOutputCommitter.cleanupJob(context);
          } finally {
            cleanupScratch(context);
          }
        }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

    publishTest(job);
  }

  public void publishTest(Job job) throws Exception {
    OutputCommitter committer = new HCatOutputCommitter(job,null);
    committer.cleanupJob(job);

    Partition part = client.getPartition(dbName, tblName, Arrays.asList("p1"));
    assertNotNull(part);

    StorerInfo storer = InitializeInput.extractStorerInfo(part.getSd(),part.getParameters());
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

                }

                @Override
                public void cleanupJob(JobContext context) throws IOException {
                    try {
                        baseOutputCommitter.cleanupJob(context);
                    } finally {
                        cleanupScratch(context);
                    }
                }
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

            throw new IOException(e);
        }
        if(oc.needsTaskCommit(tac)) {
            oc.commitTask(tac);
        }
        oc.cleanupJob(jc);
    }

    @Override
    public String toString() {
        return "PigFile: file: " + this.file + ", append: " + this.append;
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

    publishTest(job);
  }

  public void publishTest(Job job) throws Exception {
    OutputCommitter committer = new FileOutputCommitterContainer(job,null);
    committer.cleanupJob(job);

    Partition part = client.getPartition(dbName, tblName, Arrays.asList("p1"));
    assertNotNull(part);

    StorerInfo storer = InternalUtil.extractStorerInfo(part.getSd(),part.getParameters());
View Full Code Here

Examples of org.apache.hadoop.mapreduce.OutputCommitter.cleanupJob()

                }

                @Override
                public void cleanupJob(JobContext context) throws IOException {
                    try {
                        baseOutputCommitter.cleanupJob(context);
                    } finally {
                        cleanupScratch(context);
                    }
                }
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.