@SuppressWarnings("unchecked")
	protected void initInputReaders() throws Exception {
		final int numInputs = getNumTaskInputs();
		final MutableReader<?>[] inputReaders = new MutableReader[numInputs];

		int numGates = 0;

		for (int i = 0; i < numInputs; i++) {
			//  ---------------- create the input readers ---------------------
			// in case where a logical input unions multiple physical inputs, create a union reader
			final int groupSize = this.config.getGroupSize(i);
			numGates += groupSize;
			if (groupSize == 1) {
				// non-union case
				inputReaders[i] = new MutableRecordReader<IOReadableWritable>(this);
			} else if (groupSize > 1){
				// union case
				MutableRecordReader<IOReadableWritable>[] readers = new MutableRecordReader[groupSize];
				for (int j = 0; j < groupSize; ++j) {
					readers[j] = new MutableRecordReader<IOReadableWritable>(this);
				}
				inputReaders[i] = new MutableUnionRecordReader<IOReadableWritable>(readers);
			} else {
				throw new Exception("Illegal input group size in task configuration: " + groupSize);
			}
		}
		this.inputReaders = inputReaders;

		// final sanity check
		if (numGates != this.config.getNumInputs()) {
			throw new Exception("Illegal configuration: Number of input gates and group sizes are not consistent.");
		}
	}
@ SuppressWarnings ( "unchecked" ) protected void initInputReaders ( ) throws Exception { final int numInputs = getNumTaskInputs ( ) ; final MutableReader < ? > [ ] inputReaders = new MutableReader [ numInputs ] ; int numGates = 0 ; for ( int i = 0 ; i < numInputs ; i ++ ) { final int groupSize = this . config . getGroupSize ( i ) ; numGates += groupSize ; if ( groupSize == 1 ) { inputReaders [ i ] = new MutableRecordReader < IOReadableWritable > ( this ) ; } else if ( groupSize > 1 ) { MutableRecordReader < IOReadableWritable > [ ] readers = new MutableRecordReader [ groupSize ] ; for ( int j = 0 ; j < groupSize ; ++ j ) { readers [ j ] = new MutableRecordReader < IOReadableWritable > ( this ) ; } inputReaders [ i ] = new MutableUnionRecordReader < IOReadableWritable > ( readers ) ; } else { throw new Exception ( "Illegal input group size in task configuration: " + groupSize ) ; } } this . inputReaders = inputReaders ; if ( numGates != this . config . getNumInputs ( ) ) { throw new Exception ( "Illegal configuration: Number of input gates and group sizes are not consistent." ) ; } }
Creates the record readers for the number of inputs as defined by {@link #getNumTaskInputs()}.

This method requires that the task configuration, the driver, and the user-code class loader are set.