public Map<String, String> execEnv(Map<String, String> env) {
    HashMap<String, String> res = new HashMap<String, String>();

    for (String key : appConf.getStrings(AppConfig.EXEC_ENVS_NAME)) {
      String val = System.getenv(key);
      if (val != null) {
        res.put(key, val);
      }
    }
    if (env != null)
      res.putAll(env);
    for (Map.Entry<String, String> envs : res.entrySet()) {
      LOG.info("Env " + envs.getKey() + "=" + envs.getValue());
    }
    return res;
  }
Build the environment used for all exec calls.

@return The environment variables.
hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/ExecServiceImpl.java