code: static Set<String> serializeComparators(TupleMRConfig tupleMRConfig, Configuration conf)
  	    throws TupleMRException {
  		
  		Set<String> instanceFiles = new HashSet<String>();
  		
  		List<String> comparatorRefs = new ArrayList<String>();
  		List<String> comparatorInstanceFiles = new ArrayList<String>();
  
  		// We use "common" as the prefix for the common criteria
  		instanceFiles.addAll(serializeComparators(tupleMRConfig.getCommonCriteria(), conf, comparatorRefs,
  		    comparatorInstanceFiles, COMMON));
  
  		List<Criteria> specificCriterias = tupleMRConfig.getSpecificOrderBys();
  		// We use the schemaId as prefix for the specific sorting.
  		for(int i = 0; i < specificCriterias.size(); i++) {
  			instanceFiles.addAll(serializeComparators(specificCriterias.get(i), conf, comparatorRefs,
  			    comparatorInstanceFiles, i + ""));
  		}
  
  		if(comparatorRefs.size() > 0) {
  			conf.setStrings(CONF_COMPARATOR_REFERENCES, comparatorRefs.toArray(new String[] {}));
  			conf.setStrings(CONF_COMPARATOR_INSTANCES,
  			    comparatorInstanceFiles.toArray(new String[] {}));
  		}
  		
  		return instanceFiles;
  	}
docs: Serializes the custom compartors. It uses the distributed cache
  serialization.<br>
  Two config properties are used. The first for storing the reference. For
  example "common|address" refers to the sort comparator for address in the
  common order. "1|postalCode" refers to the sort comparator for the specific
  sort on field1 for the schema with schemaId = 1. The other config property
  stores the instance file paths where the instances are stored in the
  distributed cache.
  <p>
  Returns the instance files created.