/** * This method returns a mapping from config variable name to its value for all config variables * which have been set using System properties */ public static Map<String, String> getConfSystemProperties() { Map<String, String> systemProperties = new HashMap<String, String>(); for (ConfVars oneVar : ConfVars.values()) { if (System.getProperty(oneVar.varname) != null) { if (System.getProperty(oneVar.varname).length() > 0) { systemProperties.put(oneVar.varname, System.getProperty(oneVar.varname)); } } } for (Map.Entry<String, String> oneVar : overrides.entrySet()) { if (overrides.get(oneVar.getKey()) != null) { if (overrides.get(oneVar.getKey()).length() > 0) { systemProperties.put(oneVar.getKey(), oneVar.getValue()); } } } return systemProperties; }
public static HashMap<String, ConfVars> getOrCreateReverseMap() { // This should be called rarely enough; for now it's ok to just lock every time. synchronized (reverseMapLock) { if (reverseMap != null) { return reverseMap; } } HashMap<String, ConfVars> vars = new HashMap<>(); for (ConfVars val : ConfVars.values()) { vars.put(val.varname.toLowerCase(), val); if (val.altName != null && !val.altName.isEmpty()) { vars.put(val.altName.toLowerCase(), val); } } synchronized (reverseMapLock) { if (reverseMap != null) { return reverseMap; } reverseMap = vars; return reverseMap; } }
for (HiveConf.ConfVars confVars : HiveConf.ConfVars.values()) { if (confVars.isExcluded()) {
for (HiveConf.ConfVars confVars : HiveConf.ConfVars.values()) { if (confVars.isExcluded()) {
for (HiveConf.ConfVars confVar : HiveConf.ConfVars.values()) { String defaultValue = confVar.getDefaultValue(); if (defaultValue != null) {
public static HashMap<String, ConfVars> getOrCreateReverseMap() { // This should be called rarely enough; for now it's ok to just lock every time. synchronized (reverseMapLock) { if (reverseMap != null) { return reverseMap; } } HashMap<String, ConfVars> vars = new HashMap<>(); for (ConfVars val : ConfVars.values()) { vars.put(val.varname.toLowerCase(), val); if (val.altName != null && !val.altName.isEmpty()) { vars.put(val.altName.toLowerCase(), val); } } synchronized (reverseMapLock) { if (reverseMap != null) { return reverseMap; } reverseMap = vars; return reverseMap; } }
/** * Overlays ConfVar properties with non-null values */ private static void applyDefaultNonNullConfVars(Configuration conf) { for (ConfVars var : ConfVars.values()) { if (var.defaultVal == null) { // Don't override ConfVars with null values continue; } if (conf.get(var.varname) != null) { l4j.debug("Overriding Hadoop conf property " + var.varname + "='" + conf.get(var.varname) + "' with Hive default value '" + var.defaultVal +"'"); } conf.set(var.varname, var.defaultVal); } }
/** * This method returns a mapping from config variable name to its value for all config variables * which have been set using System properties */ public static Map<String, String> getConfSystemProperties() { Map<String, String> systemProperties = new HashMap<String, String>(); for (ConfVars oneVar : ConfVars.values()) { if (System.getProperty(oneVar.varname) != null) { if (System.getProperty(oneVar.varname).length() > 0) { systemProperties.put(oneVar.varname, System.getProperty(oneVar.varname)); } } } return systemProperties; }
/** * This method returns a mapping from config variable name to its value for all config variables * which have been set using System properties */ public static Map<String, String> getConfSystemProperties() { Map<String, String> systemProperties = new HashMap<String, String>(); for (ConfVars oneVar : ConfVars.values()) { if (System.getProperty(oneVar.varname) != null) { if (System.getProperty(oneVar.varname).length() > 0) { systemProperties.put(oneVar.varname, System.getProperty(oneVar.varname)); } } } return systemProperties; }
/** * This method returns a mapping from config variable name to its value for all config variables * which have been set using System properties */ public static Map<String, String> getConfSystemProperties() { Map<String, String> systemProperties = new HashMap<String, String>(); for (ConfVars oneVar : ConfVars.values()) { if (System.getProperty(oneVar.varname) != null) { if (System.getProperty(oneVar.varname).length() > 0) { systemProperties.put(oneVar.varname, System.getProperty(oneVar.varname)); } } } return systemProperties; }
/** * Overlays ConfVar properties with non-null values */ private static void applyDefaultNonNullConfVars(Configuration conf) { for (ConfVars var : ConfVars.values()) { String defaultValue = var.getDefaultValue(); if (defaultValue == null) { // Don't override ConfVars with null values continue; } conf.set(var.varname, defaultValue); } }
/** * Overlays ConfVar properties with non-null values */ private static void applyDefaultNonNullConfVars(Configuration conf) { for (ConfVars var : ConfVars.values()) { String defaultValue = var.getDefaultValue(); if (defaultValue == null) { // Don't override ConfVars with null values continue; } conf.set(var.varname, defaultValue); } }
public void logVars(PrintStream ps) { for (ConfVars one : ConfVars.values()) { ps.println(one.varname + "=" + ((get(one.varname) != null) ? get(one.varname) : "")); } }
public void logVars(PrintStream ps) { for (ConfVars one : ConfVars.values()) { ps.println(one.varname + "=" + ((get(one.varname) != null) ? get(one.varname) : "")); } }
public void logVars(PrintStream ps) { for (ConfVars one : ConfVars.values()) { ps.println(one.varname + "=" + ((get(one.varname) != null) ? get(one.varname) : "")); } }
public void applySystemProperties() { for (ConfVars oneVar : ConfVars.values()) { if (System.getProperty(oneVar.varname) != null) { if (System.getProperty(oneVar.varname).length() > 0) { this.set(oneVar.varname, System.getProperty(oneVar.varname)); } } } }
public void logVars(PrintStream ps) { for (ConfVars one : ConfVars.values()) { ps.println(one.varname + "=" + ((get(one.varname) != null) ? get(one.varname) : "")); } }
for (HiveConf.ConfVars conf : HiveConf.ConfVars.values()) { vars.add(conf.varname);
/** * Overlays ConfVar properties with non-null values */ private static void applyDefaultNonNullConfVars(Configuration conf) { for (ConfVars var : ConfVars.values()) { String defaultValue = var.getDefaultValue(); if (defaultValue == null) { // Don't override ConfVars with null values continue; } conf.set(var.varname, defaultValue); } }
public void logVars(PrintStream ps) { for (ConfVars one : ConfVars.values()) { ps.println(one.varname + "=" + ((get(one.varname) != null) ? get(one.varname) : "")); } }