clist.addAll(Arrays.asList(var.getValidator().toDescription(), "")); } else { clist.addAll(Arrays.asList("Expects " + var.typeString() + " type value", ""));
message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED because ").append(key).append(" expects "); message.append(confVars.typeString()).append(" type value."); throw new IllegalArgumentException(message.toString());
private int showConf(Hive db, ShowConfDesc showConf) throws Exception { ConfVars conf = HiveConf.getConfVars(showConf.getConfName()); if (conf == null) { throw new HiveException("invalid configuration name " + showConf.getConfName()); } String description = conf.getDescription(); String defaultValue = conf.getDefaultValue(); DataOutputStream output = getOutputStream(showConf.getResFile()); try { if (defaultValue != null) { output.write(defaultValue.getBytes()); } output.write(separator); output.write(conf.typeString().getBytes()); output.write(separator); if (description != null) { output.write(description.replaceAll(" *\n *", " ").getBytes()); } output.write(terminator); } finally { output.close(); } return 0; }
LOG.warn("HiveConf of name {} does not exist", key); } else if (!var.isType(entry.getValue())) { LOG.warn("HiveConf {} expects {} type value", var.varname, var.typeString());
l4j.warn("HiveConf of name " + key + " does not exist"); } else if (!var.isType(entry.getValue())) { l4j.warn("HiveConf " + var.varname + " expects " + var.typeString() + " type value");
clist.addAll(Arrays.asList(var.getValidator().toDescription(), "")); } else { clist.addAll(Arrays.asList("Expects " + var.typeString() + " type value", ""));
clist.addAll(Arrays.asList(var.getValidator().toDescription(), "")); } else { clist.addAll(Arrays.asList("Expects " + var.typeString() + " type value", ""));
clist.addAll(Arrays.asList(var.getValidator().toDescription(), "")); } else { clist.addAll(Arrays.asList("Expects " + var.typeString() + " type value", ""));
private static void setConf(String varname, String key, String varvalue, boolean register) throws IllegalArgumentException { HiveConf conf = SessionState.get().getConf(); String value = new VariableSubstitution().substitute(conf, varvalue); if (conf.getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)) { HiveConf.ConfVars confVars = HiveConf.getConfVars(key); if (confVars != null) { if (!confVars.isType(value)) { StringBuilder message = new StringBuilder(); message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED because ").append(key).append(" expects "); message.append(confVars.typeString()).append(" type value."); throw new IllegalArgumentException(message.toString()); } String fail = confVars.validate(value); if (fail != null) { StringBuilder message = new StringBuilder(); message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED in validation : ").append(fail).append('.'); throw new IllegalArgumentException(message.toString()); } } else if (key.startsWith("hive.")) { throw new IllegalArgumentException("hive configuration " + key + " does not exists."); } } conf.verifyAndSet(key, value); if (register) { SessionState.get().getOverriddenConfigurations().put(key, value); } }
private static void setConf(String varname, String key, String varvalue, boolean register) throws IllegalArgumentException { HiveConf conf = SessionState.get().getConf(); String value = new VariableSubstitution().substitute(conf, varvalue); if (conf.getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)) { HiveConf.ConfVars confVars = HiveConf.getConfVars(key); if (confVars != null) { if (!confVars.isType(value)) { StringBuilder message = new StringBuilder(); message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED because ").append(key).append(" expects "); message.append(confVars.typeString()).append(" type value."); throw new IllegalArgumentException(message.toString()); } String fail = confVars.validate(value); if (fail != null) { StringBuilder message = new StringBuilder(); message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED in validation : ").append(fail).append('.'); throw new IllegalArgumentException(message.toString()); } } else if (key.startsWith("hive.")) { throw new IllegalArgumentException("hive configuration " + key + " does not exists."); } } conf.verifyAndSet(key, value); if (register) { SessionState.get().getOverriddenConfigurations().put(key, value); } }
private static void setConf(String varname, String key, String varvalue, boolean register) throws IllegalArgumentException { HiveConf conf = SessionState.get().getConf(); String value = new VariableSubstitution().substitute(conf, varvalue); if (conf.getBoolVar(HiveConf.ConfVars.HIVECONFVALIDATION)) { HiveConf.ConfVars confVars = HiveConf.getConfVars(key); if (confVars != null) { if (!confVars.isType(value)) { StringBuilder message = new StringBuilder(); message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED because ").append(key).append(" expects "); message.append(confVars.typeString()).append(" type value."); throw new IllegalArgumentException(message.toString()); } String fail = confVars.validate(value); if (fail != null) { StringBuilder message = new StringBuilder(); message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED in validation : ").append(fail).append('.'); throw new IllegalArgumentException(message.toString()); } } else if (key.startsWith("hive.")) { throw new IllegalArgumentException("hive configuration " + key + " does not exists."); } } conf.verifyAndSet(key, value); if (register) { SessionState.get().getOverriddenConfigurations().put(key, value); } }
private int showConf(Hive db, ShowConfDesc showConf) throws Exception { ConfVars conf = HiveConf.getConfVars(showConf.getConfName()); if (conf == null) { throw new HiveException("invalid configuration name " + showConf.getConfName()); } String description = conf.getDescription(); String defaultValue = conf.getDefaultValue(); DataOutputStream output = getOutputStream(showConf.getResFile()); try { if (defaultValue != null) { output.write(defaultValue.getBytes()); } output.write(separator); output.write(conf.typeString().getBytes()); output.write(separator); if (description != null) { output.write(description.replaceAll(" *\n *", " ").getBytes()); } output.write(terminator); } finally { output.close(); } return 0; }
LOG.warn("HiveConf of name {} does not exist", key); } else if (!var.isType(entry.getValue())) { LOG.warn("HiveConf {} expects {} type value", var.varname, var.typeString());
message.append("'SET ").append(varname).append('=').append(varvalue); message.append("' FAILED because ").append(key).append(" expects "); message.append(confVars.typeString()).append(" type value."); throw new IllegalArgumentException(message.toString());
private int showConf(Hive db, ShowConfDesc showConf) throws Exception { ConfVars conf = HiveConf.getConfVars(showConf.getConfName()); if (conf == null) { throw new HiveException("invalid configuration name " + showConf.getConfName()); } String description = conf.getDescription(); String defaultValue = conf.getDefaultValue(); DataOutputStream output = getOutputStream(showConf.getResFile()); try { if (defaultValue != null) { output.write(defaultValue.getBytes()); } output.write(separator); output.write(conf.typeString().getBytes()); output.write(separator); if (description != null) { output.write(description.replaceAll(" *\n *", " ").getBytes()); } output.write(terminator); } finally { output.close(); } return 0; }