code: @SuppressWarnings("unchecked") // Explicit check for key class agreement
    public K createKey() {
      if (null == keyclass) {
        final Class<?> cls = kids[0].createKey().getClass();
        for (RecordReader<K,? extends Writable> rr : kids) {
          if (!cls.equals(rr.createKey().getClass())) {
            throw new ClassCastException("Child key classes fail to agree");
          }
        }
        keyclass = cls.asSubclass(WritableComparable.class);
      }
      return (K) ReflectionUtils.newInstance(keyclass, getConf());
    }
docs: Create a new key value common to all child RRs.
  @throws ClassCastException if key classes differ.