Examples of IncrementalTaskContext


Examples of com.google.appengine.tools.mapreduce.impl.IncrementalTaskContext

  private static final class MapSortContext extends SortContext {

    @SuppressWarnings("serial")
    public MapSortContext() {
      super(new IncrementalTaskContext("TestJob", 1, 1, "calls", "time"),
        new OutputWriter<KeyValue<ByteBuffer, List<ByteBuffer>>>() {

        @Override
        public void write(KeyValue<ByteBuffer, List<ByteBuffer>> value) {
          throw new UnsupportedOperationException();
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.IncrementalTaskContext

  private int total = 0;
  private int slicesRemaining;

  public TestTask(int shardId, int shardCount, int valueToYield, int numSlices, byte... payload) {
    this.context =
        new IncrementalTaskContext("TestMR", shardId, shardCount, "testCalls", "testCallsMillis");
    this.valueToYield = valueToYield;
    slicesRemaining = numSlices;
    this.initialPayload = payload;
  }
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.IncrementalTaskContext

          shardObject.put("active", false);
          shardObject.put("result_status", taskState.getStatus().getStatusCode());
        }
        IncrementalTask task = taskState.getTask();
        if (task instanceof IncrementalTaskWithContext) {
          IncrementalTaskContext context = ((IncrementalTaskWithContext) task).getContext();
          totalCounters.addAll(context.getCounters());
          workerCallCounts[i] = context.getWorkerCallCount();
          shardObject.put("last_work_item", context.getLastWorkItemString());
        }
        shardArray.put(shardObject);
        i++;
      }
      jobObject.put("counters", toJson(totalCounters));
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.IncrementalTaskContext

  private final Integer sortReadTimeMillis;  // Only null as a result of an old version.

  public SortShardTask(String mrJobId, int shardNumber, int shardCount,
      InputReader<KeyValue<ByteBuffer, ByteBuffer>> in, SortWorker worker,
      OutputWriter<KeyValue<ByteBuffer, List<ByteBuffer>>> out, int sortReadTimeMillis) {
    super(new IncrementalTaskContext(mrJobId, shardNumber, shardCount, SORT_CALLS,
        SORT_WALLTIME_MILLIS));
    this.sortReadTimeMillis = sortReadTimeMillis;
    this.in = checkNotNull(in, "Null in");
    this.out = checkNotNull(out, "Null out");
    this.inMemSorter = worker;
View Full Code Here

Examples of com.google.appengine.tools.mapreduce.impl.IncrementalTaskContext

  private final Integer sortReadTimeMillis; // Only null as a result of an old version.

  public MergeShardTask(String mrJobId, int shardNumber, int shardCount,
      InputReader<KeyValue<ByteBuffer, Iterator<ByteBuffer>>> in,
      OutputWriter<KeyValue<ByteBuffer, List<ByteBuffer>>> out, int sortReadTimeMillis) {
    super(new IncrementalTaskContext(mrJobId, shardNumber, shardCount, MERGE_CALLS,
        MERGE_WALLTIME_MILLIS));
    this.sortReadTimeMillis = sortReadTimeMillis;
    this.in = checkNotNull(in, "Null in");
    this.out = checkNotNull(out, "Null out");
    this.worker = new MergeWorker();
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.