private static void setJobConf(Object theObject, Configuration conf) {
    if (configureMethod == null) return;
    try {
      if (jobConfClass.isAssignableFrom(conf.getClass()) &&
            jobConfigurableClass.isAssignableFrom(theObject.getClass())) {
        configureMethod.invoke(theObject, conf);
      }
    } catch (Exception e) {
      throw new RuntimeException("Error in configuring object", e);
    }
  }
Check and set 'configuration' if necessary.

@param theObject object for which to set configuration
@param conf Configuration
common/src/java/org/apache/hive/common/util/ReflectionUtil.java