示例#1
0
 private static void logConfigLocation(HiveConf conf) throws LogInitializationException {
   // Log a warning if hive-default.xml is found on the classpath
   if (conf.getHiveDefaultLocation() != null) {
     l4j.warn(
         "DEPRECATED: Ignoring hive-default.xml found on the CLASSPATH at "
             + conf.getHiveDefaultLocation().getPath());
   }
   // Look for hive-site.xml on the CLASSPATH and log its location if found.
   if (conf.getHiveSiteLocation() == null) {
     l4j.warn("hive-site.xml not found on CLASSPATH");
   } else {
     l4j.debug(
         "Using hive-site.xml found on CLASSPATH at " + conf.getHiveSiteLocation().getPath());
   }
 }
示例#2
0
文件: AppConfig.java 项目: Leolh/hive
  /**
   * Dumps all env and config state. Should be called once on WebHCat start up to facilitate
   * support/debugging. Later it may be worth adding a REST call which will return this data.
   */
  private String dumpEnvironent() {
    StringBuilder sb =
        TempletonUtils.dumpPropMap("========WebHCat System.getenv()========", System.getenv());
    sb.append("START========WebHCat AppConfig.iterator()========: \n");
    dumpConfig(this, sb);
    sb.append("END========WebHCat AppConfig.iterator()========: \n");

    sb.append(
        TempletonUtils.dumpPropMap(
            "========WebHCat System.getProperties()========", System.getProperties()));

    sb.append("START========\"new HiveConf()\"========\n");
    HiveConf c = new HiveConf();
    sb.append("hiveDefaultUrl=").append(c.getHiveDefaultLocation()).append('\n');
    sb.append("hiveSiteURL=").append(HiveConf.getHiveSiteLocation()).append('\n');
    sb.append("hiveServer2SiteUrl=").append(HiveConf.getHiveServer2SiteLocation()).append('\n');
    sb.append("hivemetastoreSiteUrl=").append(HiveConf.getMetastoreSiteLocation()).append('\n');
    dumpConfig(c, sb);
    sb.append("END========\"new HiveConf()\"========\n");
    return sb.toString();
  }