Gets the value for the given key in the {@link Properties}; if this key is not found, a
RuntimeException is thrown.

@param key the key to get the value for
@param options options for getting configuration value
@return the value for the given key
417
public static String get(PropertyKey key, ConfigurationValueOptions options) {
    return sConf.get(key, options);
  }
531230
static String getSystemProperty(final String key) {
        final SecurityManager sm = System.getSecurityManager();

        if (sm != null) {
            return AccessController.doPrivileged(new PrivilegedAction<String>() {
                public String run() {
                    return System.getProperty(key);
                }
            });
        } else {
            return System.getProperty(key);
        }
    }
748404
public static String getOption(Properties props, String key) throws IOException {
    String val = props.getProperty(key);
    if (val == null) {
      throw new IOException("Undefined property: " + key);
    }
    return val;
  }
148753
private Optional<String> get(String key, Set<String> processingKeys) {

        for (ConfigurationSource configurationSource : config.getConfigurationSources()) {

            Optional<String> value = configurationSource.get(key);

            if (value.isPresent()) {

                return Optional.of(interpolateString(
                        key, ConfigurationDecoderUtils.decodeConfigValueIfEncoded(key, value.get()), processingKeys));
            }
        }

        return Optional.empty();
    }
1303550
@SuppressWarnings("unchecked")
    public <T> T getOptionValue(String name)
    {
        return (T) configurationOptions.get(name);
    }
1347153
public String getProperty(final String key) {
        if (hasProperty(key)) {
            return properties.getProperty(key);
        } else {
            throw new PropertyLookupException("property not found: " + key);
        }
    }
726358
public String get(final String key) {
        if (key == null || initProps == null)
            return null;

        String value = initProps.get(key);
        if (value == null) {
            try {
                value = AccessController.doPrivileged(new java.security.PrivilegedExceptionAction<String>() {
                    @Override
                    public String run() throws Exception {
                        return System.getProperty(key);
                    }
                });
            } catch (Exception ex) {
            }
        }

        return value;
    }
1020882
protected String getConfig(IConfigKey key) {
        if (configs == null) {
            loadConfigs();
        }
        String value = configs.getProperty(key.getKeyString());
        if (value == null && key instanceof IConfigKeyHaveDefault) {
            return ((IConfigKeyHaveDefault) key).getDefaultValueStr();
        }
        return value;
    }
128812
public static String javaOptStringFromHadoopConfiguration(Configuration conf, String key) {
    String value = conf.get(key);
    if (value == null) {
      throw new RuntimeException(
          String.format("Cannot find property [%s], in Hadoop configuration: [%s]",
              key, value));
    }
    return String.format("-D%s=%s", key, value);
  }
575223
function(key) {
       return (value = query(key)) !== null ? value :
                JSpec.options[key] || null
     }
353398
public String get(String key) {
    if (properties.get(key) != null) {
      return properties.get(key);
    } else {
      return getConfigurationValue(key);
    }
  }
521243
protected static String getStringValue(Configuration config, String key) {
        try {
            String values[] = config.getStringArray(key);
            if (values == null) {
                return null;
            }
            if (values.length == 0) {
                return config.getString(key);
            } else if (values.length == 1) {
                return values[0];
            }

            StringBuilder sb = new StringBuilder();
            for (int i = 0; i < values.length; i++) {
                sb.append(values[i]);
                if (i != values.length - 1) {
                    sb.append(",");
                }
            }
            return sb.toString();
        } catch (Exception e) {
            Object v = config.getProperty(key);
            if (v != null) {
                return String.valueOf(v);
            } else {
                return null;
            }
        }
    }
1175753
@SuppressWarnings("WeakerAccess")
    public String getProperty(Enum<?> key, boolean lowerCase) {
        final String keyName;
        if (lowerCase) {
            keyName = key.name().toLowerCase(Locale.ENGLISH);
        } else {
            keyName = key.name();
        }
        return getProperty(keyName);
    }
135067
private String getInternal(String key) {
		Preconditions.checkArgument(configuredOptions.containsKey(key),
			"The configuration " + key + " has not been configured.");

		return configuredOptions.get(key);
	}
719
public synchronized Map<String, Object> getConfiguration(String key) {
		return Optional.ofNullable(inventory.get(key))
				.flatMap(v->v.getConfiguration())
				.map(v->v.getMap())
				.orElse(null);
	}
36774
public static String getPropertyOrNull(final String key) {
        String value = System.getProperty(key);
        return (value == null || value.length() <= 0)? null: value;
    }
1316823
@SuppressWarnings("unchecked")
    public <T> T get(Option<T> key) {
        T v = (T) this.values.get(key);
        if (v == null) {
            v = key.defaultValue();
            this.values.put(key, v);
        }
        return v;
    }