/** Initialize the custom comparators. Creates a quick access array for the custom comparators. */ private void initComparators() { TupleMRConfigBuilder.initializeComparators( context.getHadoopContext().getConfiguration(), tupleMRConfig); customComparators = new RawComparator<?>[maxDepth + 1]; for (int i = minDepth; i <= maxDepth; i++) { SortElement element = tupleMRConfig.getCommonCriteria().getElements().get(i); if (element.getCustomComparator() != null) { customComparators[i] = element.getCustomComparator(); } } }