code: @Override
  	public int getPartition(DatumWrapper<ITuple> key, NullWritable value, int numPartitions) {
  		if(numPartitions == 1) {
  			// in this case the schema is not checked if it's valid
  			return 0;
  		} else {
  			ITuple tuple = key.datum();
  			String sourceName = tuple.getSchema().getName();
  			Integer schemaId = tupleMRConfig.getSchemaIdByName(sourceName);
  			if(schemaId == null) {
  				throw new RuntimeException("Schema name '" + sourceName
  				    + "' is unknown. Known schemas are : "
  				    + tupleMRConfig.getIntermediateSchemaNames());
  			}
  			int[] fieldsToPartition = serInfo.getPartitionFieldsIndexes().get(schemaId);
  			if(fieldsToPartition.length == 0) {
  				throw new RuntimeException("Fields to partition is 0. Something has been wrongly configured.");
  			}
  			return (partialHashCode(tuple, fieldsToPartition) & Integer.MAX_VALUE)
  			    % numPartitions;
  		}
  	}
docs: to perform hashCode of strings