private static URL checkConfigFile(File f) {
    try {
      return (f.exists() && f.isFile()) ? f.toURI().toURL() : null;
    } catch (Throwable e) {
      LOG.warn("Error looking for config " + f, e);
      return null;
    }
  }
This is useful if you need the variable name for a LOG message or
{@link System#setProperty(String, String)}, beware however that you should only use this
with setProperty if you're going to create a configuration via
{@link MetastoreConf#newMetastoreConf()}.  If you are going to create it with HiveConf,
then use {@link #getHiveName()}.
@return metastore.* configuration key
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java