Retrieve a time from bundle.

@param key          the key of resource
@param defaultValue the default value if key is missing

@return the resource time

@throws MissingResourceException if the requested key is unknown
196720
public Date getDateTime( String key, Date defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getDateTime( key );
        }
        catch( MissingResourceException mre )
        {
            return defaultValue;
        }
    }
824397
public double getDouble( String key, double defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getDouble( key );
        }
        catch( MissingResourceException mre )
        {
            return defaultValue;
        }
    }
254819
public static <T> T get(String key, T defaultValue) {
    return hawkFacade.get(key, defaultValue);
  }
655948
public static @Nonnull JSONObject getBundle(@Nonnull String baseName) throws MissingResourceException {
        return getBundle(baseName, Locale.getDefault());
    }
331848
public synchronized String getAttribute(String key, String defaultValue)
	{
		if(attributes.containsKey(key))
		{
			return attributes.get(key).toString();
		}
		return defaultValue;
	}
709770
public Object getProperty(PropertyKey key)
    {
        //
        // Delegate up to any parent map
        //
        if (_delegateMap != null)
            return _delegateMap.getProperty(key);

        //
        // If neither found a value, return the default value
        //
        return key.getDefaultValue();
    }
92263
public Duration getDuration(String property, Duration defaultValue) {
    return getProperty(property, defaultValue, value -> {
      try {
        return Durations.of(value);
      } catch (NumberFormatException e) {
        throw new ConfigurationException("malformed property value: " + property + " must be a number");
      }
    });
  }
985050
public String get(String key, String defaultValue)
    {
        if( configs.containsKey(key) ){
            return configs.get(key);
        }

        return defaultValue;
    }
455860
protected String getText(String key, String defaultVal) {
    return textResource.getText(key, defaultVal);
  }
591538
public static <T> T getOrDefaultValue(String primaryKey, T defaultValue) {
        Object val = CFG.get(primaryKey);
        return val == null ? defaultValue : (T) CompatibleTypeUtils.convert(val, defaultValue.getClass());
    }
1276617
public alluxio.grpc.InconsistentPropertyValues getValuesOrDefault(
      java.lang.String key,
      alluxio.grpc.InconsistentPropertyValues defaultValue) {
    if (key == null) { throw new java.lang.NullPointerException(); }
    java.util.Map<java.lang.String, alluxio.grpc.InconsistentPropertyValues> map =
        internalGetValues().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
511530
public float getFloat( String key )
        throws MissingResourceException
    {
        ResourceBundle bundle = getBundle();
        String value = bundle.getString( key );
        try
        {
            return Float.parseFloat( value );
        }
        catch( NumberFormatException nfe )
        {
            throw new MissingResourceException( "Expecting a float value but got " + value,
                                                "java.lang.String",
                                                key
            );
        }
    }
555837
public String getProperty(String key, String defaultValue) {
		return props.getProperty(prefix + key, defaultValue);
	}
1042342
public static String getString (final String key, final Locale msgLocale) {
        /*read message resource file.*/
        ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, msgLocale);
        try {
            return RESOURCE_BUNDLE.getString(key);
        } catch (final MissingResourceException e) {
            return key;
        }
    }
1163042
public static String getValue(String fileName, String key)
            throws MissingResourceException {
        final Properties properties = fillProperties(fileName);
        String value = properties.getProperty(key);
        return value.trim();
    }
42501
public byte getByte( String key, byte defaultValue )
        throws MissingResourceException
    {
        try
        {
            return getByte( key );
        }
        catch( MissingResourceException mre )
        {
            return defaultValue;
        }
    }
283577
public static String getStringValue(String key, String defaultValue) {
        return getStringValue(null, key, defaultValue);
    }