Package com.google.appengine.tools.mapreduce

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


      int shardCount) {
    List<ListMultimap<Bytes, V>> out = Lists.newArrayListWithCapacity(shardCount);
    for (int i = 0; i < shardCount; i++) {
      out.add(ArrayListMultimap.<Bytes, V>create());
    }
    Sharder sharder = new HashingSharder(shardCount);
    for (KeyValue<Bytes, V> pair : in) {
      out.get(sharder.getShardForKey(ByteBuffer.wrap(pair.getKey().bytes)))
          .put(pair.getKey(), pair.getValue());
    }
    return out;
  }
View Full Code Here

TOP

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

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.