Package com.google.appengine.tools.mapreduce

Examples of com.google.appengine.tools.mapreduce.Counters.addAll()


          }

          @Override
          public void completed(Iterator<WorkerShardTask<I, O, MapOnlyMapperContext<O>>> tasks) {
            while (tasks.hasNext()) {
              counters.addAll(tasks.next().getContext().getCounters());
            }
          }
        });
    log.info("Map completed");
    log.info("combined counters=" + counters);
View Full Code Here


          @Override
          public void completed(
              Iterator<WorkerShardTask<I, KeyValue<K, V>, MapperContext<K, V>>> tasks) {
            while (tasks.hasNext()) {
              counters.addAll(tasks.next().getContext().getCounters());
            }
          }
        });
    log.info("Map phase completed");
    log.info("combined counters=" + counters);
View Full Code Here

          new ReduceShardTask<>(id, shard, outputs.size(), getReducerInputReader(inputs.get(shard)),
              getCopyOfReducer(), outputs.get(shard), Long.MAX_VALUE);
      tasks.add(task);
    }
    final Counters counters = new CountersImpl();
    counters.addAll(mapCounters);
    InProcessShardedJobRunner.runJob(tasks.build(), new ShardedJobController<
        WorkerShardTask<KeyValue<K, Iterator<V>>, O, ReducerContext<O>>>() {
      // Not really meant to be serialized, but avoid warning.
      private static final long serialVersionUID = 575338448598450119L;
View Full Code Here

      @Override
      public void completed(
          Iterator<WorkerShardTask<KeyValue<K, Iterator<V>>, O, ReducerContext<O>>> tasks) {
        while (tasks.hasNext()) {
          counters.addAll(tasks.next().getContext().getCounters());
        }
      }
    });
    log.info("Reduce phase completed, reduce counters=" + counters);
    log.info("combined counters=" + counters);
View Full Code Here

          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++;
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.