/**
  * Checks that the job can be run against the table's layout. Throws an exception if not.
  *
  * @param tableLayout The layout of the table the job will use as input.
  * @throws IOException If the job cannot be run over the input table because the layout is
  *     incompatible.
  */
 protected void validateAgainstTableLayout(KijiTableLayout tableLayout) throws IOException {
   // Validate the data request.
   KijiDataRequest dataRequest = getDataRequest();
   KijiDataRequestValidator validator = new KijiDataRequestValidator(dataRequest);
   try {
     validator.validate(tableLayout);
   } catch (InvalidLayoutException e) {
     throw new InternalKijiError(
         "Invalid table layout found while configuring a job: "
             + tableLayout.toString()
             + " [Error: "
             + e.getMessage()
             + "]");
   } catch (KijiDataRequestException e) {
     throw new JobConfigurationException("Invalid data request: " + e.getMessage());
   }
 }
  /** {@inheritDoc} */
  @Override
  protected void validateAgainstTableLayout(KijiTableLayout tableLayout) throws IOException {
    super.validateAgainstTableLayout(tableLayout);

    // Validate the output column the producer will write to (make sure it exists).
    try {
      KijiProducers.validateOutputColumn(mProducer, tableLayout);
    } catch (InvalidLayoutException e) {
      throw new InternalKijiError(
          "Invalid table layout found while configuring a job: "
              + tableLayout.toString()
              + " [Error: "
              + e.getMessage()
              + "]");
    } catch (KijiProducerOutputException e) {
      throw new JobConfigurationException(
          "Producer is configured to write a column that does not exist in the input table: "
              + e.getMessage());
    }
  }