if (varname.startsWith(SetProcessor.ENV_PREFIX)){
ss.err.println("env:* variables can not be set.");
return new CommandProcessorResponse(1);
} else if (varname.startsWith(SetProcessor.SYSTEM_PREFIX)){
String propName = varname.substring(SetProcessor.SYSTEM_PREFIX.length());
System.getProperties().setProperty(propName, new VariableSubstitution().substitute(ss.getConf(),varvalue));
return new CommandProcessorResponse(0);
} else if (varname.startsWith(SetProcessor.HIVECONF_PREFIX)){
String propName = varname.substring(SetProcessor.HIVECONF_PREFIX.length());
ss.getConf().set(propName, new VariableSubstitution().substitute(ss.getConf(),varvalue));
return new CommandProcessorResponse(0);
} else if (varname.startsWith(SetProcessor.HIVEVAR_PREFIX)) {
String propName = varname.substring(SetProcessor.HIVEVAR_PREFIX.length());
ss.getHiveVariables().put(propName, new VariableSubstitution().substitute(ss.getConf(),varvalue));
return new CommandProcessorResponse(0);
} else {
String substitutedValue = new VariableSubstitution().substitute(ss.getConf(),varvalue);
ss.getConf().set(varname, substitutedValue );
ss.getOverriddenConfigurations().put(varname, substitutedValue);
return new CommandProcessorResponse(0);
}
}