code: public int chooseShardForInsert(DocumentID key) {
      int hashCode = key.hashCode();
      return hashCode >= 0 ? hashCode % numShards : (-hashCode) % numShards;
    }
docs: /* (non-Javadoc)
  @see org.apache.hadoop.contrib.index.mapred.IDistributionPolicy#chooseShardForInsert(org.apache.hadoop.contrib.index.mapred.DocumentID)