code: public void map(Object key, Object value, OutputCollector output, Reporter reporter) throws IOException {
      if (outerrThreadsThrowable != null) {
        mapRedFinished();
        throw new IOException ("MROutput/MRErrThread failed:"
                               + StringUtils.stringifyException(
                                                                outerrThreadsThrowable));
      }
      try {
        // 1/4 Hadoop in
        numRecRead_++;
        maybeLogRecord();
        if (debugFailDuring_ && numRecRead_ == 3) {
          throw new IOException("debugFailDuring_");
        }
  
        // 2/4 Hadoop to Tool
        if (numExceptions_ == 0) {
          if (!this.ignoreKey) {
            write(key);
            clientOut_.write(getInputSeparator());
          }
          write(value);
          if (!ignoreNewLine) {
            clientOut_.write('\n');
          }
          if(skipping) {
            //flush the streams on every record input if running in skip mode
            //so that we don't buffer other records surrounding a bad record. 
            clientOut_.flush();
          }
        } else {
          numRecSkipped_++;
        }
      } catch (IOException io) {
        numExceptions_++;
        if (numExceptions_ > 1 || numRecWritten_ < minRecWrittenToEnableSkip_) {
          // terminate with failure
          String msg = logFailure(io);
          appendLogToJobLog("failure");
          mapRedFinished();
          throw new IOException(msg);
        } else {
          // terminate with success:
          // swallow input records although the stream processor failed/closed
        }
      }
    }
docs: (MapRed creates it reflectively)