code: private List<Range> getScatterSplitPoints(String namespace, String kind, final int numSegments) {
      Query query = createQuery(namespace, kind).addSort(SCATTER_RESERVED_PROPERTY).setKeysOnly();
      List<Key> splitPoints = sortKeys(runQuery(query, numSegments - 1));
      List<Range> result = new ArrayList<>(splitPoints.size() + 1);
      FilterPredicate lower = null;
      for (Key k : splitPoints) {
        result.add(new Range(lower, new FilterPredicate(KEY_RESERVED_PROPERTY, LESS_THAN, k)));
        lower = new FilterPredicate(KEY_RESERVED_PROPERTY, GREATER_THAN_OR_EQUAL, k);
      }
      result.add(new Range(lower, null));
      logger.info("Requested " + numSegments + " segments, retrieved " + result.size());
      return result;
    }
docs: Uses the scatter property to distribute ranges to segments.
  
  A random scatter property is added to 1 out of every 512 entities see:
  https://github.com/GoogleCloudPlatform/appengine-mapreduce/wiki/ScatterPropertyImplementation
  
  Retrieving the entities with the highest scatter values provides a random sample of entities.
  Because they are randomly selected, their distribution in keyspace should be the same as other
  entities.
  
  Looking at Keyspace, It looks something like this:
  |---*------*------*---*--------*-----*--------*--| Where "*" is a scatter entity and "-" is
  some other entity.
  
  So once sample entities are obtained them by key allows them to serve as boundaries between
  ranges of keyspace.