Package com.google.appengine.tools.mapreduce

Examples of com.google.appengine.tools.mapreduce.MapReduceState


    try {

      // We get the state back from the job_id parameter. The state is
      // serialized and stored in the datastore, so we pass an instance
      // of the datastore service.
      MapReduceState mrState = MapReduceState.getMapReduceStateFromJobID(
          datastore, jobId);

      // There's a bit of ceremony to get the actual counter. This
      // example is intentionally verbose for clarity. First get all the
      // Counters,
      // then we get the CounterGroup, then we get the Counter, then we
      // get the count.
      Counters counters = mrState.getCounters();
      CounterGroup counterGroup = counters.getGroup("CommentWords");
      Counter counter = counterGroup.findCounter("count");
      long wordCount = counter.getValue(); // Finally!

      // Let's create a special datastore Entity for this value so
View Full Code Here

TOP

Related Classes of com.google.appengine.tools.mapreduce.MapReduceState

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.