Set the configuration, if it doesn't already have a value for the given
key.
@param conf the configuration to modify
@param key the key to set
@param value the new "default" value to set
495575
private static void setIfUnset(JobConf conf, String key, String value) {
    if (conf.get(key) == null) {
      conf.set(key, value);
    }
  }
734760
public static void putValue(String key, Object newValue) {
        Object oldValue = CFG.get(key);
        if (changed(oldValue, newValue)) {
            CFG.put(key, newValue);
            List<RpcConfigListener> rpcConfigListeners = CFG_LISTENER.get(key);
            if (CommonUtils.isNotEmpty(rpcConfigListeners)) {
                for (RpcConfigListener rpcConfigListener : rpcConfigListeners) {
                    rpcConfigListener.onChange(oldValue, newValue);
                }
            }
        }
    }
771225
<T> void setValueInternal(String key, T value) {
		if (key == null) {
			throw new NullPointerException("Key must not be null.");
		}
		if (value == null) {
			throw new NullPointerException("Value must not be null.");
		}

		synchronized (this.confData) {
			this.confData.put(key, value);
		}
	}
716004
public function setConfig($key = null, $value = null)
    {
        if ($key == null || $value == null) {
            return null;
        }
        return ($this->config[$key] = $value);
    }
1154578
def set_main(key, value, path=MAIN_CF):
    '''
    
    '''
    pairs, conf_list = _parse_main(path)

    new_conf = []
    key_line_match = re.compile("^{0}([\\s=]|$)".format(re.escape(key)))
    if key in pairs:
        for line in conf_list:
            if re.match(key_line_match, line):
                new_conf.append('{0} = {1}'.format(key, value))
            else:
                new_conf.append(line)
    else:
        conf_list.append('{0} = {1}'.format(key, value))
        new_conf = conf_list

    _write_conf(new_conf, path)
    return new_conf
1227644
def set(self, key, value):
        """"""
        # Try to set self._jconf first if JVM is created, set self._conf if JVM is not created yet.
        if self._jconf is not None:
            self._jconf.set(key, unicode(value))
        else:
            self._conf[key] = unicode(value)
        return self
420850
public function setConfig($name, $key, $value)
    {
        $backup = $this->getDriver()->configGet($name, $key);
        $this->getDriver()->configSet($name, $key, $value);
        if (!array_key_exists($name, $this->config)) {
            $this->config[$name][$key] = $backup;
            return;
        }

        if (!array_key_exists($key, $this->config[$name])) {
            $this->config[$name][$key] = $backup;
        }
    }
637518
public void setConfigParameter(final ConfigurationKeys key, Object value)
	{
		// before setting parameter, check if paths have trailing File.separator
		if (key == ConfigurationKeys.LOGGING_PATH_DEBUG
				|| key == ConfigurationKeys.LOGGING_PATH_DIFFTOOL
				|| key == ConfigurationKeys.PATH_OUTPUT_SQL_FILES) {

			String v = (String) value;
			// if we do not have a trailing file separator and the current
			// path is compatible to the system that is running the config tool,
			// then add a trailing separator
			if (!v.endsWith(File.separator) && v.contains(File.separator)) {
				value = v + File.separator;
			}
		}

		this.parameterMap.put(key, value);
	}
395813
function Config(conf){
  try{
    if(typeof conf === 'string'){
      this.confPath = conf;
      conf = ini.parse(fs.readFileSync(conf, 'utf8'));
    }
  }catch(e){
    conf = {}
  }
  this.conf= conf || {};
}
517499
public function set(string $key, $value): void
	{
		[$file] = $this->parseKey($key);

		if(!isset($this->configuration[$file]))
		{
			$this->load($file);
		}

		Arr::set($this->configuration, $key, $value);
	}
1305846
public void setString(@NotNull final String key, @NotNull final String value) {
        props.setProperty(key, value);
        LOGGER.debug("Setting: {}='{}'", key, value);
    }
1283263
public function setOption($key, $value = null)
    {
        $name = $this->current ?: 'default';

        if (is_array($key)) {
            $this->configs[$name]['options'] = array_merge($this->configs[$name]['options'], $key);
        } else {
            $this->configs[$name]['options'][$key] = $value;
        }
    }
272786
def set(self, section, key, value):
        

        conf = self.get_section_config(section)
        if isinstance(value, bool):
            conf[key] = str(value)
        else:
            conf[key] = value
        self.set_section_config(section, conf)
656748
def configure(self, conf={}):
        
        if not conf: return
        if isinstance(conf, Configuration):
            conf = dict(conf.options())
        for key, value in conf.items():
            opt = self.get(key, None)
            if isinstance(opt, Configuration):
                opt.configure(value)
            else:
                setattr(self, key, value)
564061
public void configure(Configuration configuration){
		setConfiguration(Objects.requireNonNull(configuration));

		setValueFactory(null);

		resetInputFields();
		resetResultFields();
	}
811688
def setConf(self, key, value):
        
        self.sparkSession.conf.set(key, value)
1180873
public static void setConf(Object theObject, Configuration conf,
      boolean supportJobConf) {
    if (conf != null) {
      if (theObject instanceof Configurable) {
        ((Configurable) theObject).setConf(conf);
      }
      if (supportJobConf) {
        setJobConf(theObject, conf);
      }
    }
  }