Returns config value given collection name
Borrowed heavily from Solr's ZKController.
966419
public String readConfigName(SolrZkClient zkClient, String collection)
  throws KeeperException, InterruptedException {
    if (collection == null) {
      throw new IllegalArgumentException("collection must not be null");
    }
    String configName = null;

    // first check for alias
    byte[] aliasData = zkClient.getData(ZkStateReader.ALIASES, null, null, true);
    Aliases aliases = ClusterState.load(aliasData);
    String alias = aliases.getCollectionAlias(collection);
    if (alias != null) {
      List<String> aliasList = StrUtils.splitSmart(alias, ",", true);
      if (aliasList.size() > 1) {
        throw new IllegalArgumentException("collection cannot be an alias that maps to multiple collections");
      }
      collection = aliasList.get(0);
    }
    
    String path = ZkStateReader.COLLECTIONS_ZKNODE + "/" + collection;
    if (LOG.isInfoEnabled()) {
      LOG.info("Load collection config from:" + path);
    }
    byte[] data = zkClient.getData(path, null, null, true);
    
    if(data != null) {
      ZkNodeProps props = ZkNodeProps.load(data);
      configName = props.getStr(ZkController.CONFIGNAME_PROP);
    }
    
    if (configName != null && !zkClient.exists(ZkConfigManager.CONFIGS_ZKNODE + "/" + configName, true)) {
      LOG.error("Specified config does not exist in ZooKeeper:" + configName);
      throw new IllegalArgumentException("Specified config does not exist in ZooKeeper:"
        + configName);
    }

    return configName;
  }
687165
@Override
  public Config getOwnConfig(final ConfigKeyPath configKey) {
    try {
      return this.ownConfigCache.get(configKey, new Callable<Config>() {
        @Override
        public Config call()  {
          return InMemoryValueInspector.this.valueFallback.getOwnConfig(configKey);
        }
      });
    } catch (ExecutionException e) {
      // should NOT come here
      throw new RuntimeException("Can not getOwnConfig for " + configKey);
    }
  }
569241
def get_default_config(self):
        
        config = super(SidekiqCollector, self).get_default_config()
        config.update({
            'path': 'sidekiq',
            'host': 'localhost',
            'ports': '6379',
            'password': None,
            'databases': 16,
            'sentinel_ports': None,
            'sentinel_name': None,
            'cluster_prefix': None
        })
        return config
676309
def values(self, section=None):
        """"""
        if not section and self.section:
            section = self.section
        config = self.config.get(section, {}) if section else self.config
        return config.values()
985050
public String get(String key, String defaultValue)
    {
        if( configs.containsKey(key) ){
            return configs.get(key);
        }

        return defaultValue;
    }
1135028
def get(self, name, default=_MISSING):
        """"""
        name = self._convert_name(name)
        if name not in self._fields:
            if default is _MISSING:
                default = self._default_value(name)
            return default
        if name in _UNICODEFIELDS:
            value = self._fields[name]
            return value
        elif name in _LISTFIELDS:
            value = self._fields[name]
            if value is None:
                return []
            res = []
            for val in value:
                if name not in _LISTTUPLEFIELDS:
                    res.append(val)
                else:
                    # That's for Project-URL
                    res.append((val[0], val[1]))
            return res

        elif name in _ELEMENTSFIELD:
            value = self._fields[name]
            if isinstance(value, string_types):
                return value.split(',')
        return self._fields[name]
1153659
def get(self, path, default_value):
        
        return lib.zconfig_get(self._as_parameter_, path, default_value)
1352483
def _get_yum_config_value(name):
    '''
    
    '''
    conf = _get_yum_config()
    if name in conf.keys():
        return conf.get(name)
    return None
630356
def _get_key_value_config(self):
        """"""
        for rp in self._remote_providers:
            val = self._get_remote_config(rp)
            self._kvstore = val
            return None

        raise errors.RemoteConfigError("No Files Found")
1036488
def get_config_data(name)
      logger.debug "get_config_data(#{name.inspect})"

      name = name.to_s
      unless result = self.cache_hash[name]
        result = self.cache_hash[name] =
            make_indifferent(
                merge_hashes(
                    load_config_files(name)
                )
            )
        logger.debug "get_config_data(#{name.inspect}): reloaded"
      end

      result
    end
1220201
def config_get(self, pattern='*'):
        
        result = {}
        for name, value in self.redis_config.items():
            if fnmatch.fnmatch(name, pattern):
                try:
                    result[name] = int(value)
                except ValueError:
                    result[name] = value
        return result
553835
def get_default_config(self):
        
        config = super(SolrCollector, self).get_default_config()
        config.update({
            'host':     'localhost',
            'port':     8983,
            'path':     'solr',
            'core':     None,
            'stats':    ['jvm', 'core', 'response',
                         'query', 'update', 'cache'],
        })
        return config
1214875
public CollectionDescriptor getCollectionDescriptorByName(String name)
    {
        if (name == null)
        {
            return null;
        }

        CollectionDescriptor cod  = (CollectionDescriptor) getCollectionDescriptorNameMap().get(name);

        //
        // BRJ: if the CollectionDescriptor is not found
        // look in the ClassDescriptor referenced by 'super' for it
        //
        if (cod == null)
        {
            ClassDescriptor superCld = getSuperClassDescriptor();
            if (superCld != null)
            {
                cod = superCld.getCollectionDescriptorByName(name);
            }
        }

        return cod;
    }
997809
def get_config(self, key, default=None):
        ''' '''
        for conf in (self.config, self.app.conifg):
            if key in conf: return conf[key]
        return default
48178
def get_configure_by_name(self, name):
        """"""

        for elem in self.configures:
            if elem.name == name:
                return elem
        return None
1104718
def find_value(self, key):
        """"""
        values = self.values
        if key not in values:
            raise AttributeError("Config has no value for {}".format(key))

        val = values[key]
        if isinstance(val, Default):
            return val.val
        else:
            return val
823369
public CollectionDescriptorDef getCollection(String name)
    {
        CollectionDescriptorDef collDef = null;

        for (Iterator it = _collections.iterator(); it.hasNext(); )
        {
            collDef = (CollectionDescriptorDef)it.next();
            if (collDef.getName().equals(name))
            {
                return collDef;
            }
        }
        return null;
    }