public static Map<String,String> getHCatKeyHiveConf(JobConf conf) {
    try {
      Properties properties = null;

      if (! StringUtils.isBlank(conf.get(HCatConstants.HCAT_KEY_HIVE_CONF))) {
        properties = (Properties) HCatUtil.deserialize(
            conf.get(HCatConstants.HCAT_KEY_HIVE_CONF));

        LOG.info(HCatConstants.HCAT_KEY_HIVE_CONF + " is set. Using differences=" + properties);
      } else {
        LOG.info(HCatConstants.HCAT_KEY_HIVE_CONF + " not set. Generating configuration differences.");

        properties = getHiveSiteOverrides(conf);
      }

      // This method may not be safe as it can throw an NPE if a key or value is null.
      return Maps.fromProperties(properties);
    }
    catch (IOException e) {
      throw new IllegalStateException("Failed to deserialize hive conf", e);
    }
  }
Returns the hive-site.xml config settings which do not appear in <code>jobConf<code> or
the hive-site.xml config settings which appear in <code>jobConf<code>, but have a
different value than HiveConf code defaults.
@param hiveSite the config settings as found in the hive-site.xml only.
@param jobConf the config settings used to launch the job.
@return the set difference between hiveSite and jobConf.
hcatalog/core/src/main/java/org/apache/hive/hcatalog/common/HCatUtil.java