class ConfigurationUtil {

  public static <T extends HadoopConfigurationProperty<?>> String getMandatoryConfig(
      Configuration config, T property) throws IOException {
    String value = config.get(property.getKey());
    if (Strings.isNullOrEmpty(value)) {
      throw new IOException("Must supply a value for configuration setting: " + property.getKey());
    }
    return value;
  }

}