/** * Add the hiveconf properties to the Java system properties, override * anything therein. * * @return a copy of the properties specified in hiveconf */ public Properties addHiveconfToSystemProperties() { Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { if (verbose) { System.err.println( "hiveconf: " + propKey + "=" + confProps.getProperty(propKey)); } if (propKey.equalsIgnoreCase("hive.root.logger")) { splitAndSetLogger(propKey, confProps); } else { System.setProperty(propKey, confProps.getProperty(propKey)); } } return confProps; }
public boolean process_stage1(String[] argv) { try { commandLine = new GnuParser().parse(options, argv); Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { // with HIVE-11304, hive.root.logger cannot have both logger name and log level. // if we still see it, split logger and level separately for hive.root.logger // and hive.log.level respectively if (propKey.equalsIgnoreCase("hive.root.logger")) { CommonCliOptions.splitAndSetLogger(propKey, confProps); } else { System.setProperty(propKey, confProps.getProperty(propKey)); } } Properties hiveVars = commandLine.getOptionProperties("define"); for (String propKey : hiveVars.stringPropertyNames()) { hiveVariables.put(propKey, hiveVars.getProperty(propKey)); } Properties hiveVars2 = commandLine.getOptionProperties("hivevar"); for (String propKey : hiveVars2.stringPropertyNames()) { hiveVariables.put(propKey, hiveVars2.getProperty(propKey)); } } catch (ParseException e) { System.err.println(e.getMessage()); printUsage(); return false; } return true; }
if (propKey.equalsIgnoreCase("hive.root.logger")) { CommonCliOptions.splitAndSetLogger(propKey, confProps); } else { System.setProperty(propKey, confProps.getProperty(propKey));
/** * Add the hiveconf properties to the Java system properties, override * anything therein. * * @return a copy of the properties specified in hiveconf */ public Properties addHiveconfToSystemProperties() { Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { if (verbose) { System.err.println( "hiveconf: " + propKey + "=" + confProps.getProperty(propKey)); } if (propKey.equalsIgnoreCase("hive.root.logger")) { splitAndSetLogger(propKey, confProps); } else { System.setProperty(propKey, confProps.getProperty(propKey)); } } return confProps; }
public boolean process_stage1(String[] argv) { try { commandLine = new GnuParser().parse(options, argv); Properties confProps = commandLine.getOptionProperties("hiveconf"); for (String propKey : confProps.stringPropertyNames()) { // with HIVE-11304, hive.root.logger cannot have both logger name and log level. // if we still see it, split logger and level separately for hive.root.logger // and hive.log.level respectively if (propKey.equalsIgnoreCase("hive.root.logger")) { CommonCliOptions.splitAndSetLogger(propKey, confProps); } else { System.setProperty(propKey, confProps.getProperty(propKey)); } } Properties hiveVars = commandLine.getOptionProperties("define"); for (String propKey : hiveVars.stringPropertyNames()) { hiveVariables.put(propKey, hiveVars.getProperty(propKey)); } Properties hiveVars2 = commandLine.getOptionProperties("hivevar"); for (String propKey : hiveVars2.stringPropertyNames()) { hiveVariables.put(propKey, hiveVars2.getProperty(propKey)); } } catch (ParseException e) { System.err.println(e.getMessage()); printUsage(); return false; } return true; }
CommonCliOptions.splitAndSetLogger(propKey, confProps); } else { System.setProperty(propKey, confProps.getProperty(propKey));